From 15476001339aa1c4742138fb7077ff35004d349a Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 8 Dec 2021 13:04:09 -0500 Subject: [PATCH] Add support for the AttributeList attribute. (#12660) Getting this into the ZAP database as things stand involves modifying every single cluster XML and every single cluster definition in every single .zap file. Instead of that, we just enable it for the controller codegen and manually work around it not being present in endpoint_config. --- src/app/AttributePathParams.h | 10 +- src/app/ClusterInfo.h | 11 - src/app/EventPathParams.h | 8 +- src/app/tests/TestClusterInfo.cpp | 10 +- .../tests/suites/TestBasicInformation.yaml | 29 + .../util/ember-compatibility-functions.cpp | 118 +- src/app/zap-templates/templates/app/helper.js | 1 + .../zcl/data-model/chip/global-attributes.xml | 2 + .../data_model/controller-clusters.zap | 922 +- .../java/templates/ClusterInfo-java.zapt | 2 +- .../ClusterInfo-read-interaction.zapt | 2 +- .../java/zap-generated/CHIPCallbackTypes.h | 118 + .../zap-generated/CHIPClustersRead-JNI.cpp | 2277 +++- .../java/zap-generated/CHIPReadCallbacks.cpp | 10831 ++++++++++++---- .../java/zap-generated/CHIPReadCallbacks.h | 1990 ++- .../chip/devicecontroller/ChipClusters.java | 767 ++ .../devicecontroller/ClusterInfoMapping.java | 1720 ++- .../devicecontroller/ClusterReadMapping.java | 1030 +- .../python/chip/clusters/CHIPClusters.py | 295 + .../python/chip/clusters/Objects.py | 1894 ++- src/darwin/Framework/CHIP/templates/helper.js | 1 + .../CHIP/zap-generated/CHIPCallbackBridge.mm | 1510 ++- .../CHIPCallbackBridge_internal.h | 657 + .../CHIP/zap-generated/CHIPClustersObjc.h | 177 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 945 ++ .../CHIP/zap-generated/CHIPTestClustersObjc.h | 60 + .../zap-generated/CHIPTestClustersObjc.mm | 2389 +++- .../Framework/CHIPTests/CHIPClustersTests.m | 1510 ++- src/lib/core/DataModelTypes.h | 6 + .../app-common/zap-generated/attribute-id.h | 1 + .../zap-generated/cluster-objects.h | 1404 ++ .../app-common/zap-generated/ids/Attributes.h | 472 + .../zap-generated/cluster/Commands.h | 2157 ++- .../chip-tool/zap-generated/test/Commands.h | 78 +- .../zap-generated/CHIPClientCallbacks.cpp | 1621 ++- .../zap-generated/CHIPClientCallbacks.h | 275 + 36 files changed, 31375 insertions(+), 3925 deletions(-) diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index 5feb14e5cc989b..7c79585a027433 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -33,7 +33,7 @@ struct AttributePathParams // // TODO: (#11420) This class is overlapped with ClusterInfo class, need to do a clean up. AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId) : - AttributePathParams(aEndpointId, aClusterId, ClusterInfo::kInvalidAttributeId, kInvalidListIndex) + AttributePathParams(aEndpointId, aClusterId, kInvalidAttributeId, kInvalidListIndex) {} AttributePathParams(EndpointId aEndpointId, ClusterId aClusterId, AttributeId aAttributeId) : @@ -61,13 +61,13 @@ struct AttributePathParams bool IsValidAttributePath() const { return HasWildcardListIndex() || !HasWildcardAttributeId(); } inline bool HasWildcardEndpointId() const { return mEndpointId == kInvalidEndpointId; } - inline bool HasWildcardClusterId() const { return mClusterId == ClusterInfo::kInvalidClusterId; } - inline bool HasWildcardAttributeId() const { return mAttributeId == ClusterInfo::kInvalidAttributeId; } + inline bool HasWildcardClusterId() const { return mClusterId == kInvalidClusterId; } + inline bool HasWildcardAttributeId() const { return mAttributeId == kInvalidAttributeId; } inline bool HasWildcardListIndex() const { return mListIndex == kInvalidListIndex; } EndpointId mEndpointId = kInvalidEndpointId; - ClusterId mClusterId = ClusterInfo::kInvalidClusterId; - AttributeId mAttributeId = ClusterInfo::kInvalidAttributeId; + ClusterId mClusterId = kInvalidClusterId; + AttributeId mAttributeId = kInvalidAttributeId; ListIndex mListIndex = kInvalidListIndex; }; } // namespace app diff --git a/src/app/ClusterInfo.h b/src/app/ClusterInfo.h index 8eb5649fc5939c..55e7d7ec403823 100644 --- a/src/app/ClusterInfo.h +++ b/src/app/ClusterInfo.h @@ -38,17 +38,6 @@ namespace app { // Note: The change will happen after #11171 with a better linked list. struct ClusterInfo { -private: - // Allow AttributePathParams access these constants. - friend struct AttributePathParams; - friend struct EventPathParams; - - // The ClusterId, AttributeId and EventId are MEIs, - // 0xFFFF is not a valid manufacturer code, thus 0xFFFF'FFFF is not a valid MEI - static constexpr ClusterId kInvalidClusterId = 0xFFFF'FFFF; - static constexpr AttributeId kInvalidAttributeId = 0xFFFF'FFFF; - static constexpr EventId kInvalidEventId = 0xFFFF'FFFF; - public: bool IsAttributePathSupersetOf(const ClusterInfo & other) const { diff --git a/src/app/EventPathParams.h b/src/app/EventPathParams.h index 32420970b40e30..7a3675a372bd41 100644 --- a/src/app/EventPathParams.h +++ b/src/app/EventPathParams.h @@ -41,12 +41,12 @@ struct EventPathParams bool IsValidEventPath() const { return !(HasWildcardClusterId() && !HasWildcardEventId()); } inline bool HasWildcardEndpointId() const { return mEndpointId == kInvalidEndpointId; } - inline bool HasWildcardClusterId() const { return mClusterId == ClusterInfo::kInvalidClusterId; } - inline bool HasWildcardEventId() const { return mEventId == ClusterInfo::kInvalidEventId; } + inline bool HasWildcardClusterId() const { return mClusterId == kInvalidClusterId; } + inline bool HasWildcardEventId() const { return mEventId == kInvalidEventId; } EndpointId mEndpointId = kInvalidEndpointId; - ClusterId mClusterId = ClusterInfo::kInvalidClusterId; - EventId mEventId = ClusterInfo::kInvalidEventId; + ClusterId mClusterId = kInvalidClusterId; + EventId mEventId = kInvalidEventId; }; } // namespace app } // namespace chip diff --git a/src/app/tests/TestClusterInfo.cpp b/src/app/tests/TestClusterInfo.cpp index 951ae8da191f5d..0c007cdf284833 100644 --- a/src/app/tests/TestClusterInfo.cpp +++ b/src/app/tests/TestClusterInfo.cpp @@ -99,11 +99,11 @@ void TestAttributePathIncludedDifferentClusterId(nlTestSuite * apSuite, void * a } /* -{ClusterInfo::kInvalidEndpointId, ClusterInfo::kInvalidClusterId, ClusterInfo::kInvalidEventId}, -{ClusterInfo::kInvalidEndpointId, MockClusterId(1), ClusterInfo::kInvalidEventId}, -{ClusterInfo::kInvalidEndpointId, MockClusterId(1), MockEventId(1)}, -{kMockEndpoint1, ClusterInfo::kInvalidClusterId, ClusterInfo::kInvalidEventId}, -{kMockEndpoint1, MockClusterId(1), ClusterInfo::kInvalidEventId}, +{kInvalidEndpointId, kInvalidClusterId, kInvalidEventId}, +{kInvalidEndpointId, MockClusterId(1), kInvalidEventId}, +{kInvalidEndpointId, MockClusterId(1), MockEventId(1)}, +{kMockEndpoint1, kInvalidClusterId, kInvalidEventId}, +{kMockEndpoint1, MockClusterId(1), kInvalidEventId}, {kMockEndpoint1, MockClusterId(1), MockEventId(1)}, */ chip::app::ClusterInfo validEventpaths[6]; diff --git a/src/app/tests/suites/TestBasicInformation.yaml b/src/app/tests/suites/TestBasicInformation.yaml index e964cb8c09cd4b..78b396892e7a72 100644 --- a/src/app/tests/suites/TestBasicInformation.yaml +++ b/src/app/tests/suites/TestBasicInformation.yaml @@ -46,3 +46,32 @@ tests: attribute: "location" arguments: value: "" + + - label: "Read AttributeList value" + command: "readAttribute" + attribute: "AttributeList" + response: + value: + [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 0xFFFB, + 0xFFFD, + ] diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 333df9d0f79fca..c7a59776b3bdd9 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -250,6 +250,84 @@ CHIP_ERROR SendFailureStatus(const ConcreteAttributePath & aPath, AttributeRepor return aAttributeReport.EndOfAttributeReportIB().GetError(); } +// This reader should never actually be registered; we do manual dispatch to it +// for the one attribute it handles. +class MandatoryGlobalAttributeReader : public AttributeAccessInterface +{ +public: + MandatoryGlobalAttributeReader(const EmberAfCluster * aCluster) : + AttributeAccessInterface(MakeOptional(kInvalidEndpointId), kInvalidClusterId), mCluster(aCluster) + {} + +protected: + const EmberAfCluster * mCluster; +}; + +class AttributeListReader : public MandatoryGlobalAttributeReader +{ +public: + AttributeListReader(const EmberAfCluster * aCluster) : MandatoryGlobalAttributeReader(aCluster) {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +CHIP_ERROR AttributeListReader::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + // The id of AttributeList is not in the attribute metadata. + // TODO: This does not play nicely with wildcard reads. Need to fix ZAP to + // put it in the metadata, or fix wildcard expansion to add it. + return aEncoder.EncodeList([this](const auto & encoder) { + constexpr AttributeId ourId = Clusters::Globals::Attributes::AttributeList::Id; + const size_t count = mCluster->attributeCount; + bool addedOurId = false; + for (size_t i = 0; i < count; ++i) + { + AttributeId id = mCluster->attributes[i].attributeId; + if (!addedOurId && id > ourId) + { + ReturnErrorOnFailure(encoder.Encode(ourId)); + addedOurId = true; + } + ReturnErrorOnFailure(encoder.Encode(id)); + } + if (!addedOurId) + { + ReturnErrorOnFailure(encoder.Encode(ourId)); + } + return CHIP_NO_ERROR; + }); +} + +// Helper function for trying to read an attribute value via an +// AttributeAccessInterface. On failure, the read has failed. On success, the +// aTriedEncode outparam is set to whether the AttributeAccessInterface tried to encode a value. +CHIP_ERROR ReadViaAccessInterface(FabricIndex aAccessingFabricIndex, const ConcreteReadAttributePath & aPath, + AttributeReportIBs::Builder & aAttributeReports, + AttributeValueEncoder::AttributeEncodeState * aEncoderState, + AttributeAccessInterface * aAccessInterface, bool * aTriedEncode) +{ + // TODO: We should probably clone the writer and convert failures here + // into status responses, unless our caller already does that. + AttributeValueEncoder::AttributeEncodeState state = + (aEncoderState == nullptr ? AttributeValueEncoder::AttributeEncodeState() : *aEncoderState); + AttributeValueEncoder valueEncoder(aAttributeReports, aAccessingFabricIndex, aPath, kTemporaryDataVersion, state); + CHIP_ERROR err = aAccessInterface->Read(aPath, valueEncoder); + + if (err != CHIP_NO_ERROR) + { + // If the err is not CHIP_NO_ERROR, means the encoding was aborted, then the valueEncoder may save its state. + // The state is used by list chunking feature for now. + if (aEncoderState != nullptr) + { + *aEncoderState = valueEncoder.GetState(); + } + return err; + } + + *aTriedEncode = valueEncoder.TriedEncode(); + return CHIP_NO_ERROR; +} + } // anonymous namespace CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const ConcreteReadAttributePath & aPath, @@ -260,6 +338,22 @@ CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const Concre "Reading attribute: Cluster=" ChipLogFormatMEI " Endpoint=%" PRIx16 " AttributeId=" ChipLogFormatMEI, ChipLogValueMEI(aPath.mClusterId), aPath.mEndpointId, ChipLogValueMEI(aPath.mAttributeId)); + if (aPath.mAttributeId == Clusters::Globals::Attributes::AttributeList::Id) + { + // This is not in our attribute metadata, so we just check for this + // endpoint+cluster existing. + EmberAfCluster * cluster = emberAfFindCluster(aPath.mEndpointId, aPath.mClusterId, CLUSTER_MASK_SERVER); + if (cluster) + { + AttributeListReader reader(cluster); + bool ignored; // Our reader always tries to encode + return ReadViaAccessInterface(aAccessingFabricIndex, aPath, aAttributeReports, apEncoderState, &reader, &ignored); + } + + // else to save codesize just fall through and do the metadata search + // (which we know will fail and error out); + } + EmberAfAttributeMetadata * attributeMetadata = emberAfLocateAttributeMetadata(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, CLUSTER_MASK_SERVER, 0); @@ -277,27 +371,11 @@ CHIP_ERROR ReadSingleClusterData(FabricIndex aAccessingFabricIndex, const Concre // The AttributeValueEncoder may encode more than one AttributeReportIB for the list chunking feature. if (attrOverride != nullptr) { - // TODO: We should probably clone the writer and convert failures here - // into status responses, unless our caller already does that. - AttributeValueEncoder::AttributeEncodeState state = - (apEncoderState == nullptr ? AttributeValueEncoder::AttributeEncodeState() : *apEncoderState); - AttributeValueEncoder valueEncoder(aAttributeReports, aAccessingFabricIndex, - ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), - kTemporaryDataVersion, state); - CHIP_ERROR err = attrOverride->Read(aPath, valueEncoder); - - if (err != CHIP_NO_ERROR) - { - // If the err is not CHIP_NO_ERROR, means the encoding was aborted, then the valueEncoder may save its state. - // The state is used by list chunking feature for now. - if (apEncoderState != nullptr) - { - *apEncoderState = valueEncoder.GetState(); - } - return err; - } + bool triedEncode; + ReturnErrorOnFailure( + ReadViaAccessInterface(aAccessingFabricIndex, aPath, aAttributeReports, apEncoderState, attrOverride, &triedEncode)); - if (valueEncoder.TriedEncode()) + if (triedEncode) { return CHIP_NO_ERROR; } diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 1d7cdbbdf80172..d4f92c9e4bf6af 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -30,6 +30,7 @@ const ChipTypesHelper = require('../../common/ChipTypesHelper.js'); // This list of attributes is taken from section '11.2. Global Attributes' of the // Data Model specification. const kGlobalAttributes = [ + 0xfffb, // AttributeList 0xfffc, // ClusterRevision 0xfffd, // FeatureMap ]; diff --git a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml index 8f5baa215188eb..08ed276366c0ad 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml @@ -20,5 +20,7 @@ limitations under the License. ClusterRevision FeatureMap FeatureMap + AttributeList + diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 51bd5a903d6696..a914f0ad34aa73 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -135,6 +135,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -284,6 +299,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -517,6 +547,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -693,6 +738,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -790,6 +850,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1117,6 +1192,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1214,6 +1304,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1326,6 +1431,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1395,6 +1515,21 @@ "enabled": 0, "commands": [], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1477,6 +1612,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1671,6 +1821,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2042,6 +2207,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2136,6 +2316,21 @@ } ], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2227,6 +2422,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2294,6 +2504,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2811,6 +3036,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3003,6 +3243,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3200,6 +3455,21 @@ } ], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3268,7 +3538,23 @@ "outgoing": 0 } ], - "attributes": [] + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] }, { "name": "General Diagnostics", @@ -3425,6 +3711,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -3561,6 +3862,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4592,9 +4908,24 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -4868,6 +5199,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -5094,6 +5440,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -5161,6 +5522,21 @@ "enabled": 0, "commands": [], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5258,6 +5634,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -5395,6 +5786,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5628,6 +6034,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5710,6 +6131,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5777,6 +6213,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5844,6 +6295,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5980,6 +6446,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -6342,6 +6823,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "NumberOfLogRecordsSupported", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "EnableLogging", "code": 32, @@ -6687,6 +7183,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -7066,6 +7577,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -7210,6 +7736,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -7637,6 +8178,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -8047,6 +8603,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -8159,6 +8730,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9144,6 +9730,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9250,23 +9851,38 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LightSensorType", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LightSensorType", - "code": 4, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", - "reportable": 1, + "defaultValue": "", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9383,6 +9999,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9525,6 +10156,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9637,6 +10283,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9749,6 +10410,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -9846,6 +10522,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10066,6 +10757,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10197,6 +10903,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10282,6 +11003,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10632,6 +11368,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10747,6 +11498,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10808,6 +11574,21 @@ "enabled": 0, "commands": [], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10878,6 +11659,21 @@ } ], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -10994,6 +11790,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -11093,6 +11904,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -11208,6 +12034,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -11374,6 +12215,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -11452,6 +12308,21 @@ } ], "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -12868,6 +13739,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -13085,6 +13971,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -13115,5 +14016,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/src/controller/java/templates/ClusterInfo-java.zapt b/src/controller/java/templates/ClusterInfo-java.zapt index 565bba2f243b44..7440c4188c51b4 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -240,7 +240,7 @@ public class ClusterInfoMapping { {{/if}} - public static class Delegated{{asUpperCamelCase name}}AttributeCallback implements ChipClusters.{{asUpperCamelCase ../name}}Cluster.{{asUpperCamelCase name}}AttributeCallback, DelegatedClusterCallback { + public static class Delegated{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback implements ChipClusters.{{asUpperCamelCase ../name}}Cluster.{{asUpperCamelCase name}}AttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { diff --git a/src/controller/java/templates/ClusterInfo-read-interaction.zapt b/src/controller/java/templates/ClusterInfo-read-interaction.zapt index da80b5f9a294fa..d4162f580d3105 100644 --- a/src/controller/java/templates/ClusterInfo-read-interaction.zapt +++ b/src/controller/java/templates/ClusterInfo-read-interaction.zapt @@ -30,7 +30,7 @@ public class ClusterReadMapping { ); }, {{#if isList}} - () -> new ClusterInfoMapping.Delegated{{asUpperCamelCase name}}AttributeCallback(), + () -> new ClusterInfoMapping.Delegated{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback(), {{else}} () -> new ClusterInfoMapping.Delegated{{convertAttributeCallbackTypeToJavaName chipCallback.type}}AttributeCallback(), {{/if}} diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 3324cff379a38c..fa05d92719dee4 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -27,11 +27,15 @@ typedef void (*CHIPAccessControlClusterAclAttributeCallbackType)( void *, const chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo::DecodableType &); typedef void (*CHIPAccessControlClusterExtensionAttributeCallbackType)( void *, const chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo::DecodableType &); +typedef void (*CHIPAccessControlClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::AccessControl::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPAccessControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::AccessControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPAccountLoginClusterGetSetupPINResponseCallbackType)( void *, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &); +typedef void (*CHIPAccountLoginClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::AccountLogin::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPAccountLoginClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -41,6 +45,8 @@ typedef void (*CHIPAdministratorCommissioningClusterAdminFabricIndexAttributeCal void *, chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo::DecodableArgType); typedef void (*CHIPAdministratorCommissioningClusterAdminVendorIdAttributeCallbackType)( void *, chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo::DecodableArgType); +typedef void (*CHIPAdministratorCommissioningClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPAdministratorCommissioningClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -58,6 +64,8 @@ typedef void (*CHIPApplicationBasicClusterCatalogVendorIdAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::CatalogVendorId::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationBasicClusterApplicationStatusAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationStatus::TypeInfo::DecodableArgType); +typedef void (*CHIPApplicationBasicClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPApplicationBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationLauncherClusterLaunchAppResponseCallbackType)( @@ -69,6 +77,8 @@ typedef void (*CHIPApplicationLauncherClusterCatalogVendorIdAttributeCallbackTyp void *, chip::app::Clusters::ApplicationLauncher::Attributes::CatalogVendorId::TypeInfo::DecodableArgType); typedef void (*CHIPApplicationLauncherClusterApplicationIdAttributeCallbackType)( void *, chip::app::Clusters::ApplicationLauncher::Attributes::ApplicationId::TypeInfo::DecodableArgType); +typedef void (*CHIPApplicationLauncherClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPApplicationLauncherClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -76,6 +86,8 @@ typedef void (*CHIPAudioOutputClusterAudioOutputListAttributeCallbackType)( void *, const chip::app::Clusters::AudioOutput::Attributes::AudioOutputList::TypeInfo::DecodableType &); typedef void (*CHIPAudioOutputClusterCurrentAudioOutputAttributeCallbackType)( void *, chip::app::Clusters::AudioOutput::Attributes::CurrentAudioOutput::TypeInfo::DecodableArgType); +typedef void (*CHIPAudioOutputClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::AudioOutput::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPAudioOutputClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -87,6 +99,8 @@ typedef void (*CHIPBarrierControlClusterBarrierCapabilitiesAttributeCallbackType void *, chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::TypeInfo::DecodableArgType); typedef void (*CHIPBarrierControlClusterBarrierPositionAttributeCallbackType)( void *, chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::TypeInfo::DecodableArgType); +typedef void (*CHIPBarrierControlClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::BarrierControl::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBarrierControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -128,6 +142,8 @@ typedef void (*CHIPBasicClusterReachableAttributeCallbackType)( void *, chip::app::Clusters::Basic::Attributes::Reachable::TypeInfo::DecodableArgType); typedef void (*CHIPBasicClusterUniqueIDAttributeCallbackType)( void *, chip::app::Clusters::Basic::Attributes::UniqueID::TypeInfo::DecodableArgType); +typedef void (*CHIPBasicClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Basic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Basic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -137,14 +153,20 @@ typedef void (*CHIPBinaryInputBasicClusterPresentValueAttributeCallbackType)( void *, chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo::DecodableArgType); typedef void (*CHIPBinaryInputBasicClusterStatusFlagsAttributeCallbackType)( void *, chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::TypeInfo::DecodableArgType); +typedef void (*CHIPBinaryInputBasicClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBinaryInputBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPBindingClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Binding::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBindingClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Binding::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPBooleanStateClusterStateValueAttributeCallbackType)( void *, chip::app::Clusters::BooleanState::Attributes::StateValue::TypeInfo::DecodableArgType); +typedef void (*CHIPBooleanStateClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::BooleanState::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBooleanStateClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BooleanState::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -154,9 +176,13 @@ typedef void (*CHIPBridgedActionsClusterEndpointListAttributeCallbackType)( void *, const chip::app::Clusters::BridgedActions::Attributes::EndpointList::TypeInfo::DecodableType &); typedef void (*CHIPBridgedActionsClusterSetupUrlAttributeCallbackType)( void *, chip::app::Clusters::BridgedActions::Attributes::SetupUrl::TypeInfo::DecodableArgType); +typedef void (*CHIPBridgedActionsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::BridgedActions::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBridgedActionsClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BridgedActions::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPBridgedDeviceBasicClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::BridgedDeviceBasic::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPBridgedDeviceBasicClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -264,6 +290,8 @@ typedef void (*CHIPColorControlClusterCoupleColorTempToLevelMinMiredsAttributeCa void *, chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo::DecodableArgType); typedef void (*CHIPColorControlClusterStartUpColorTemperatureMiredsAttributeCallbackType)( void *, chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableArgType); +typedef void (*CHIPColorControlClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ColorControl::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPColorControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ColorControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPContentLauncherClusterLaunchContentResponseCallbackType)( @@ -275,6 +303,8 @@ typedef void (*CHIPContentLauncherClusterAcceptsHeaderListAttributeCallbackType) void *, const chip::app::Clusters::ContentLauncher::Attributes::AcceptsHeaderList::TypeInfo::DecodableType &); typedef void (*CHIPContentLauncherClusterSupportedStreamingTypesAttributeCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo::DecodableType &); +typedef void (*CHIPContentLauncherClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ContentLauncher::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPContentLauncherClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -286,11 +316,15 @@ typedef void (*CHIPDescriptorClusterClientListAttributeCallbackType)( void *, const chip::app::Clusters::Descriptor::Attributes::ClientList::TypeInfo::DecodableType &); typedef void (*CHIPDescriptorClusterPartsListAttributeCallbackType)( void *, const chip::app::Clusters::Descriptor::Attributes::PartsList::TypeInfo::DecodableType &); +typedef void (*CHIPDescriptorClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Descriptor::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPDescriptorClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackType)( void *, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &); +typedef void (*CHIPDiagnosticLogsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPDoorLockClusterGetHolidayScheduleResponseCallbackType)( void *, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &); typedef void (*CHIPDoorLockClusterGetLogRecordResponseCallbackType)( @@ -312,6 +346,8 @@ typedef void (*CHIPDoorLockClusterLockTypeAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::LockType::TypeInfo::DecodableArgType); typedef void (*CHIPDoorLockClusterActuatorEnabledAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::TypeInfo::DecodableArgType); +typedef void (*CHIPDoorLockClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::DoorLock::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPDoorLockClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -337,6 +373,8 @@ typedef void (*CHIPElectricalMeasurementClusterActivePowerMinAttributeCallbackTy void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo::DecodableArgType); typedef void (*CHIPElectricalMeasurementClusterActivePowerMaxAttributeCallbackType)( void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo::DecodableArgType); +typedef void (*CHIPElectricalMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPElectricalMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -358,6 +396,8 @@ typedef void (*CHIPEthernetNetworkDiagnosticsClusterCarrierDetectAttributeCallba void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo::DecodableArgType); typedef void (*CHIPEthernetNetworkDiagnosticsClusterTimeSinceResetAttributeCallbackType)( void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo::DecodableArgType); +typedef void (*CHIPEthernetNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPEthernetNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPEthernetNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( @@ -365,6 +405,8 @@ typedef void (*CHIPEthernetNetworkDiagnosticsClusterClusterRevisionAttributeCall typedef void (*CHIPFixedLabelClusterLabelListAttributeCallbackType)( void *, const chip::app::Clusters::FixedLabel::Attributes::LabelList::TypeInfo::DecodableType &); +typedef void (*CHIPFixedLabelClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::FixedLabel::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPFixedLabelClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -376,6 +418,8 @@ typedef void (*CHIPFlowMeasurementClusterMaxMeasuredValueAttributeCallbackType)( void *, chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPFlowMeasurementClusterToleranceAttributeCallbackType)( void *, chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); +typedef void (*CHIPFlowMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPFlowMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackType)( @@ -393,6 +437,8 @@ typedef void (*CHIPGeneralCommissioningClusterRegulatoryConfigAttributeCallbackT void *, chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo::DecodableArgType); typedef void (*CHIPGeneralCommissioningClusterLocationCapabilityAttributeCallbackType)( void *, chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::TypeInfo::DecodableArgType); +typedef void (*CHIPGeneralCommissioningClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPGeneralCommissioningClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -412,6 +458,8 @@ typedef void (*CHIPGeneralDiagnosticsClusterActiveRadioFaultsAttributeCallbackTy void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo::DecodableType &); typedef void (*CHIPGeneralDiagnosticsClusterActiveNetworkFaultsAttributeCallbackType)( void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo::DecodableType &); +typedef void (*CHIPGeneralDiagnosticsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPGeneralDiagnosticsClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -419,6 +467,8 @@ typedef void (*CHIPGroupKeyManagementClusterGroupsAttributeCallbackType)( void *, const chip::app::Clusters::GroupKeyManagement::Attributes::Groups::TypeInfo::DecodableType &); typedef void (*CHIPGroupKeyManagementClusterGroupKeysAttributeCallbackType)( void *, const chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeys::TypeInfo::DecodableType &); +typedef void (*CHIPGroupKeyManagementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPGroupKeyManagementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPGroupsClusterAddGroupResponseCallbackType)( @@ -432,6 +482,8 @@ typedef void (*CHIPGroupsClusterViewGroupResponseCallbackType)( typedef void (*CHIPGroupsClusterNameSupportAttributeCallbackType)( void *, chip::app::Clusters::Groups::Attributes::NameSupport::TypeInfo::DecodableArgType); +typedef void (*CHIPGroupsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Groups::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPGroupsClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Groups::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPIdentifyClusterIdentifyQueryResponseCallbackType)( @@ -441,6 +493,8 @@ typedef void (*CHIPIdentifyClusterIdentifyTimeAttributeCallbackType)( void *, chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo::DecodableArgType); typedef void (*CHIPIdentifyClusterIdentifyTypeAttributeCallbackType)( void *, chip::app::Clusters::Identify::Attributes::IdentifyType::TypeInfo::DecodableArgType); +typedef void (*CHIPIdentifyClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Identify::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPIdentifyClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Identify::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -454,11 +508,15 @@ typedef void (*CHIPIlluminanceMeasurementClusterToleranceAttributeCallbackType)( void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); typedef void (*CHIPIlluminanceMeasurementClusterLightSensorTypeAttributeCallbackType)( void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo::DecodableArgType); +typedef void (*CHIPIlluminanceMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPIlluminanceMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPKeypadInputClusterSendKeyResponseCallbackType)( void *, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType &); +typedef void (*CHIPKeypadInputClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::KeypadInput::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPKeypadInputClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -490,9 +548,13 @@ typedef void (*CHIPLevelControlClusterDefaultMoveRateAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterStartUpCurrentLevelAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableArgType); +typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); +typedef void (*CHIPLowPowerClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::LowPower::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPLowPowerClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LowPower::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -500,6 +562,8 @@ typedef void (*CHIPMediaInputClusterMediaInputListAttributeCallbackType)( void *, const chip::app::Clusters::MediaInput::Attributes::MediaInputList::TypeInfo::DecodableType &); typedef void (*CHIPMediaInputClusterCurrentMediaInputAttributeCallbackType)( void *, chip::app::Clusters::MediaInput::Attributes::CurrentMediaInput::TypeInfo::DecodableArgType); +typedef void (*CHIPMediaInputClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::MediaInput::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPMediaInputClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::MediaInput::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPMediaPlaybackClusterMediaFastForwardResponseCallbackType)( @@ -541,6 +605,8 @@ typedef void (*CHIPMediaPlaybackClusterSeekRangeEndAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::TypeInfo::DecodableArgType); typedef void (*CHIPMediaPlaybackClusterSeekRangeStartAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::TypeInfo::DecodableArgType); +typedef void (*CHIPMediaPlaybackClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::MediaPlayback::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPMediaPlaybackClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -554,6 +620,8 @@ typedef void (*CHIPModeSelectClusterStartUpModeAttributeCallbackType)( void *, chip::app::Clusters::ModeSelect::Attributes::StartUpMode::TypeInfo::DecodableArgType); typedef void (*CHIPModeSelectClusterDescriptionAttributeCallbackType)( void *, chip::app::Clusters::ModeSelect::Attributes::Description::TypeInfo::DecodableArgType); +typedef void (*CHIPModeSelectClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ModeSelect::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPModeSelectClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPNetworkCommissioningClusterAddThreadNetworkResponseCallbackType)( @@ -573,6 +641,8 @@ typedef void (*CHIPNetworkCommissioningClusterUpdateThreadNetworkResponseCallbac typedef void (*CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseCallbackType)( void *, const chip::app::Clusters::NetworkCommissioning::Commands::UpdateWiFiNetworkResponse::DecodableType &); +typedef void (*CHIPNetworkCommissioningClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPNetworkCommissioningClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPNetworkCommissioningClusterClusterRevisionAttributeCallbackType)( @@ -582,6 +652,8 @@ typedef void (*CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackTy typedef void (*CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackType)( void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &); +typedef void (*CHIPOtaSoftwareUpdateProviderClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOtaSoftwareUpdateProviderClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -589,6 +661,8 @@ typedef void (*CHIPOtaSoftwareUpdateRequestorClusterDefaultOtaProviderAttributeC void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProvider::TypeInfo::DecodableArgType); typedef void (*CHIPOtaSoftwareUpdateRequestorClusterUpdatePossibleAttributeCallbackType)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo::DecodableArgType); +typedef void (*CHIPOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOtaSoftwareUpdateRequestorClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -598,6 +672,8 @@ typedef void (*CHIPOccupancySensingClusterOccupancySensorTypeAttributeCallbackTy void *, chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::TypeInfo::DecodableArgType); typedef void (*CHIPOccupancySensingClusterOccupancySensorTypeBitmapAttributeCallbackType)( void *, chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo::DecodableArgType); +typedef void (*CHIPOccupancySensingClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OccupancySensing::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOccupancySensingClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -611,6 +687,8 @@ typedef void (*CHIPOnOffClusterOffWaitTimeAttributeCallbackType)( void *, chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo::DecodableArgType); typedef void (*CHIPOnOffClusterStartUpOnOffAttributeCallbackType)( void *, chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo::DecodableArgType); +typedef void (*CHIPOnOffClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OnOff::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOnOffClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::OnOff::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPOnOffClusterClusterRevisionAttributeCallbackType)( @@ -620,6 +698,8 @@ typedef void (*CHIPOnOffSwitchConfigurationClusterSwitchTypeAttributeCallbackTyp void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo::DecodableArgType); typedef void (*CHIPOnOffSwitchConfigurationClusterSwitchActionsAttributeCallbackType)( void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo::DecodableArgType); +typedef void (*CHIPOnOffSwitchConfigurationClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOnOffSwitchConfigurationClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPOperationalCredentialsClusterAttestationResponseCallbackType)( @@ -641,6 +721,8 @@ typedef void (*CHIPOperationalCredentialsClusterTrustedRootCertificatesAttribute void *, const chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterCurrentFabricIndexAttributeCallbackType)( void *, chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo::DecodableArgType); +typedef void (*CHIPOperationalCredentialsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -662,6 +744,8 @@ typedef void (*CHIPPowerSourceClusterActiveBatteryFaultsAttributeCallbackType)( void *, const chip::app::Clusters::PowerSource::Attributes::ActiveBatteryFaults::TypeInfo::DecodableType &); typedef void (*CHIPPowerSourceClusterBatteryChargeStateAttributeCallbackType)( void *, chip::app::Clusters::PowerSource::Attributes::BatteryChargeState::TypeInfo::DecodableArgType); +typedef void (*CHIPPowerSourceClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::PowerSource::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPPowerSourceClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::PowerSource::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPPowerSourceClusterClusterRevisionAttributeCallbackType)( @@ -669,6 +753,8 @@ typedef void (*CHIPPowerSourceClusterClusterRevisionAttributeCallbackType)( typedef void (*CHIPPowerSourceConfigurationClusterSourcesAttributeCallbackType)( void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::TypeInfo::DecodableType &); +typedef void (*CHIPPowerSourceConfigurationClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPPowerSourceConfigurationClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -678,6 +764,8 @@ typedef void (*CHIPPressureMeasurementClusterMinMeasuredValueAttributeCallbackTy void *, chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPPressureMeasurementClusterMaxMeasuredValueAttributeCallbackType)( void *, chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPPressureMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -729,6 +817,8 @@ typedef void (*CHIPPumpConfigurationAndControlClusterControlModeAttributeCallbac void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo::DecodableArgType); typedef void (*CHIPPumpConfigurationAndControlClusterAlarmMaskAttributeCallbackType)( void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo::DecodableArgType); +typedef void (*CHIPPumpConfigurationAndControlClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPPumpConfigurationAndControlClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPPumpConfigurationAndControlClusterClusterRevisionAttributeCallbackType)( @@ -742,6 +832,8 @@ typedef void (*CHIPRelativeHumidityMeasurementClusterMaxMeasuredValueAttributeCa void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPRelativeHumidityMeasurementClusterToleranceAttributeCallbackType)( void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); +typedef void (*CHIPRelativeHumidityMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPRelativeHumidityMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPScenesClusterAddSceneResponseCallbackType)( @@ -767,6 +859,8 @@ typedef void (*CHIPScenesClusterSceneValidAttributeCallbackType)( void *, chip::app::Clusters::Scenes::Attributes::SceneValid::TypeInfo::DecodableArgType); typedef void (*CHIPScenesClusterNameSupportAttributeCallbackType)( void *, chip::app::Clusters::Scenes::Attributes::NameSupport::TypeInfo::DecodableArgType); +typedef void (*CHIPScenesClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Scenes::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPScenesClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::Scenes::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -778,6 +872,8 @@ typedef void (*CHIPSoftwareDiagnosticsClusterCurrentHeapUsedAttributeCallbackTyp void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo::DecodableArgType); typedef void (*CHIPSoftwareDiagnosticsClusterCurrentHeapHighWatermarkAttributeCallbackType)( void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableArgType); +typedef void (*CHIPSoftwareDiagnosticsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPSoftwareDiagnosticsClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPSoftwareDiagnosticsClusterClusterRevisionAttributeCallbackType)( @@ -789,6 +885,8 @@ typedef void (*CHIPSwitchClusterCurrentPositionAttributeCallbackType)( void *, chip::app::Clusters::Switch::Attributes::CurrentPosition::TypeInfo::DecodableArgType); typedef void (*CHIPSwitchClusterMultiPressMaxAttributeCallbackType)( void *, chip::app::Clusters::Switch::Attributes::MultiPressMax::TypeInfo::DecodableArgType); +typedef void (*CHIPSwitchClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Switch::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPSwitchClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::Switch::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPSwitchClusterClusterRevisionAttributeCallbackType)( @@ -802,6 +900,8 @@ typedef void (*CHIPTvChannelClusterTvChannelLineupAttributeCallbackType)( void *, chip::app::Clusters::TvChannel::Attributes::TvChannelLineup::TypeInfo::DecodableArgType); typedef void (*CHIPTvChannelClusterCurrentTvChannelAttributeCallbackType)( void *, chip::app::Clusters::TvChannel::Attributes::CurrentTvChannel::TypeInfo::DecodableArgType); +typedef void (*CHIPTvChannelClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::TvChannel::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTvChannelClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::TvChannel::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( @@ -809,6 +909,8 @@ typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( typedef void (*CHIPTargetNavigatorClusterTargetNavigatorListAttributeCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo::DecodableType &); +typedef void (*CHIPTargetNavigatorClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::TargetNavigator::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTargetNavigatorClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -820,6 +922,8 @@ typedef void (*CHIPTemperatureMeasurementClusterMaxMeasuredValueAttributeCallbac void *, chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPTemperatureMeasurementClusterToleranceAttributeCallbackType)( void *, chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); +typedef void (*CHIPTemperatureMeasurementClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTemperatureMeasurementClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo::DecodableArgType); typedef void (*CHIPTestClusterClusterBooleanResponseCallbackType)( @@ -993,6 +1097,8 @@ typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt16uAttributeCallb void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo::DecodableArgType); typedef void (*CHIPTestClusterClusterNullableRangeRestrictedInt16sAttributeCallbackType)( void *, chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo::DecodableArgType); +typedef void (*CHIPTestClusterClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::TestCluster::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPTestClusterClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::TestCluster::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -1030,6 +1136,8 @@ typedef void (*CHIPThermostatClusterNumberOfWeeklyTransitionsAttributeCallbackTy void *, chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterNumberOfDailyTransitionsAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo::DecodableArgType); +typedef void (*CHIPThermostatClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::Thermostat::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPThermostatClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::Thermostat::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPThermostatClusterClusterRevisionAttributeCallbackType)( @@ -1044,6 +1152,8 @@ typedef void (*CHIPThermostatUserInterfaceConfigurationClusterScheduleProgrammin void *, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo:: DecodableArgType); +typedef void (*CHIPThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPThermostatUserInterfaceConfigurationClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -1175,6 +1285,8 @@ typedef void (*CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponentsAt const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo::DecodableType &); typedef void (*CHIPThreadNetworkDiagnosticsClusterActiveNetworkFaultsListAttributeCallbackType)( void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo::DecodableType &); +typedef void (*CHIPThreadNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPThreadNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPThreadNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( @@ -1182,6 +1294,8 @@ typedef void (*CHIPThreadNetworkDiagnosticsClusterClusterRevisionAttributeCallba typedef void (*CHIPWakeOnLanClusterWakeOnLanMacAddressAttributeCallbackType)( void *, chip::app::Clusters::WakeOnLan::Attributes::WakeOnLanMacAddress::TypeInfo::DecodableArgType); +typedef void (*CHIPWakeOnLanClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::WakeOnLan::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPWakeOnLanClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::TypeInfo::DecodableArgType); @@ -1211,6 +1325,8 @@ typedef void (*CHIPWiFiNetworkDiagnosticsClusterCurrentMaxRateAttributeCallbackT void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo::DecodableArgType); typedef void (*CHIPWiFiNetworkDiagnosticsClusterOverrunCountAttributeCallbackType)( void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo::DecodableArgType); +typedef void (*CHIPWiFiNetworkDiagnosticsClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPWiFiNetworkDiagnosticsClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPWiFiNetworkDiagnosticsClusterClusterRevisionAttributeCallbackType)( @@ -1252,6 +1368,8 @@ typedef void (*CHIPWindowCoveringClusterModeAttributeCallbackType)( void *, chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo::DecodableArgType); typedef void (*CHIPWindowCoveringClusterSafetyStatusAttributeCallbackType)( void *, chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::TypeInfo::DecodableArgType); +typedef void (*CHIPWindowCoveringClusterAttributeListAttributeCallbackType)( + void *, const chip::app::Clusters::WindowCovering::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPWindowCoveringClusterFeatureMapAttributeCallbackType)( void *, chip::app::Clusters::WindowCovering::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPWindowCoveringClusterClusterRevisionAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 33424bf5b8ab96..86c7c6fcef6831 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -100,6 +100,41 @@ JNI_METHOD(void, AccessControlCluster, readExtensionAttribute)(JNIEnv * env, job onFailure.release(); } +JNI_METHOD(void, AccessControlCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::AttributeList::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::AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, AccessControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -134,6 +169,41 @@ JNI_METHOD(void, AccessControlCluster, readClusterRevisionAttribute)(JNIEnv * en onFailure.release(); } +JNI_METHOD(void, AccountLoginCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::AccountLogin::Attributes::AttributeList::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::AccountLoginCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, AccountLoginCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -281,6 +351,45 @@ JNI_METHOD(void, AdministratorCommissioningCluster, readAdminVendorIdAttribute) onFailure.release(); } +JNI_METHOD(void, AdministratorCommissioningCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::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::AdministratorCommissioningCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, AdministratorCommissioningCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -570,6 +679,44 @@ JNI_METHOD(void, ApplicationBasicCluster, readApplicationStatusAttribute) onFailure.release(); } +JNI_METHOD(void, ApplicationBasicCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::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::ApplicationBasicCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ApplicationBasicCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -717,6 +864,44 @@ JNI_METHOD(void, ApplicationLauncherCluster, readApplicationIdAttribute) onFailure.release(); } +JNI_METHOD(void, ApplicationLauncherCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::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::ApplicationLauncherCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ApplicationLauncherCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -823,6 +1008,41 @@ JNI_METHOD(void, AudioOutputCluster, readCurrentAudioOutputAttribute) onFailure.release(); } +JNI_METHOD(void, AudioOutputCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::AudioOutput::Attributes::AttributeList::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::AudioOutputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, AudioOutputCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -997,6 +1217,41 @@ JNI_METHOD(void, BarrierControlCluster, readBarrierPositionAttribute) onFailure.release(); } +JNI_METHOD(void, BarrierControlCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::AttributeList::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::BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BarrierControlCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -1681,6 +1936,41 @@ JNI_METHOD(void, BasicCluster, readUniqueIDAttribute)(JNIEnv * env, jobject self onFailure.release(); } +JNI_METHOD(void, BasicCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Basic::Attributes::AttributeList::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::BasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BasicCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -1820,13 +2110,15 @@ JNI_METHOD(void, BinaryInputBasicCluster, readStatusFlagsAttribute)(JNIEnv * env onFailure.release(); } -JNI_METHOD(void, BinaryInputBasicCluster, readClusterRevisionAttribute) +JNI_METHOD(void, BinaryInputBasicCluster, readAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::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)); @@ -1844,7 +2136,7 @@ JNI_METHOD(void, BinaryInputBasicCluster, readClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( + 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); @@ -1856,10 +2148,11 @@ JNI_METHOD(void, BinaryInputBasicCluster, readClusterRevisionAttribute) onFailure.release(); } -JNI_METHOD(void, BindingCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, BinaryInputBasicCluster, readClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; std::unique_ptr onSuccess( chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -1872,14 +2165,84 @@ JNI_METHOD(void, BindingCluster, readClusterRevisionAttribute)(JNIEnv * env, job chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::BindingCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::BinaryInputBasicCluster * 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BindingCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Binding::Attributes::AttributeList::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::BindingCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BindingCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Binding::Attributes::ClusterRevision::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::BindingCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -1924,6 +2287,41 @@ JNI_METHOD(void, BooleanStateCluster, readStateValueAttribute)(JNIEnv * env, job onFailure.release(); } +JNI_METHOD(void, BooleanStateCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::BooleanState::Attributes::AttributeList::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::BooleanStateCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BooleanStateCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -2063,6 +2461,41 @@ JNI_METHOD(void, BridgedActionsCluster, readSetupUrlAttribute)(JNIEnv * env, job onFailure.release(); } +JNI_METHOD(void, BridgedActionsCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::BridgedActions::Attributes::AttributeList::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::BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BridgedActionsCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -2098,6 +2531,44 @@ JNI_METHOD(void, BridgedActionsCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, BridgedDeviceBasicCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::AttributeList::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::BridgedDeviceBasicCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BridgedDeviceBasicCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -3930,6 +4401,41 @@ JNI_METHOD(void, ColorControlCluster, readStartUpColorTemperatureMiredsAttribute onFailure.release(); } +JNI_METHOD(void, ColorControlCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::AttributeList::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::ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ColorControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -4041,6 +4547,43 @@ JNI_METHOD(void, ContentLauncherCluster, readSupportedStreamingTypesAttribute) onFailure.release(); } +JNI_METHOD(void, ContentLauncherCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::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::ContentLauncherCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ContentLauncherCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -4217,12 +4760,13 @@ JNI_METHOD(void, DescriptorCluster, readPartsListAttribute)(JNIEnv * env, jobjec onFailure.release(); } -JNI_METHOD(void, DescriptorCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, DescriptorCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::AttributeList::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)); @@ -4240,7 +4784,7 @@ JNI_METHOD(void, DescriptorCluster, readClusterRevisionAttribute)(JNIEnv * env, env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -4251,12 +4795,12 @@ JNI_METHOD(void, DescriptorCluster, readClusterRevisionAttribute)(JNIEnv * env, onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, readActuatorEnabledAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, DescriptorCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::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)); @@ -4267,14 +4811,14 @@ JNI_METHOD(void, DoorLockCluster, readActuatorEnabledAttribute)(JNIEnv * env, jo chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::DescriptorCluster * 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()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -4285,12 +4829,13 @@ JNI_METHOD(void, DoorLockCluster, readActuatorEnabledAttribute)(JNIEnv * env, jo onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, DiagnosticLogsCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::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)); @@ -4301,14 +4846,14 @@ JNI_METHOD(void, DoorLockCluster, readClusterRevisionAttribute)(JNIEnv * env, jo chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::DiagnosticLogsCluster * 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()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -4319,13 +4864,12 @@ JNI_METHOD(void, DoorLockCluster, readClusterRevisionAttribute)(JNIEnv * env, jo onFailure.release(); } -JNI_METHOD(void, ElectricalMeasurementCluster, readMeasurementTypeAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, DoorLockCluster, readActuatorEnabledAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::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)); @@ -4336,15 +4880,119 @@ JNI_METHOD(void, ElectricalMeasurementCluster, readMeasurementTypeAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ElectricalMeasurementCluster * cppCluster = - reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::DoorLockCluster * 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 successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, DoorLockCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AttributeList::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::DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, DoorLockCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::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::DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ElectricalMeasurementCluster, readMeasurementTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::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::ElectricalMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -4716,6 +5364,44 @@ JNI_METHOD(void, ElectricalMeasurementCluster, readActivePowerMaxAttribute) onFailure.release(); } +JNI_METHOD(void, ElectricalMeasurementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::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::ElectricalMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ElectricalMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -5082,6 +5768,45 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, readTimeSinceResetAttribute) onFailure.release(); } +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::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::EthernetNetworkDiagnosticsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, readFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -5190,6 +5915,41 @@ JNI_METHOD(void, FixedLabelCluster, readLabelListAttribute)(JNIEnv * env, jobjec onFailure.release(); } +JNI_METHOD(void, FixedLabelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::FixedLabel::Attributes::AttributeList::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::FixedLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, FixedLabelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -5366,6 +6126,43 @@ JNI_METHOD(void, FlowMeasurementCluster, readToleranceAttribute)(JNIEnv * env, j onFailure.release(); } +JNI_METHOD(void, FlowMeasurementCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::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::FlowMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, FlowMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -5550,6 +6347,44 @@ JNI_METHOD(void, GeneralCommissioningCluster, readLocationCapabilityAttribute) onFailure.release(); } +JNI_METHOD(void, GeneralCommissioningCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::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::GeneralCommissioningCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, GeneralCommissioningCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -5884,11 +6719,49 @@ JNI_METHOD(void, GeneralDiagnosticsCluster, readActiveNetworkFaultsAttribute) onFailure.release(); } -JNI_METHOD(void, GeneralDiagnosticsCluster, readClusterRevisionAttribute) +JNI_METHOD(void, GeneralDiagnosticsCluster, readAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::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::GeneralDiagnosticsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, GeneralDiagnosticsCluster, readClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; std::unique_ptr onSuccess( chip::Platform::New(callback, false), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, @@ -5992,6 +6865,44 @@ JNI_METHOD(void, GroupKeyManagementCluster, readGroupKeysAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, GroupKeyManagementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::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::GroupKeyManagementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, GroupKeyManagementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -6062,6 +6973,41 @@ JNI_METHOD(void, GroupsCluster, readNameSupportAttribute)(JNIEnv * env, jobject onFailure.release(); } +JNI_METHOD(void, GroupsCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Groups::Attributes::AttributeList::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::GroupsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, GroupsCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -6164,6 +7110,41 @@ JNI_METHOD(void, IdentifyCluster, readIdentifyTypeAttribute)(JNIEnv * env, jobje onFailure.release(); } +JNI_METHOD(void, IdentifyCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Identify::Attributes::AttributeList::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::IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, IdentifyCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -6387,6 +7368,44 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, readLightSensorTypeAttribute) onFailure.release(); } +JNI_METHOD(void, IlluminanceMeasurementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::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::IlluminanceMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, IlluminanceMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -6424,6 +7443,41 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, KeypadInputCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::KeypadInput::Attributes::AttributeList::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::KeypadInputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, KeypadInputCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -6941,6 +7995,41 @@ JNI_METHOD(void, LevelControlCluster, readStartUpCurrentLevelAttribute) onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::AttributeList::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::LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -6975,6 +8064,41 @@ JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, LowPowerCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LowPower::Attributes::AttributeList::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::LowPowerCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LowPowerCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -7078,6 +8202,41 @@ JNI_METHOD(void, MediaInputCluster, readCurrentMediaInputAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, MediaInputCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::MediaInput::Attributes::AttributeList::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::MediaInputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, MediaInputCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -7385,6 +8544,41 @@ JNI_METHOD(void, MediaPlaybackCluster, readSeekRangeStartAttribute)(JNIEnv * env onFailure.release(); } +JNI_METHOD(void, MediaPlaybackCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::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::MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, MediaPlaybackCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -7591,6 +8785,41 @@ JNI_METHOD(void, ModeSelectCluster, readDescriptionAttribute)(JNIEnv * env, jobj onFailure.release(); } +JNI_METHOD(void, ModeSelectCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::AttributeList::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::ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ModeSelectCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -7607,14 +8836,52 @@ JNI_METHOD(void, ModeSelectCluster, readClusterRevisionAttribute)(JNIEnv * env, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, NetworkCommissioningCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::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::NetworkCommissioningCluster * 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 successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -7697,6 +8964,45 @@ JNI_METHOD(void, NetworkCommissioningCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::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::OtaSoftwareUpdateProviderCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -7809,6 +9115,45 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, readUpdatePossibleAttribute) onFailure.release(); } +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::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::OtaSoftwareUpdateRequestorCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -7954,6 +9299,44 @@ JNI_METHOD(void, OccupancySensingCluster, readOccupancySensorTypeBitmapAttribute onFailure.release(); } +JNI_METHOD(void, OccupancySensingCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::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::OccupancySensingCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OccupancySensingCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -8158,6 +9541,41 @@ JNI_METHOD(void, OnOffCluster, readStartUpOnOffAttribute)(JNIEnv * env, jobject onFailure.release(); } +JNI_METHOD(void, OnOffCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OnOff::Attributes::AttributeList::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::OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OnOffCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -8298,6 +9716,45 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, readSwitchActionsAttribute) onFailure.release(); } +JNI_METHOD(void, OnOffSwitchConfigurationCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::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::OnOffSwitchConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OnOffSwitchConfigurationCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -8525,6 +9982,44 @@ JNI_METHOD(void, OperationalCredentialsCluster, readCurrentFabricIndexAttribute) onFailure.release(); } +JNI_METHOD(void, OperationalCredentialsCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::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::OperationalCredentialsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OperationalCredentialsCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -8876,6 +10371,41 @@ JNI_METHOD(void, PowerSourceCluster, readBatteryChargeStateAttribute) onFailure.release(); } +JNI_METHOD(void, PowerSourceCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::AttributeList::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::PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, PowerSourceCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -8970,8 +10500,47 @@ JNI_METHOD(void, PowerSourceConfigurationCluster, readSourcesAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, PowerSourceConfigurationCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::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::PowerSourceConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -9127,6 +10696,44 @@ JNI_METHOD(void, PressureMeasurementCluster, readMaxMeasuredValueAttribute) onFailure.release(); } +JNI_METHOD(void, PressureMeasurementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::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::PressureMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, PressureMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -10049,6 +11656,45 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, readAlarmMaskAttribute) onFailure.release(); } +JNI_METHOD(void, PumpConfigurationAndControlCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::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::PumpConfigurationAndControlCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, PumpConfigurationAndControlCluster, readFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -10270,6 +11916,45 @@ JNI_METHOD(void, RelativeHumidityMeasurementCluster, readToleranceAttribute) onFailure.release(); } +JNI_METHOD(void, RelativeHumidityMeasurementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::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::RelativeHumidityMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, RelativeHumidityMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -10477,6 +12162,41 @@ JNI_METHOD(void, ScenesCluster, readNameSupportAttribute)(JNIEnv * env, jobject onFailure.release(); } +JNI_METHOD(void, ScenesCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Scenes::Attributes::AttributeList::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::ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ScenesCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -10658,6 +12378,44 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, readCurrentHeapHighWatermarkAttribu onFailure.release(); } +JNI_METHOD(void, SoftwareDiagnosticsCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::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::SoftwareDiagnosticsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, SoftwareDiagnosticsCluster, readFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -10832,6 +12590,41 @@ JNI_METHOD(void, SwitchCluster, readMultiPressMaxAttribute)(JNIEnv * env, jobjec onFailure.release(); } +JNI_METHOD(void, SwitchCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Switch::Attributes::AttributeList::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::SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, SwitchCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -11005,6 +12798,41 @@ JNI_METHOD(void, TvChannelCluster, readCurrentTvChannelAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, TvChannelCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TvChannel::Attributes::AttributeList::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::TvChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -11027,8 +12855,46 @@ JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, j chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::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::TargetNavigatorCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -11039,15 +12905,14 @@ JNI_METHOD(void, TvChannelCluster, readClusterRevisionAttribute)(JNIEnv * env, j onFailure.release(); } -JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +JNI_METHOD(void, TargetNavigatorCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo; - std::unique_ptr - onSuccess(chip::Platform::New(callback, false), - chip::Platform::Delete); + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::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)); @@ -11065,8 +12930,8 @@ JNI_METHOD(void, TargetNavigatorCluster, readTargetNavigatorListAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); VerifyOrReturn( @@ -11259,6 +13124,44 @@ JNI_METHOD(void, TemperatureMeasurementCluster, readToleranceAttribute) onFailure.release(); } +JNI_METHOD(void, TemperatureMeasurementCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::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::TemperatureMeasurementCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, TemperatureMeasurementCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -13879,6 +15782,41 @@ JNI_METHOD(void, TestClusterCluster, readNullableRangeRestrictedInt16sAttribute) onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::AttributeList::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::TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, TestClusterCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -14505,6 +16443,41 @@ JNI_METHOD(void, ThermostatCluster, readNumberOfDailyTransitionsAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AttributeList::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::ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -14684,6 +16657,45 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, readScheduleProgra onFailure.release(); } +JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::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::ThermostatUserInterfaceConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, readClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -17043,6 +19055,45 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, readActiveNetworkFaultsListAtt onFailure.release(); } +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::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::ThreadNetworkDiagnosticsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, readFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -17151,6 +19202,41 @@ JNI_METHOD(void, WakeOnLanCluster, readWakeOnLanMacAddressAttribute)(JNIEnv * en onFailure.release(); } +JNI_METHOD(void, WakeOnLanCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::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::WakeOnLanCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, WakeOnLanCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; @@ -17657,6 +19743,44 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, readOverrunCountAttribute) onFailure.release(); } +JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, readAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::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::WiFiNetworkDiagnosticsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, readFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { @@ -18363,6 +20487,41 @@ JNI_METHOD(void, WindowCoveringCluster, readSafetyStatusAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, WindowCoveringCluster, readAttributeListAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::AttributeList::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::WindowCoveringCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, WindowCoveringCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index eaaa6ef6125916..732b9e38730975 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -923,9 +923,9 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccessControlAttributeListAttributeCallback::CHIPAccessControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -942,7 +942,7 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministrat } } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() +CHIPAccessControlAttributeListAttributeCallback::~CHIPAccessControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -953,7 +953,8 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) +void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -961,31 +962,60 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), - javaValueCtorSignature.c_str(), value, javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CHIPApplicationLauncherApplicationLauncherListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAccountLoginAttributeListAttributeCallback::CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1002,7 +1032,7 @@ CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CHIPApplication } } -CHIPApplicationLauncherApplicationLauncherListAttributeCallback::~CHIPApplicationLauncherApplicationLauncherListAttributeCallback() +CHIPAccountLoginAttributeListAttributeCallback::~CHIPAccountLoginAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1013,8 +1043,8 @@ CHIPApplicationLauncherApplicationLauncherListAttributeCallback::~CHIPApplicatio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1023,8 +1053,8 @@ void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1049,17 +1079,17 @@ void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint16_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } @@ -1067,15 +1097,15 @@ void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ApplicationLauncherListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAudioOutputAudioOutputListAttributeCallback::CHIPAudioOutputAudioOutputListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1092,7 +1122,7 @@ CHIPAudioOutputAudioOutputListAttributeCallback::CHIPAudioOutputAudioOutputListA } } -CHIPAudioOutputAudioOutputListAttributeCallback::~CHIPAudioOutputAudioOutputListAttributeCallback() +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1103,9 +1133,7 @@ CHIPAudioOutputAudioOutputListAttributeCallback::~CHIPAudioOutputAudioOutputList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1113,9 +1141,70 @@ void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), + javaValueCtorSignature.c_str(), value, javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1137,79 +1226,37 @@ void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find AudioOutputListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool indexNull = false; - bool indexHasValue = true; - - uint8_t indexValue = entry.index; - - jobject index = nullptr; - if (!indexNull && indexHasValue) - { - jclass indexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); - chip::JniClass indexJniClass(indexEntryCls); - jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); - index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); - } - - bool outputTypeNull = false; - bool outputTypeHasValue = true; - - chip::app::Clusters::AudioOutput::AudioOutputType outputTypeValue = entry.outputType; - - jobject outputType = nullptr; - if (!outputTypeNull && outputTypeHasValue) - { - jclass outputTypeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", outputTypeEntryCls); - chip::JniClass outputTypeJniClass(outputTypeEntryCls); - jmethodID outputTypeEntryTypeCtor = env->GetMethodID(outputTypeEntryCls, "", "(I)V"); - outputType = env->NewObject(outputTypeEntryCls, outputTypeEntryTypeCtor, outputTypeValue); - } + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - name = jstring(nameStr.jniValue()); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, outputType, name); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create AudioOutputListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AudioOutputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedActionsActionListAttributeCallback::CHIPBridgedActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPApplicationBasicAttributeListAttributeCallback::CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1225,7 +1272,7 @@ CHIPBridgedActionsActionListAttributeCallback::CHIPBridgedActionsActionListAttri } } -CHIPBridgedActionsActionListAttributeCallback::~CHIPBridgedActionsActionListAttributeCallback() +CHIPApplicationBasicAttributeListAttributeCallback::~CHIPApplicationBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1236,9 +1283,8 @@ CHIPBridgedActionsActionListAttributeCallback::~CHIPBridgedActionsActionListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1247,8 +1293,8 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1270,126 +1316,36 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ActionListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool actionIDNull = false; - bool actionIDHasValue = true; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - uint16_t actionIDValue = entry.actionID; - - jobject actionID = nullptr; - if (!actionIDNull && actionIDHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass actionIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", actionIDEntryCls); - chip::JniClass actionIDJniClass(actionIDEntryCls); - jmethodID actionIDEntryTypeCtor = env->GetMethodID(actionIDEntryCls, "", "(I)V"); - actionID = env->NewObject(actionIDEntryCls, actionIDEntryTypeCtor, actionIDValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - bool nameNull = false; - bool nameHasValue = true; + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - chip::CharSpan nameValue = entry.name; + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool typeNull = false; - bool typeHasValue = true; - - chip::app::Clusters::BridgedActions::ActionTypeEnum typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - bool endpointListIDNull = false; - bool endpointListIDHasValue = true; - - uint16_t endpointListIDValue = entry.endpointListID; - - jobject endpointListID = nullptr; - if (!endpointListIDNull && endpointListIDHasValue) - { - jclass endpointListIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); - chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); - jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); - endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); - } - - bool supportedCommandsNull = false; - bool supportedCommandsHasValue = true; - - uint16_t supportedCommandsValue = entry.supportedCommands; - - jobject supportedCommands = nullptr; - if (!supportedCommandsNull && supportedCommandsHasValue) - { - jclass supportedCommandsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", supportedCommandsEntryCls); - chip::JniClass supportedCommandsJniClass(supportedCommandsEntryCls); - jmethodID supportedCommandsEntryTypeCtor = env->GetMethodID(supportedCommandsEntryCls, "", "(I)V"); - supportedCommands = env->NewObject(supportedCommandsEntryCls, supportedCommandsEntryTypeCtor, supportedCommandsValue); - } - - bool statusNull = false; - bool statusHasValue = true; - - chip::app::Clusters::BridgedActions::ActionStateEnum statusValue = entry.status; - - jobject status = nullptr; - if (!statusNull && statusHasValue) - { - jclass statusEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", statusEntryCls); - chip::JniClass statusJniClass(statusEntryCls); - jmethodID statusEntryTypeCtor = env->GetMethodID(statusEntryCls, "", "(I)V"); - status = env->NewObject(statusEntryCls, statusEntryTypeCtor, statusValue); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, actionID, name, type, endpointListID, supportedCommands, status); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ActionListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActionListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPBridgedActionsEndpointListAttributeCallback::CHIPBridgedActionsEndpointListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CHIPApplicationLauncherApplicationLauncherListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1406,7 +1362,7 @@ CHIPBridgedActionsEndpointListAttributeCallback::CHIPBridgedActionsEndpointListA } } -CHIPBridgedActionsEndpointListAttributeCallback::~CHIPBridgedActionsEndpointListAttributeCallback() +CHIPApplicationLauncherApplicationLauncherListAttributeCallback::~CHIPApplicationLauncherApplicationLauncherListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1417,10 +1373,8 @@ CHIPBridgedActionsEndpointListAttributeCallback::~CHIPBridgedActionsEndpointList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1429,8 +1383,8 @@ void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1452,79 +1406,36 @@ void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find EndpointListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool endpointListIDNull = false; - bool endpointListIDHasValue = true; - - uint16_t endpointListIDValue = entry.endpointListID; - - jobject endpointListID = nullptr; - if (!endpointListIDNull && endpointListIDHasValue) - { - jclass endpointListIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); - chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); - jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); - endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool typeNull = false; - bool typeHasValue = true; - - chip::app::Clusters::BridgedActions::EndpointListTypeEnum typeValue = entry.type; + auto & entry = iter.GetValue(); + bool entryNull = false; + uint16_t entryValue = entry; - jobject type = nullptr; - if (!typeNull && typeHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, endpointListID, name, type); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create EndpointListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding EndpointListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ApplicationLauncherListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherAcceptsHeaderListAttributeCallback::CHIPContentLauncherAcceptsHeaderListAttributeCallback(jobject javaCallback, +CHIPApplicationLauncherAttributeListAttributeCallback::CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1541,7 +1452,7 @@ CHIPContentLauncherAcceptsHeaderListAttributeCallback::CHIPContentLauncherAccept } } -CHIPContentLauncherAcceptsHeaderListAttributeCallback::~CHIPContentLauncherAcceptsHeaderListAttributeCallback() +CHIPApplicationLauncherAttributeListAttributeCallback::~CHIPApplicationLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1552,8 +1463,8 @@ CHIPContentLauncherAcceptsHeaderListAttributeCallback::~CHIPContentLauncherAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherAcceptsHeaderListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1562,8 +1473,8 @@ void CHIPContentLauncherAcceptsHeaderListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1588,30 +1499,33 @@ void CHIPContentLauncherAcceptsHeaderListAttributeCallback::CallbackFn( auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jbyteArray entryObject = nullptr; + jobject entryObject = nullptr; if (!entryNull) { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AcceptsHeaderListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CHIPContentLauncherSupportedStreamingTypesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPAudioOutputAudioOutputListAttributeCallback::CHIPAudioOutputAudioOutputListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1628,7 +1542,7 @@ CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CHIPContentLauncher } } -CHIPContentLauncherSupportedStreamingTypesAttributeCallback::~CHIPContentLauncherSupportedStreamingTypesAttributeCallback() +CHIPAudioOutputAudioOutputListAttributeCallback::~CHIPAudioOutputAudioOutputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1639,9 +1553,9 @@ CHIPContentLauncherSupportedStreamingTypesAttributeCallback::~CHIPContentLaunche env->DeleteGlobalRef(javaCallbackRef); } -void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( +void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1650,8 +1564,8 @@ void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1673,51 +1587,95 @@ void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find AudioOutputListAttribute constructor")); + auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType entryValue = entry; + auto & entry = iter.GetValue(); + (void) entry; + bool indexNull = false; + bool indexHasValue = true; - jobject entryObject = nullptr; - if (!entryNull) + uint8_t indexValue = entry.index; + + jobject index = nullptr; + if (!indexNull && indexHasValue) { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + jclass indexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); + chip::JniClass indexJniClass(indexEntryCls); + jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); + index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); - } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedStreamingTypesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} + bool outputTypeNull = false; + bool outputTypeHasValue = true; -CHIPDescriptorDeviceListAttributeCallback::CHIPDescriptorDeviceListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } + chip::app::Clusters::AudioOutput::AudioOutputType outputTypeValue = entry.outputType; - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) + jobject outputType = nullptr; + if (!outputTypeNull && outputTypeHasValue) + { + jclass outputTypeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", outputTypeEntryCls); + chip::JniClass outputTypeJniClass(outputTypeEntryCls); + jmethodID outputTypeEntryTypeCtor = env->GetMethodID(outputTypeEntryCls, "", "(I)V"); + outputType = env->NewObject(outputTypeEntryCls, outputTypeEntryTypeCtor, outputTypeValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, outputType, name); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create AudioOutputListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AudioOutputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPAudioOutputAttributeListAttributeCallback::CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { ChipLogError(Zcl, "Could not create global reference for Java callback"); } } -CHIPDescriptorDeviceListAttributeCallback::~CHIPDescriptorDeviceListAttributeCallback() +CHIPAudioOutputAttributeListAttributeCallback::~CHIPAudioOutputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1728,9 +1686,8 @@ CHIPDescriptorDeviceListAttributeCallback::~CHIPDescriptorDeviceListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorDeviceListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1739,8 +1696,8 @@ void CHIPDescriptorDeviceListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1762,65 +1719,37 @@ void CHIPDescriptorDeviceListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find DeviceListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool typeNull = false; - bool typeHasValue = true; - - chip::DeviceTypeId typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(J)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - bool revisionNull = false; - bool revisionHasValue = true; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - uint16_t revisionValue = entry.revision; - - jobject revision = nullptr; - if (!revisionNull && revisionHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass revisionEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", revisionEntryCls); - chip::JniClass revisionJniClass(revisionEntryCls); - jmethodID revisionEntryTypeCtor = env->GetMethodID(revisionEntryCls, "", "(I)V"); - revision = env->NewObject(revisionEntryCls, revisionEntryTypeCtor, revisionValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, type, revision); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create DeviceListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding DeviceListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBarrierControlAttributeListAttributeCallback::CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1836,7 +1765,7 @@ CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCall } } -CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCallback() +CHIPBarrierControlAttributeListAttributeCallback::~CHIPBarrierControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1847,8 +1776,8 @@ CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1857,8 +1786,8 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1883,9 +1812,9 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ClusterId entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) @@ -1899,15 +1828,16 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ServerListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBasicAttributeListAttributeCallback::CHIPBasicAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1923,7 +1853,7 @@ CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCall } } -CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCallback() +CHIPBasicAttributeListAttributeCallback::~CHIPBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1934,8 +1864,8 @@ CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBasicAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1944,8 +1874,8 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -1970,9 +1900,9 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ClusterId entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) @@ -1986,15 +1916,18 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ClientListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBinaryInputBasicAttributeListAttributeCallback::CHIPBinaryInputBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2010,7 +1943,7 @@ CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallba } } -CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallback() +CHIPBinaryInputBasicAttributeListAttributeCallback::~CHIPBinaryInputBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2021,8 +1954,8 @@ CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2031,8 +1964,8 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2057,31 +1990,32 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::EndpointId entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding PartsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingAttributeListAttributeCallback::CHIPBindingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2097,7 +2031,7 @@ CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallba } } -CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() +CHIPBindingAttributeListAttributeCallback::~CHIPBindingAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2108,9 +2042,8 @@ CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2119,8 +2052,8 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2142,60 +2075,36 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find LabelListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - bool valueNull = false; - bool valueHasValue = true; - - chip::CharSpan valueValue = entry.value; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jstring value = nullptr; - chip::UtfString valueStr(env, valueValue); - if (!valueNull && valueHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - value = jstring(valueStr.jniValue()); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, value); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create LabelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding LabelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: - CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2212,8 +2121,7 @@ CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: } } -CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: - ~CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback() +CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2224,10 +2132,8 @@ CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) +void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2236,8 +2142,8 @@ void CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2259,56 +2165,35 @@ void CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::Callba err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class " - "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find BasicCommissioningInfoListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool failSafeExpiryLengthMsNull = false; - bool failSafeExpiryLengthMsHasValue = true; - - uint32_t failSafeExpiryLengthMsValue = entry.failSafeExpiryLengthMs; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject failSafeExpiryLengthMs = nullptr; - if (!failSafeExpiryLengthMsNull && failSafeExpiryLengthMsHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass failSafeExpiryLengthMsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", failSafeExpiryLengthMsEntryCls); - chip::JniClass failSafeExpiryLengthMsJniClass(failSafeExpiryLengthMsEntryCls); - jmethodID failSafeExpiryLengthMsEntryTypeCtor = env->GetMethodID(failSafeExpiryLengthMsEntryCls, "", "(J)V"); - failSafeExpiryLengthMs = - env->NewObject(failSafeExpiryLengthMsEntryCls, failSafeExpiryLengthMsEntryTypeCtor, failSafeExpiryLengthMsValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, failSafeExpiryLengthMs); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create BasicCommissioningInfoListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding BasicCommissioningInfoListAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPBridgedActionsActionListAttributeCallback::CHIPBridgedActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2324,7 +2209,7 @@ CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnostics } } -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback() +CHIPBridgedActionsActionListAttributeCallback::~CHIPBridgedActionsActionListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2335,10 +2220,9 @@ CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( +void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2347,8 +2231,8 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2372,22 +2256,36 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( jclass attributeClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute", attributeClass); + env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute", attributeClass); VerifyOrReturn( err == CHIP_NO_ERROR, - ChipLogError( - Zcl, "Could not find class chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute")); + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute")); chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NetworkInterfacesAttribute constructor")); + jmethodID attributeCtor = env->GetMethodID( + attributeClass, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ActionListAttribute constructor")); auto iter = list.begin(); while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; + bool actionIDNull = false; + bool actionIDHasValue = true; + + uint16_t actionIDValue = entry.actionID; + + jobject actionID = nullptr; + if (!actionIDNull && actionIDHasValue) + { + jclass actionIDEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", actionIDEntryCls); + chip::JniClass actionIDJniClass(actionIDEntryCls); + jmethodID actionIDEntryTypeCtor = env->GetMethodID(actionIDEntryCls, "", "(I)V"); + actionID = env->NewObject(actionIDEntryCls, actionIDEntryTypeCtor, actionIDValue); + } + bool nameNull = false; bool nameHasValue = true; @@ -2400,102 +2298,82 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( name = jstring(nameStr.jniValue()); } - bool fabricConnectedNull = false; - bool fabricConnectedHasValue = true; - - bool fabricConnectedValue = entry.fabricConnected; - - jobject fabricConnected = nullptr; - if (!fabricConnectedNull && fabricConnectedHasValue) - { - jclass fabricConnectedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fabricConnectedEntryCls); - chip::JniClass fabricConnectedJniClass(fabricConnectedEntryCls); - jmethodID fabricConnectedEntryTypeCtor = env->GetMethodID(fabricConnectedEntryCls, "", "(Z)V"); - fabricConnected = env->NewObject(fabricConnectedEntryCls, fabricConnectedEntryTypeCtor, fabricConnectedValue); - } - - bool offPremiseServicesReachableIPv4Null = false; - bool offPremiseServicesReachableIPv4HasValue = true; + bool typeNull = false; + bool typeHasValue = true; - bool offPremiseServicesReachableIPv4Value = entry.offPremiseServicesReachableIPv4; + chip::app::Clusters::BridgedActions::ActionTypeEnum typeValue = entry.type; - jobject offPremiseServicesReachableIPv4 = nullptr; - if (!offPremiseServicesReachableIPv4Null && offPremiseServicesReachableIPv4HasValue) + jobject type = nullptr; + if (!typeNull && typeHasValue) { - jclass offPremiseServicesReachableIPv4EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv4EntryCls); - chip::JniClass offPremiseServicesReachableIPv4JniClass(offPremiseServicesReachableIPv4EntryCls); - jmethodID offPremiseServicesReachableIPv4EntryTypeCtor = - env->GetMethodID(offPremiseServicesReachableIPv4EntryCls, "", "(Z)V"); - offPremiseServicesReachableIPv4 = - env->NewObject(offPremiseServicesReachableIPv4EntryCls, offPremiseServicesReachableIPv4EntryTypeCtor, - offPremiseServicesReachableIPv4Value); + jclass typeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); + chip::JniClass typeJniClass(typeEntryCls); + jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); + type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); } - bool offPremiseServicesReachableIPv6Null = false; - bool offPremiseServicesReachableIPv6HasValue = true; + bool endpointListIDNull = false; + bool endpointListIDHasValue = true; - bool offPremiseServicesReachableIPv6Value = entry.offPremiseServicesReachableIPv6; + uint16_t endpointListIDValue = entry.endpointListID; - jobject offPremiseServicesReachableIPv6 = nullptr; - if (!offPremiseServicesReachableIPv6Null && offPremiseServicesReachableIPv6HasValue) + jobject endpointListID = nullptr; + if (!endpointListIDNull && endpointListIDHasValue) { - jclass offPremiseServicesReachableIPv6EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv6EntryCls); - chip::JniClass offPremiseServicesReachableIPv6JniClass(offPremiseServicesReachableIPv6EntryCls); - jmethodID offPremiseServicesReachableIPv6EntryTypeCtor = - env->GetMethodID(offPremiseServicesReachableIPv6EntryCls, "", "(Z)V"); - offPremiseServicesReachableIPv6 = - env->NewObject(offPremiseServicesReachableIPv6EntryCls, offPremiseServicesReachableIPv6EntryTypeCtor, - offPremiseServicesReachableIPv6Value); + jclass endpointListIDEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); + chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); + jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); + endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); } - bool hardwareAddressNull = false; - bool hardwareAddressHasValue = true; + bool supportedCommandsNull = false; + bool supportedCommandsHasValue = true; - chip::ByteSpan hardwareAddressValue = entry.hardwareAddress; + uint16_t supportedCommandsValue = entry.supportedCommands; - jbyteArray hardwareAddress = nullptr; - if (!hardwareAddressNull && hardwareAddressHasValue) + jobject supportedCommands = nullptr; + if (!supportedCommandsNull && supportedCommandsHasValue) { - hardwareAddress = env->NewByteArray(hardwareAddressValue.size()); - env->SetByteArrayRegion(hardwareAddress, 0, hardwareAddressValue.size(), - reinterpret_cast(hardwareAddressValue.data())); + jclass supportedCommandsEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", supportedCommandsEntryCls); + chip::JniClass supportedCommandsJniClass(supportedCommandsEntryCls); + jmethodID supportedCommandsEntryTypeCtor = env->GetMethodID(supportedCommandsEntryCls, "", "(I)V"); + supportedCommands = env->NewObject(supportedCommandsEntryCls, supportedCommandsEntryTypeCtor, supportedCommandsValue); } - bool typeNull = false; - bool typeHasValue = true; + bool statusNull = false; + bool statusHasValue = true; - chip::app::Clusters::GeneralDiagnostics::InterfaceType typeValue = entry.type; + chip::app::Clusters::BridgedActions::ActionStateEnum statusValue = entry.status; - jobject type = nullptr; - if (!typeNull && typeHasValue) + jobject status = nullptr; + if (!statusNull && statusHasValue) { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); + jclass statusEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", statusEntryCls); + chip::JniClass statusJniClass(statusEntryCls); + jmethodID statusEntryTypeCtor = env->GetMethodID(statusEntryCls, "", "(I)V"); + status = env->NewObject(statusEntryCls, statusEntryTypeCtor, statusValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, name, fabricConnected, offPremiseServicesReachableIPv4, - offPremiseServicesReachableIPv6, hardwareAddress, type); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NetworkInterfacesAttribute object")); + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, actionID, name, type, endpointListID, supportedCommands, status); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ActionListAttribute object")); env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NetworkInterfacesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ActionListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedActionsEndpointListAttributeCallback::CHIPBridgedActionsEndpointListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2512,7 +2390,7 @@ CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnost } } -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback() +CHIPBridgedActionsEndpointListAttributeCallback::~CHIPBridgedActionsEndpointListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2523,8 +2401,10 @@ CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnos env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2533,8 +2413,8 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2556,36 +2436,79 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find EndpointListAttribute constructor")); + auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + (void) entry; + bool endpointListIDNull = false; + bool endpointListIDHasValue = true; - jobject entryObject = nullptr; - if (!entryNull) + uint16_t endpointListIDValue = entry.endpointListID; + + jobject endpointListID = nullptr; + if (!endpointListIDNull && endpointListIDHasValue) { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + jclass endpointListIDEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); + chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); + jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); + endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + bool typeNull = false; + bool typeHasValue = true; + + chip::app::Clusters::BridgedActions::EndpointListTypeEnum typeValue = entry.type; + + jobject type = nullptr; + if (!typeNull && typeHasValue) + { + jclass typeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); + chip::JniClass typeJniClass(typeEntryCls); + jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); + type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, endpointListID, name, type); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create EndpointListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveHardwareFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding EndpointListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedActionsAttributeListAttributeCallback::CHIPBridgedActionsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2602,7 +2525,7 @@ CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnostics } } -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback() +CHIPBridgedActionsAttributeListAttributeCallback::~CHIPBridgedActionsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2613,8 +2536,8 @@ CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBridgedActionsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2623,8 +2546,8 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2649,17 +2572,17 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } @@ -2667,15 +2590,15 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveRadioFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBridgedDeviceBasicAttributeListAttributeCallback::CHIPBridgedDeviceBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2692,7 +2615,7 @@ CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosti } } -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback() +CHIPBridgedDeviceBasicAttributeListAttributeCallback::~CHIPBridgedDeviceBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2703,8 +2626,8 @@ CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnost env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedDeviceBasicAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2713,8 +2636,8 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2739,17 +2662,17 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } @@ -2757,14 +2680,16 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupsAttributeCallback::CHIPGroupKeyManagementGroupsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPColorControlAttributeListAttributeCallback::CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2780,7 +2705,7 @@ CHIPGroupKeyManagementGroupsAttributeCallback::CHIPGroupKeyManagementGroupsAttri } } -CHIPGroupKeyManagementGroupsAttributeCallback::~CHIPGroupKeyManagementGroupsAttributeCallback() +CHIPColorControlAttributeListAttributeCallback::~CHIPColorControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2791,9 +2716,8 @@ CHIPGroupKeyManagementGroupsAttributeCallback::~CHIPGroupKeyManagementGroupsAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2802,8 +2726,8 @@ void CHIPGroupKeyManagementGroupsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2825,82 +2749,36 @@ void CHIPGroupKeyManagementGroupsAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupsAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupsAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupsAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool vendorIdNull = false; - bool vendorIdHasValue = true; - - uint16_t vendorIdValue = entry.vendorId; - - jobject vendorId = nullptr; - if (!vendorIdNull && vendorIdHasValue) - { - jclass vendorIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); - chip::JniClass vendorIdJniClass(vendorIdEntryCls); - jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); - vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); - } - - bool vendorGroupIdNull = false; - bool vendorGroupIdHasValue = true; - - uint16_t vendorGroupIdValue = entry.vendorGroupId; - - jobject vendorGroupId = nullptr; - if (!vendorGroupIdNull && vendorGroupIdHasValue) - { - jclass vendorGroupIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorGroupIdEntryCls); - chip::JniClass vendorGroupIdJniClass(vendorGroupIdEntryCls); - jmethodID vendorGroupIdEntryTypeCtor = env->GetMethodID(vendorGroupIdEntryCls, "", "(I)V"); - vendorGroupId = env->NewObject(vendorGroupIdEntryCls, vendorGroupIdEntryTypeCtor, vendorGroupIdValue); - } - - bool groupKeySetIndexNull = false; - bool groupKeySetIndexHasValue = true; - - uint16_t groupKeySetIndexValue = entry.groupKeySetIndex; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject groupKeySetIndex = nullptr; - if (!groupKeySetIndexNull && groupKeySetIndexHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass groupKeySetIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeySetIndexEntryCls); - chip::JniClass groupKeySetIndexJniClass(groupKeySetIndexEntryCls); - jmethodID groupKeySetIndexEntryTypeCtor = env->GetMethodID(groupKeySetIndexEntryCls, "", "(I)V"); - groupKeySetIndex = env->NewObject(groupKeySetIndexEntryCls, groupKeySetIndexEntryTypeCtor, groupKeySetIndexValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, vendorId, vendorGroupId, groupKeySetIndex); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupsAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding GroupsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupKeysAttributeCallback::CHIPGroupKeyManagementGroupKeysAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentLauncherAcceptsHeaderListAttributeCallback::CHIPContentLauncherAcceptsHeaderListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2917,7 +2795,7 @@ CHIPGroupKeyManagementGroupKeysAttributeCallback::CHIPGroupKeyManagementGroupKey } } -CHIPGroupKeyManagementGroupKeysAttributeCallback::~CHIPGroupKeyManagementGroupKeysAttributeCallback() +CHIPContentLauncherAcceptsHeaderListAttributeCallback::~CHIPContentLauncherAcceptsHeaderListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2928,9 +2806,8 @@ CHIPGroupKeyManagementGroupKeysAttributeCallback::~CHIPGroupKeyManagementGroupKe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPContentLauncherAcceptsHeaderListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2939,8 +2816,8 @@ void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -2962,113 +2839,33 @@ void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeysAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeysAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupKeysAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool vendorIdNull = false; - bool vendorIdHasValue = true; - - uint16_t vendorIdValue = entry.vendorId; - - jobject vendorId = nullptr; - if (!vendorIdNull && vendorIdHasValue) - { - jclass vendorIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); - chip::JniClass vendorIdJniClass(vendorIdEntryCls); - jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); - vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); - } - - bool groupKeyIndexNull = false; - bool groupKeyIndexHasValue = true; - - uint16_t groupKeyIndexValue = entry.groupKeyIndex; - - jobject groupKeyIndex = nullptr; - if (!groupKeyIndexNull && groupKeyIndexHasValue) - { - jclass groupKeyIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeyIndexEntryCls); - chip::JniClass groupKeyIndexJniClass(groupKeyIndexEntryCls); - jmethodID groupKeyIndexEntryTypeCtor = env->GetMethodID(groupKeyIndexEntryCls, "", "(I)V"); - groupKeyIndex = env->NewObject(groupKeyIndexEntryCls, groupKeyIndexEntryTypeCtor, groupKeyIndexValue); - } - - bool groupKeyRootNull = false; - bool groupKeyRootHasValue = true; - - chip::ByteSpan groupKeyRootValue = entry.groupKeyRoot; - - jbyteArray groupKeyRoot = nullptr; - if (!groupKeyRootNull && groupKeyRootHasValue) - { - groupKeyRoot = env->NewByteArray(groupKeyRootValue.size()); - env->SetByteArrayRegion(groupKeyRoot, 0, groupKeyRootValue.size(), - reinterpret_cast(groupKeyRootValue.data())); - } - - bool groupKeyEpochStartTimeNull = false; - bool groupKeyEpochStartTimeHasValue = true; - - uint64_t groupKeyEpochStartTimeValue = entry.groupKeyEpochStartTime; - - jobject groupKeyEpochStartTime = nullptr; - if (!groupKeyEpochStartTimeNull && groupKeyEpochStartTimeHasValue) - { - jclass groupKeyEpochStartTimeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", groupKeyEpochStartTimeEntryCls); - chip::JniClass groupKeyEpochStartTimeJniClass(groupKeyEpochStartTimeEntryCls); - jmethodID groupKeyEpochStartTimeEntryTypeCtor = env->GetMethodID(groupKeyEpochStartTimeEntryCls, "", "(J)V"); - groupKeyEpochStartTime = - env->NewObject(groupKeyEpochStartTimeEntryCls, groupKeyEpochStartTimeEntryTypeCtor, groupKeyEpochStartTimeValue); - } - - bool groupKeySecurityPolicyNull = false; - bool groupKeySecurityPolicyHasValue = true; - - chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ByteSpan entryValue = entry; - jobject groupKeySecurityPolicy = nullptr; - if (!groupKeySecurityPolicyNull && groupKeySecurityPolicyHasValue) + jbyteArray entryObject = nullptr; + if (!entryNull) { - jclass groupKeySecurityPolicyEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeySecurityPolicyEntryCls); - chip::JniClass groupKeySecurityPolicyJniClass(groupKeySecurityPolicyEntryCls); - jmethodID groupKeySecurityPolicyEntryTypeCtor = env->GetMethodID(groupKeySecurityPolicyEntryCls, "", "(I)V"); - groupKeySecurityPolicy = - env->NewObject(groupKeySecurityPolicyEntryCls, groupKeySecurityPolicyEntryTypeCtor, groupKeySecurityPolicyValue); + entryObject = env->NewByteArray(entryValue.size()); + env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, vendorId, groupKeyIndex, groupKeyRoot, - groupKeyEpochStartTime, groupKeySecurityPolicy); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupKeysAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding GroupKeysAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AcceptsHeaderListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( +CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CHIPContentLauncherSupportedStreamingTypesAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -3085,7 +2882,7 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasure } } -CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() +CHIPContentLauncherSupportedStreamingTypesAttributeCallback::~CHIPContentLauncherSupportedStreamingTypesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3096,8 +2893,9 @@ CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3105,31 +2903,60 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SupportedStreamingTypesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPContentLauncherAttributeListAttributeCallback::CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -3146,7 +2973,7 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() +CHIPContentLauncherAttributeListAttributeCallback::~CHIPContentLauncherAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3157,8 +2984,8 @@ CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3166,32 +2993,59 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDescriptorDeviceListAttributeCallback::CHIPDescriptorDeviceListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3207,7 +3061,7 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeas } } -CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() +CHIPDescriptorDeviceListAttributeCallback::~CHIPDescriptorDeviceListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3218,8 +3072,9 @@ CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMea env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPDescriptorDeviceListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3227,32 +3082,89 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find DeviceListAttribute constructor")); - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool typeNull = false; + bool typeHasValue = true; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + chip::DeviceTypeId typeValue = entry.type; + + jobject type = nullptr; + if (!typeNull && typeHasValue) + { + jclass typeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", typeEntryCls); + chip::JniClass typeJniClass(typeEntryCls); + jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(J)V"); + type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); + } + + bool revisionNull = false; + bool revisionHasValue = true; + + uint16_t revisionValue = entry.revision; + + jobject revision = nullptr; + if (!revisionNull && revisionHasValue) + { + jclass revisionEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", revisionEntryCls); + chip::JniClass revisionJniClass(revisionEntryCls); + jmethodID revisionEntryTypeCtor = env->GetMethodID(revisionEntryCls, "", "(I)V"); + revision = env->NewObject(revisionEntryCls, revisionEntryTypeCtor, revisionValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, type, revision); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create DeviceListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding DeviceListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3268,7 +3180,7 @@ CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionT } } -CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() +CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3279,8 +3191,8 @@ CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransition env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3288,32 +3200,58 @@ void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ClusterId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ServerListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3329,7 +3267,7 @@ CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitio } } -CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() +CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3340,8 +3278,8 @@ CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransiti env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3349,30 +3287,58 @@ void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ClusterId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ClientListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMediaInputMediaInputListAttributeCallback::CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3388,7 +3354,7 @@ CHIPMediaInputMediaInputListAttributeCallback::CHIPMediaInputMediaInputListAttri } } -CHIPMediaInputMediaInputListAttributeCallback::~CHIPMediaInputMediaInputListAttributeCallback() +CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3399,9 +3365,8 @@ CHIPMediaInputMediaInputListAttributeCallback::~CHIPMediaInputMediaInputListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3410,8 +3375,8 @@ void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -3433,91 +3398,34 @@ void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find MediaInputListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool indexNull = false; - bool indexHasValue = true; - - uint8_t indexValue = entry.index; - - jobject index = nullptr; - if (!indexNull && indexHasValue) - { - jclass indexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); - chip::JniClass indexJniClass(indexEntryCls); - jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); - index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); - } - - bool inputTypeNull = false; - bool inputTypeHasValue = true; - - chip::app::Clusters::MediaInput::MediaInputType inputTypeValue = entry.inputType; - - jobject inputType = nullptr; - if (!inputTypeNull && inputTypeHasValue) - { - jclass inputTypeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", inputTypeEntryCls); - chip::JniClass inputTypeJniClass(inputTypeEntryCls); - jmethodID inputTypeEntryTypeCtor = env->GetMethodID(inputTypeEntryCls, "", "(I)V"); - inputType = env->NewObject(inputTypeEntryCls, inputTypeEntryTypeCtor, inputTypeValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool descriptionNull = false; - bool descriptionHasValue = true; - - chip::CharSpan descriptionValue = entry.description; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::EndpointId entryValue = entry; - jstring description = nullptr; - chip::UtfString descriptionStr(env, descriptionValue); - if (!descriptionNull && descriptionHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - description = jstring(descriptionStr.jniValue()); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, inputType, name, description); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create MediaInputListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding MediaInputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding PartsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorAttributeListAttributeCallback::CHIPDescriptorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3533,7 +3441,7 @@ CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttri } } -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +CHIPDescriptorAttributeListAttributeCallback::~CHIPDescriptorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3544,9 +3452,8 @@ CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3555,8 +3462,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -3578,80 +3485,36 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SupportedModesAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - bool modeNull = false; - bool modeHasValue = true; - - uint8_t modeValue = entry.mode; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject mode = nullptr; - if (!modeNull && modeHasValue) - { - jclass modeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", modeEntryCls); - chip::JniClass modeJniClass(modeEntryCls); - jmethodID modeEntryTypeCtor = env->GetMethodID(modeEntryCls, "", "(I)V"); - mode = env->NewObject(modeEntryCls, modeEntryTypeCtor, modeValue); - } - - bool semanticTagNull = false; - bool semanticTagHasValue = true; - - uint32_t semanticTagValue = entry.semanticTag; - - jobject semanticTag = nullptr; - if (!semanticTagNull && semanticTagHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass semanticTagEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", semanticTagEntryCls); - chip::JniClass semanticTagJniClass(semanticTagEntryCls); - jmethodID semanticTagEntryTypeCtor = env->GetMethodID(semanticTagEntryCls, "", "(J)V"); - semanticTag = env->NewObject(semanticTagEntryCls, semanticTagEntryTypeCtor, semanticTagValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, mode, semanticTag); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SupportedModesAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedModesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsFabricsListAttributeCallback::CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDiagnosticLogsAttributeListAttributeCallback::CHIPDiagnosticLogsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -3668,7 +3531,7 @@ CHIPOperationalCredentialsFabricsListAttributeCallback::CHIPOperationalCredentia } } -CHIPOperationalCredentialsFabricsListAttributeCallback::~CHIPOperationalCredentialsFabricsListAttributeCallback() +CHIPDiagnosticLogsAttributeListAttributeCallback::~CHIPDiagnosticLogsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3679,10 +3542,8 @@ CHIPOperationalCredentialsFabricsListAttributeCallback::~CHIPOperationalCredenti env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) +void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3691,8 +3552,8 @@ void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -3714,125 +3575,35 @@ void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", "(Ljava/lang/Integer;[BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find FabricsListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - uint8_t fabricIndexValue = entry.fabricIndex; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - bool rootPublicKeyNull = false; - bool rootPublicKeyHasValue = true; - - chip::ByteSpan rootPublicKeyValue = entry.rootPublicKey; - - jbyteArray rootPublicKey = nullptr; - if (!rootPublicKeyNull && rootPublicKeyHasValue) - { - rootPublicKey = env->NewByteArray(rootPublicKeyValue.size()); - env->SetByteArrayRegion(rootPublicKey, 0, rootPublicKeyValue.size(), - reinterpret_cast(rootPublicKeyValue.data())); - } - - bool vendorIdNull = false; - bool vendorIdHasValue = true; - - uint16_t vendorIdValue = entry.vendorId; - - jobject vendorId = nullptr; - if (!vendorIdNull && vendorIdHasValue) - { - jclass vendorIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); - chip::JniClass vendorIdJniClass(vendorIdEntryCls); - jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); - vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); - } - - bool fabricIdNull = false; - bool fabricIdHasValue = true; - - chip::FabricId fabricIdValue = entry.fabricId; - - jobject fabricId = nullptr; - if (!fabricIdNull && fabricIdHasValue) - { - jclass fabricIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIdEntryCls); - chip::JniClass fabricIdJniClass(fabricIdEntryCls); - jmethodID fabricIdEntryTypeCtor = env->GetMethodID(fabricIdEntryCls, "", "(J)V"); - fabricId = env->NewObject(fabricIdEntryCls, fabricIdEntryTypeCtor, fabricIdValue); - } - - bool nodeIdNull = false; - bool nodeIdHasValue = true; - - chip::NodeId nodeIdValue = entry.nodeId; - - jobject nodeId = nullptr; - if (!nodeIdNull && nodeIdHasValue) - { - jclass nodeIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", nodeIdEntryCls); - chip::JniClass nodeIdJniClass(nodeIdEntryCls); - jmethodID nodeIdEntryTypeCtor = env->GetMethodID(nodeIdEntryCls, "", "(J)V"); - nodeId = env->NewObject(nodeIdEntryCls, nodeIdEntryTypeCtor, nodeIdValue); - } - - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, fabricIndex, rootPublicKey, vendorId, fabricId, nodeId, label); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create FabricsListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding FabricsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDoorLockAttributeListAttributeCallback::CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3848,8 +3619,7 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: } } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() +CHIPDoorLockAttributeListAttributeCallback::~CHIPDoorLockAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3860,8 +3630,8 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3870,8 +3640,8 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -3896,30 +3666,33 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jbyteArray entryObject = nullptr; + jobject entryObject = nullptr; if (!entryNull) { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TrustedRootCertificatesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback( +CHIPElectricalMeasurementAttributeListAttributeCallback::CHIPElectricalMeasurementAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -3936,7 +3709,7 @@ CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CHIPOperationalCr } } -CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback() +CHIPElectricalMeasurementAttributeListAttributeCallback::~CHIPElectricalMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3947,7 +3720,8 @@ CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::~CHIPOperationalC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) +void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3955,31 +3729,60 @@ void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(v jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), - javaValueCtorSignature.c_str(), value, javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CHIPPowerSourceActiveBatteryFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -3996,7 +3799,7 @@ CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CHIPPowerSourceActiveBatter } } -CHIPPowerSourceActiveBatteryFaultsAttributeCallback::~CHIPPowerSourceActiveBatteryFaultsAttributeCallback() +CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::~CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4007,8 +3810,8 @@ CHIPPowerSourceActiveBatteryFaultsAttributeCallback::~CHIPPowerSourceActiveBatte env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4017,8 +3820,8 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4043,17 +3846,17 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } @@ -4061,16 +3864,14 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveBatteryFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4086,7 +3887,7 @@ CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurati } } -CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() +CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4097,8 +3898,9 @@ CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4107,8 +3909,8 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * con VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4130,36 +3932,59 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * con err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find LabelListAttribute constructor")); + auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + (void) entry; + bool labelNull = false; + bool labelHasValue = true; - jobject entryObject = nullptr; - if (!entryNull) + chip::CharSpan labelValue = entry.label; + + jstring label = nullptr; + chip::UtfString labelStr(env, labelValue); + if (!labelNull && labelHasValue) { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + label = jstring(labelStr.jniValue()); } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + bool valueNull = false; + bool valueHasValue = true; + + chip::CharSpan valueValue = entry.value; + + jstring value = nullptr; + chip::UtfString valueStr(env, valueValue); + if (!valueNull && valueHasValue) + { + value = jstring(valueStr.jniValue()); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, value); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create LabelListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SourcesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding LabelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4175,8 +4000,7 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4187,8 +4011,8 @@ CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4196,31 +4020,60 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPFlowMeasurementAttributeListAttributeCallback::CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4237,8 +4090,7 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: } } -CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +CHIPFlowMeasurementAttributeListAttributeCallback::~CHIPFlowMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4249,8 +4101,8 @@ CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4258,31 +4110,60 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: + CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4299,7 +4180,8 @@ CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsTh } } -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback() +CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback:: + ~CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4310,10 +4192,10 @@ CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsT env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( +void CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4322,8 +4204,8 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4347,109 +4229,54 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( jclass attributeClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute", attributeClass); + env, "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute", attributeClass); VerifyOrReturn( err == CHIP_NO_ERROR, ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute")); + "Could not find class " + "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute")); chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", "(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ThreadMetricsAttribute constructor")); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find BasicCommissioningInfoListAttribute constructor")); auto iter = list.begin(); while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; - bool idNull = false; - bool idHasValue = true; - - uint64_t idValue = entry.id; - - jobject id = nullptr; - if (!idNull && idHasValue) - { - jclass idEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", idEntryCls); - chip::JniClass idJniClass(idEntryCls); - jmethodID idEntryTypeCtor = env->GetMethodID(idEntryCls, "", "(J)V"); - id = env->NewObject(idEntryCls, idEntryTypeCtor, idValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool stackFreeCurrentNull = false; - bool stackFreeCurrentHasValue = true; - - uint32_t stackFreeCurrentValue = entry.stackFreeCurrent; - - jobject stackFreeCurrent = nullptr; - if (!stackFreeCurrentNull && stackFreeCurrentHasValue) - { - jclass stackFreeCurrentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeCurrentEntryCls); - chip::JniClass stackFreeCurrentJniClass(stackFreeCurrentEntryCls); - jmethodID stackFreeCurrentEntryTypeCtor = env->GetMethodID(stackFreeCurrentEntryCls, "", "(J)V"); - stackFreeCurrent = env->NewObject(stackFreeCurrentEntryCls, stackFreeCurrentEntryTypeCtor, stackFreeCurrentValue); - } - - bool stackFreeMinimumNull = false; - bool stackFreeMinimumHasValue = true; - - uint32_t stackFreeMinimumValue = entry.stackFreeMinimum; - - jobject stackFreeMinimum = nullptr; - if (!stackFreeMinimumNull && stackFreeMinimumHasValue) - { - jclass stackFreeMinimumEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeMinimumEntryCls); - chip::JniClass stackFreeMinimumJniClass(stackFreeMinimumEntryCls); - jmethodID stackFreeMinimumEntryTypeCtor = env->GetMethodID(stackFreeMinimumEntryCls, "", "(J)V"); - stackFreeMinimum = env->NewObject(stackFreeMinimumEntryCls, stackFreeMinimumEntryTypeCtor, stackFreeMinimumValue); - } - - bool stackSizeNull = false; - bool stackSizeHasValue = true; + bool failSafeExpiryLengthMsNull = false; + bool failSafeExpiryLengthMsHasValue = true; - uint32_t stackSizeValue = entry.stackSize; + uint32_t failSafeExpiryLengthMsValue = entry.failSafeExpiryLengthMs; - jobject stackSize = nullptr; - if (!stackSizeNull && stackSizeHasValue) + jobject failSafeExpiryLengthMs = nullptr; + if (!failSafeExpiryLengthMsNull && failSafeExpiryLengthMsHasValue) { - jclass stackSizeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackSizeEntryCls); - chip::JniClass stackSizeJniClass(stackSizeEntryCls); - jmethodID stackSizeEntryTypeCtor = env->GetMethodID(stackSizeEntryCls, "", "(J)V"); - stackSize = env->NewObject(stackSizeEntryCls, stackSizeEntryTypeCtor, stackSizeValue); + jclass failSafeExpiryLengthMsEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", failSafeExpiryLengthMsEntryCls); + chip::JniClass failSafeExpiryLengthMsJniClass(failSafeExpiryLengthMsEntryCls); + jmethodID failSafeExpiryLengthMsEntryTypeCtor = env->GetMethodID(failSafeExpiryLengthMsEntryCls, "", "(J)V"); + failSafeExpiryLengthMs = + env->NewObject(failSafeExpiryLengthMsEntryCls, failSafeExpiryLengthMsEntryTypeCtor, failSafeExpiryLengthMsValue); } - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, id, name, stackFreeCurrent, stackFreeMinimum, stackSize); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ThreadMetricsAttribute object")); + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, failSafeExpiryLengthMs); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create BasicCommissioningInfoListAttribute object")); env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ThreadMetricsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding BasicCommissioningInfoListAttribute value: %" CHIP_ERROR_FORMAT, + iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTvChannelTvChannelListAttributeCallback::CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralCommissioningAttributeListAttributeCallback::CHIPGeneralCommissioningAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4465,7 +4292,7 @@ CHIPTvChannelTvChannelListAttributeCallback::CHIPTvChannelTvChannelListAttribute } } -CHIPTvChannelTvChannelListAttributeCallback::~CHIPTvChannelTvChannelListAttributeCallback() +CHIPGeneralCommissioningAttributeListAttributeCallback::~CHIPGeneralCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4476,9 +4303,8 @@ CHIPTvChannelTvChannelListAttributeCallback::~CHIPTvChannelTvChannelListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4487,8 +4313,8 @@ void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4510,106 +4336,36 @@ void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TvChannelListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool majorNumberNull = false; - bool majorNumberHasValue = true; - - uint16_t majorNumberValue = entry.majorNumber; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject majorNumber = nullptr; - if (!majorNumberNull && majorNumberHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass majorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", majorNumberEntryCls); - chip::JniClass majorNumberJniClass(majorNumberEntryCls); - jmethodID majorNumberEntryTypeCtor = env->GetMethodID(majorNumberEntryCls, "", "(I)V"); - majorNumber = env->NewObject(majorNumberEntryCls, majorNumberEntryTypeCtor, majorNumberValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - bool minorNumberNull = false; - bool minorNumberHasValue = true; - - uint16_t minorNumberValue = entry.minorNumber; - - jobject minorNumber = nullptr; - if (!minorNumberNull && minorNumberHasValue) - { - jclass minorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", minorNumberEntryCls); - chip::JniClass minorNumberJniClass(minorNumberEntryCls); - jmethodID minorNumberEntryTypeCtor = env->GetMethodID(minorNumberEntryCls, "", "(I)V"); - minorNumber = env->NewObject(minorNumberEntryCls, minorNumberEntryTypeCtor, minorNumberValue); - } + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - bool nameNull = false; - bool nameHasValue = true; + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool callSignNull = false; - bool callSignHasValue = true; - - chip::CharSpan callSignValue = entry.callSign; - - jstring callSign = nullptr; - chip::UtfString callSignStr(env, callSignValue); - if (!callSignNull && callSignHasValue) - { - callSign = jstring(callSignStr.jniValue()); - } - - bool affiliateCallSignNull = false; - bool affiliateCallSignHasValue = true; - - chip::CharSpan affiliateCallSignValue = entry.affiliateCallSign; - - jstring affiliateCallSign = nullptr; - chip::UtfString affiliateCallSignStr(env, affiliateCallSignValue); - if (!affiliateCallSignNull && affiliateCallSignHasValue) - { - affiliateCallSign = jstring(affiliateCallSignStr.jniValue()); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TvChannelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TvChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CHIPTargetNavigatorTargetNavigatorListAttributeCallback( +CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4626,7 +4382,7 @@ CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CHIPTargetNavigatorTarg } } -CHIPTargetNavigatorTargetNavigatorListAttributeCallback::~CHIPTargetNavigatorTargetNavigatorListAttributeCallback() +CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4637,10 +4393,10 @@ CHIPTargetNavigatorTargetNavigatorListAttributeCallback::~CHIPTargetNavigatorTar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( +void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4649,8 +4405,8 @@ void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4674,35 +4430,22 @@ void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( jclass attributeClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute", attributeClass); + env, "chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute", attributeClass); VerifyOrReturn( err == CHIP_NO_ERROR, ChipLogError( - Zcl, "Could not find class chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute")); + Zcl, "Could not find class chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute")); chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TargetNavigatorListAttribute constructor")); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", + "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NetworkInterfacesAttribute constructor")); auto iter = list.begin(); while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; - bool identifierNull = false; - bool identifierHasValue = true; - - uint8_t identifierValue = entry.identifier; - - jobject identifier = nullptr; - if (!identifierNull && identifierHasValue) - { - jclass identifierEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", identifierEntryCls); - chip::JniClass identifierJniClass(identifierEntryCls); - jmethodID identifierEntryTypeCtor = env->GetMethodID(identifierEntryCls, "", "(I)V"); - identifier = env->NewObject(identifierEntryCls, identifierEntryTypeCtor, identifierValue); - } - bool nameNull = false; bool nameHasValue = true; @@ -4715,21 +4458,103 @@ void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( name = jstring(nameStr.jniValue()); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, identifier, name); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TargetNavigatorListAttribute object")); + bool fabricConnectedNull = false; + bool fabricConnectedHasValue = true; + + bool fabricConnectedValue = entry.fabricConnected; + + jobject fabricConnected = nullptr; + if (!fabricConnectedNull && fabricConnectedHasValue) + { + jclass fabricConnectedEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fabricConnectedEntryCls); + chip::JniClass fabricConnectedJniClass(fabricConnectedEntryCls); + jmethodID fabricConnectedEntryTypeCtor = env->GetMethodID(fabricConnectedEntryCls, "", "(Z)V"); + fabricConnected = env->NewObject(fabricConnectedEntryCls, fabricConnectedEntryTypeCtor, fabricConnectedValue); + } + + bool offPremiseServicesReachableIPv4Null = false; + bool offPremiseServicesReachableIPv4HasValue = true; + + bool offPremiseServicesReachableIPv4Value = entry.offPremiseServicesReachableIPv4; + + jobject offPremiseServicesReachableIPv4 = nullptr; + if (!offPremiseServicesReachableIPv4Null && offPremiseServicesReachableIPv4HasValue) + { + jclass offPremiseServicesReachableIPv4EntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv4EntryCls); + chip::JniClass offPremiseServicesReachableIPv4JniClass(offPremiseServicesReachableIPv4EntryCls); + jmethodID offPremiseServicesReachableIPv4EntryTypeCtor = + env->GetMethodID(offPremiseServicesReachableIPv4EntryCls, "", "(Z)V"); + offPremiseServicesReachableIPv4 = + env->NewObject(offPremiseServicesReachableIPv4EntryCls, offPremiseServicesReachableIPv4EntryTypeCtor, + offPremiseServicesReachableIPv4Value); + } + + bool offPremiseServicesReachableIPv6Null = false; + bool offPremiseServicesReachableIPv6HasValue = true; + + bool offPremiseServicesReachableIPv6Value = entry.offPremiseServicesReachableIPv6; + + jobject offPremiseServicesReachableIPv6 = nullptr; + if (!offPremiseServicesReachableIPv6Null && offPremiseServicesReachableIPv6HasValue) + { + jclass offPremiseServicesReachableIPv6EntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv6EntryCls); + chip::JniClass offPremiseServicesReachableIPv6JniClass(offPremiseServicesReachableIPv6EntryCls); + jmethodID offPremiseServicesReachableIPv6EntryTypeCtor = + env->GetMethodID(offPremiseServicesReachableIPv6EntryCls, "", "(Z)V"); + offPremiseServicesReachableIPv6 = + env->NewObject(offPremiseServicesReachableIPv6EntryCls, offPremiseServicesReachableIPv6EntryTypeCtor, + offPremiseServicesReachableIPv6Value); + } + + bool hardwareAddressNull = false; + bool hardwareAddressHasValue = true; + + chip::ByteSpan hardwareAddressValue = entry.hardwareAddress; + + jbyteArray hardwareAddress = nullptr; + if (!hardwareAddressNull && hardwareAddressHasValue) + { + hardwareAddress = env->NewByteArray(hardwareAddressValue.size()); + env->SetByteArrayRegion(hardwareAddress, 0, hardwareAddressValue.size(), + reinterpret_cast(hardwareAddressValue.data())); + } + + bool typeNull = false; + bool typeHasValue = true; + + chip::app::Clusters::GeneralDiagnostics::InterfaceType typeValue = entry.type; + + jobject type = nullptr; + if (!typeNull && typeHasValue) + { + jclass typeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); + chip::JniClass typeJniClass(typeEntryCls); + jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); + type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, name, fabricConnected, offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, hardwareAddress, type); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NetworkInterfacesAttribute object")); env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TargetNavigatorListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding NetworkInterfacesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterListInt8uAttributeCallback::CHIPTestClusterListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4745,7 +4570,7 @@ CHIPTestClusterListInt8uAttributeCallback::CHIPTestClusterListInt8uAttributeCall } } -CHIPTestClusterListInt8uAttributeCallback::~CHIPTestClusterListInt8uAttributeCallback() +CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4756,8 +4581,8 @@ CHIPTestClusterListInt8uAttributeCallback::~CHIPTestClusterListInt8uAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4766,8 +4591,8 @@ void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4808,16 +4633,17 @@ void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context, env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListInt8uAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ActiveHardwareFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterListOctetStringAttributeCallback::CHIPTestClusterListOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4834,7 +4660,7 @@ CHIPTestClusterListOctetStringAttributeCallback::CHIPTestClusterListOctetStringA } } -CHIPTestClusterListOctetStringAttributeCallback::~CHIPTestClusterListOctetStringAttributeCallback() +CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4845,8 +4671,8 @@ CHIPTestClusterListOctetStringAttributeCallback::~CHIPTestClusterListOctetString env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4855,8 +4681,8 @@ void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4881,30 +4707,33 @@ void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context, auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; - jbyteArray entryObject = nullptr; + jobject entryObject = nullptr; if (!entryNull) { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding ActiveRadioFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterListStructOctetStringAttributeCallback::CHIPTestClusterListStructOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -4921,7 +4750,7 @@ CHIPTestClusterListStructOctetStringAttributeCallback::CHIPTestClusterListStruct } } -CHIPTestClusterListStructOctetStringAttributeCallback::~CHIPTestClusterListStructOctetStringAttributeCallback() +CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4932,9 +4761,8 @@ CHIPTestClusterListStructOctetStringAttributeCallback::~CHIPTestClusterListStruc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4943,8 +4771,8 @@ void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -4966,65 +4794,37 @@ void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;[B)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ListStructOctetStringAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - uint64_t fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(J)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool operationalCertNull = false; - bool operationalCertHasValue = true; - - chip::ByteSpan operationalCertValue = entry.operationalCert; + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; - jbyteArray operationalCert = nullptr; - if (!operationalCertNull && operationalCertHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - operationalCert = env->NewByteArray(operationalCertValue.size()); - env->SetByteArrayRegion(operationalCert, 0, operationalCertValue.size(), - reinterpret_cast(operationalCertValue.data())); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, operationalCert); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ListStructOctetStringAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListStructOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterVendorIdAttributeCallback::CHIPTestClusterVendorIdAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralDiagnosticsAttributeListAttributeCallback::CHIPGeneralDiagnosticsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5040,7 +4840,7 @@ CHIPTestClusterVendorIdAttributeCallback::CHIPTestClusterVendorIdAttributeCallba } } -CHIPTestClusterVendorIdAttributeCallback::~CHIPTestClusterVendorIdAttributeCallback() +CHIPGeneralDiagnosticsAttributeListAttributeCallback::~CHIPGeneralDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5051,7 +4851,8 @@ CHIPTestClusterVendorIdAttributeCallback::~CHIPTestClusterVendorIdAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterVendorIdAttributeCallback::CallbackFn(void * context, chip::VendorId value) +void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5059,32 +4860,59 @@ void CHIPTestClusterVendorIdAttributeCallback::CallbackFn(void * context, chip:: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value, javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPGroupKeyManagementGroupsAttributeCallback::CHIPGroupKeyManagementGroupsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5100,7 +4928,7 @@ CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CHIPTestCluster } } -CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::~CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback() +CHIPGroupKeyManagementGroupsAttributeCallback::~CHIPGroupKeyManagementGroupsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5111,10 +4939,9 @@ CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::~CHIPTestCluste env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn( +void CHIPGroupKeyManagementGroupsAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5123,8 +4950,8 @@ void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5148,172 +4975,80 @@ void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn jclass attributeClass; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute", attributeClass); + env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupsAttribute", attributeClass); VerifyOrReturn( err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute")); + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupsAttribute")); chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V"); - VerifyOrReturn(attributeCtor != nullptr, - ChipLogError(Zcl, "Could not find ListNullablesAndOptionalsStructAttribute constructor")); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupsAttribute constructor")); auto iter = list.begin(); while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; - bool nullableIntNull = false; - bool nullableIntHasValue = true; - uint16_t nullableIntValue; - nullableIntNull = entry.nullableInt.IsNull(); - if (!nullableIntNull) - { - nullableIntValue = entry.nullableInt.Value(); - } - - jobject nullableInt = nullptr; - if (!nullableIntNull && nullableIntHasValue) - { - jclass nullableIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableIntEntryCls); - chip::JniClass nullableIntJniClass(nullableIntEntryCls); - jmethodID nullableIntEntryTypeCtor = env->GetMethodID(nullableIntEntryCls, "", "(I)V"); - nullableInt = env->NewObject(nullableIntEntryCls, nullableIntEntryTypeCtor, nullableIntValue); - } + bool vendorIdNull = false; + bool vendorIdHasValue = true; - bool optionalIntNull = false; - bool optionalIntHasValue = true; + uint16_t vendorIdValue = entry.vendorId; - uint16_t optionalIntValue; - optionalIntHasValue = entry.optionalInt.HasValue(); - if (optionalIntHasValue) + jobject vendorId = nullptr; + if (!vendorIdNull && vendorIdHasValue) { - optionalIntValue = entry.optionalInt.Value(); + jclass vendorIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); + chip::JniClass vendorIdJniClass(vendorIdEntryCls); + jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); + vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); } - jobject optionalInt = nullptr; - if (!optionalIntNull && optionalIntHasValue) - { - jclass optionalIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", optionalIntEntryCls); - chip::JniClass optionalIntJniClass(optionalIntEntryCls); - jmethodID optionalIntEntryTypeCtor = env->GetMethodID(optionalIntEntryCls, "", "(I)V"); - optionalInt = env->NewObject(optionalIntEntryCls, optionalIntEntryTypeCtor, optionalIntValue); - } + bool vendorGroupIdNull = false; + bool vendorGroupIdHasValue = true; - jobject optionalIntOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(optionalInt, optionalIntOptional); - bool nullableOptionalIntNull = false; - bool nullableOptionalIntHasValue = true; + uint16_t vendorGroupIdValue = entry.vendorGroupId; - uint16_t nullableOptionalIntValue; - nullableOptionalIntHasValue = entry.nullableOptionalInt.HasValue(); - if (nullableOptionalIntHasValue) + jobject vendorGroupId = nullptr; + if (!vendorGroupIdNull && vendorGroupIdHasValue) { - auto nullableOptionalIntValueFromOptional = entry.nullableOptionalInt.Value(); - nullableOptionalIntNull = nullableOptionalIntValueFromOptional.IsNull(); - if (!nullableOptionalIntNull) - { - nullableOptionalIntValue = nullableOptionalIntValueFromOptional.Value(); - } + jclass vendorGroupIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorGroupIdEntryCls); + chip::JniClass vendorGroupIdJniClass(vendorGroupIdEntryCls); + jmethodID vendorGroupIdEntryTypeCtor = env->GetMethodID(vendorGroupIdEntryCls, "", "(I)V"); + vendorGroupId = env->NewObject(vendorGroupIdEntryCls, vendorGroupIdEntryTypeCtor, vendorGroupIdValue); } - jobject nullableOptionalInt = nullptr; - if (!nullableOptionalIntNull && nullableOptionalIntHasValue) - { - jclass nullableOptionalIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableOptionalIntEntryCls); - chip::JniClass nullableOptionalIntJniClass(nullableOptionalIntEntryCls); - jmethodID nullableOptionalIntEntryTypeCtor = env->GetMethodID(nullableOptionalIntEntryCls, "", "(I)V"); - nullableOptionalInt = - env->NewObject(nullableOptionalIntEntryCls, nullableOptionalIntEntryTypeCtor, nullableOptionalIntValue); - } + bool groupKeySetIndexNull = false; + bool groupKeySetIndexHasValue = true; - jobject nullableOptionalIntOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(nullableOptionalInt, nullableOptionalIntOptional); - bool nullableStringNull = false; - bool nullableStringHasValue = true; - chip::CharSpan nullableStringValue; - nullableStringNull = entry.nullableString.IsNull(); - if (!nullableStringNull) - { - nullableStringValue = entry.nullableString.Value(); - } + uint16_t groupKeySetIndexValue = entry.groupKeySetIndex; - jstring nullableString = nullptr; - chip::UtfString nullableStringStr(env, nullableStringValue); - if (!nullableStringNull && nullableStringHasValue) + jobject groupKeySetIndex = nullptr; + if (!groupKeySetIndexNull && groupKeySetIndexHasValue) { - nullableString = jstring(nullableStringStr.jniValue()); + jclass groupKeySetIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeySetIndexEntryCls); + chip::JniClass groupKeySetIndexJniClass(groupKeySetIndexEntryCls); + jmethodID groupKeySetIndexEntryTypeCtor = env->GetMethodID(groupKeySetIndexEntryCls, "", "(I)V"); + groupKeySetIndex = env->NewObject(groupKeySetIndexEntryCls, groupKeySetIndexEntryTypeCtor, groupKeySetIndexValue); } - bool optionalStringNull = false; - bool optionalStringHasValue = true; - - chip::CharSpan optionalStringValue; - optionalStringHasValue = entry.optionalString.HasValue(); - if (optionalStringHasValue) - { - optionalStringValue = entry.optionalString.Value(); - } + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, vendorId, vendorGroupId, groupKeySetIndex); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupsAttribute object")); - jstring optionalString = nullptr; - chip::UtfString optionalStringStr(env, optionalStringValue); - if (!optionalStringNull && optionalStringHasValue) - { - optionalString = jstring(optionalStringStr.jniValue()); - } + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding GroupsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - jobject optionalStringOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(optionalString, optionalStringOptional); - bool nullableOptionalStringNull = false; - bool nullableOptionalStringHasValue = true; + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} - chip::CharSpan nullableOptionalStringValue; - nullableOptionalStringHasValue = entry.nullableOptionalString.HasValue(); - if (nullableOptionalStringHasValue) - { - auto nullableOptionalStringValueFromOptional = entry.nullableOptionalString.Value(); - nullableOptionalStringNull = nullableOptionalStringValueFromOptional.IsNull(); - if (!nullableOptionalStringNull) - { - nullableOptionalStringValue = nullableOptionalStringValueFromOptional.Value(); - } - } - - jstring nullableOptionalString = nullptr; - chip::UtfString nullableOptionalStringStr(env, nullableOptionalStringValue); - if (!nullableOptionalStringNull && nullableOptionalStringHasValue) - { - nullableOptionalString = jstring(nullableOptionalStringStr.jniValue()); - } - - jobject nullableOptionalStringOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(nullableOptionalString, nullableOptionalStringOptional); - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, nullableInt, optionalIntOptional, nullableOptionalIntOptional, - nullableString, optionalStringOptional, nullableOptionalStringOptional); - VerifyOrReturn(attributeObj != nullptr, - ChipLogError(Zcl, "Could not create ListNullablesAndOptionalsStructAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListNullablesAndOptionalsStructAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPTestClusterListLongOctetStringAttributeCallback::CHIPTestClusterListLongOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGroupKeyManagementGroupKeysAttributeCallback::CHIPGroupKeyManagementGroupKeysAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5330,7 +5065,7 @@ CHIPTestClusterListLongOctetStringAttributeCallback::CHIPTestClusterListLongOcte } } -CHIPTestClusterListLongOctetStringAttributeCallback::~CHIPTestClusterListLongOctetStringAttributeCallback() +CHIPGroupKeyManagementGroupKeysAttributeCallback::~CHIPGroupKeyManagementGroupKeysAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5341,8 +5076,9 @@ CHIPTestClusterListLongOctetStringAttributeCallback::~CHIPTestClusterListLongOct env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5351,8 +5087,8 @@ void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5374,33 +5110,113 @@ void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeysAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeysAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupKeysAttribute constructor")); + auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; + auto & entry = iter.GetValue(); + (void) entry; + bool vendorIdNull = false; + bool vendorIdHasValue = true; - jbyteArray entryObject = nullptr; - if (!entryNull) + uint16_t vendorIdValue = entry.vendorId; + + jobject vendorId = nullptr; + if (!vendorIdNull && vendorIdHasValue) { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + jclass vendorIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); + chip::JniClass vendorIdJniClass(vendorIdEntryCls); + jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); + vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + bool groupKeyIndexNull = false; + bool groupKeyIndexHasValue = true; + + uint16_t groupKeyIndexValue = entry.groupKeyIndex; + + jobject groupKeyIndex = nullptr; + if (!groupKeyIndexNull && groupKeyIndexHasValue) + { + jclass groupKeyIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeyIndexEntryCls); + chip::JniClass groupKeyIndexJniClass(groupKeyIndexEntryCls); + jmethodID groupKeyIndexEntryTypeCtor = env->GetMethodID(groupKeyIndexEntryCls, "", "(I)V"); + groupKeyIndex = env->NewObject(groupKeyIndexEntryCls, groupKeyIndexEntryTypeCtor, groupKeyIndexValue); + } + + bool groupKeyRootNull = false; + bool groupKeyRootHasValue = true; + + chip::ByteSpan groupKeyRootValue = entry.groupKeyRoot; + + jbyteArray groupKeyRoot = nullptr; + if (!groupKeyRootNull && groupKeyRootHasValue) + { + groupKeyRoot = env->NewByteArray(groupKeyRootValue.size()); + env->SetByteArrayRegion(groupKeyRoot, 0, groupKeyRootValue.size(), + reinterpret_cast(groupKeyRootValue.data())); + } + + bool groupKeyEpochStartTimeNull = false; + bool groupKeyEpochStartTimeHasValue = true; + + uint64_t groupKeyEpochStartTimeValue = entry.groupKeyEpochStartTime; + + jobject groupKeyEpochStartTime = nullptr; + if (!groupKeyEpochStartTimeNull && groupKeyEpochStartTimeHasValue) + { + jclass groupKeyEpochStartTimeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", groupKeyEpochStartTimeEntryCls); + chip::JniClass groupKeyEpochStartTimeJniClass(groupKeyEpochStartTimeEntryCls); + jmethodID groupKeyEpochStartTimeEntryTypeCtor = env->GetMethodID(groupKeyEpochStartTimeEntryCls, "", "(J)V"); + groupKeyEpochStartTime = + env->NewObject(groupKeyEpochStartTimeEntryCls, groupKeyEpochStartTimeEntryTypeCtor, groupKeyEpochStartTimeValue); + } + + bool groupKeySecurityPolicyNull = false; + bool groupKeySecurityPolicyHasValue = true; + + chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; + + jobject groupKeySecurityPolicy = nullptr; + if (!groupKeySecurityPolicyNull && groupKeySecurityPolicyHasValue) + { + jclass groupKeySecurityPolicyEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeySecurityPolicyEntryCls); + chip::JniClass groupKeySecurityPolicyJniClass(groupKeySecurityPolicyEntryCls); + jmethodID groupKeySecurityPolicyEntryTypeCtor = env->GetMethodID(groupKeySecurityPolicyEntryCls, "", "(I)V"); + groupKeySecurityPolicy = + env->NewObject(groupKeySecurityPolicyEntryCls, groupKeySecurityPolicyEntryTypeCtor, groupKeySecurityPolicyValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, vendorId, groupKeyIndex, groupKeyRoot, + groupKeyEpochStartTime, groupKeySecurityPolicy); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupKeysAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListLongOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding GroupKeysAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableBooleanAttributeCallback::CHIPTestClusterNullableBooleanAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5417,7 +5233,7 @@ CHIPTestClusterNullableBooleanAttributeCallback::CHIPTestClusterNullableBooleanA } } -CHIPTestClusterNullableBooleanAttributeCallback::~CHIPTestClusterNullableBooleanAttributeCallback() +CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5428,7 +5244,8 @@ CHIPTestClusterNullableBooleanAttributeCallback::~CHIPTestClusterNullableBoolean env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBooleanAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5436,32 +5253,59 @@ void CHIPTestClusterNullableBooleanAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableBitmap16AttributeCallback::CHIPTestClusterNullableBitmap16AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPGroupsAttributeListAttributeCallback::CHIPGroupsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5477,7 +5321,7 @@ CHIPTestClusterNullableBitmap16AttributeCallback::CHIPTestClusterNullableBitmap1 } } -CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap16AttributeCallback() +CHIPGroupsAttributeListAttributeCallback::~CHIPGroupsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5488,8 +5332,8 @@ CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPGroupsAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5497,32 +5341,59 @@ void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableBitmap32AttributeCallback::CHIPTestClusterNullableBitmap32AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPIdentifyAttributeListAttributeCallback::CHIPIdentifyAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5538,7 +5409,7 @@ CHIPTestClusterNullableBitmap32AttributeCallback::CHIPTestClusterNullableBitmap3 } } -CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap32AttributeCallback() +CHIPIdentifyAttributeListAttributeCallback::~CHIPIdentifyAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5549,8 +5420,8 @@ CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIdentifyAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5558,31 +5429,60 @@ void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jobject javaValue; + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableBitmap64AttributeCallback::CHIPTestClusterNullableBitmap64AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5599,7 +5499,7 @@ CHIPTestClusterNullableBitmap64AttributeCallback::CHIPTestClusterNullableBitmap6 } } -CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap64AttributeCallback() +CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5610,8 +5510,8 @@ CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5619,8 +5519,8 @@ void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5628,22 +5528,22 @@ void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTestClusterNullableInt16uAttributeCallback::CHIPTestClusterNullableInt16uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5660,7 +5560,7 @@ CHIPTestClusterNullableInt16uAttributeCallback::CHIPTestClusterNullableInt16uAtt } } -CHIPTestClusterNullableInt16uAttributeCallback::~CHIPTestClusterNullableInt16uAttributeCallback() +CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5671,8 +5571,8 @@ CHIPTestClusterNullableInt16uAttributeCallback::~CHIPTestClusterNullableInt16uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5680,8 +5580,8 @@ void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5702,9 +5602,9 @@ void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTestClusterNullableInt24uAttributeCallback::CHIPTestClusterNullableInt24uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5721,7 +5621,7 @@ CHIPTestClusterNullableInt24uAttributeCallback::CHIPTestClusterNullableInt24uAtt } } -CHIPTestClusterNullableInt24uAttributeCallback::~CHIPTestClusterNullableInt24uAttributeCallback() +CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5732,8 +5632,8 @@ CHIPTestClusterNullableInt24uAttributeCallback::~CHIPTestClusterNullableInt24uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5741,8 +5641,8 @@ void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5750,22 +5650,22 @@ void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTestClusterNullableInt32uAttributeCallback::CHIPTestClusterNullableInt32uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPIlluminanceMeasurementAttributeListAttributeCallback::CHIPIlluminanceMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5782,7 +5682,7 @@ CHIPTestClusterNullableInt32uAttributeCallback::CHIPTestClusterNullableInt32uAtt } } -CHIPTestClusterNullableInt32uAttributeCallback::~CHIPTestClusterNullableInt32uAttributeCallback() +CHIPIlluminanceMeasurementAttributeListAttributeCallback::~CHIPIlluminanceMeasurementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5793,8 +5693,8 @@ CHIPTestClusterNullableInt32uAttributeCallback::~CHIPTestClusterNullableInt32uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt32uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5802,32 +5702,59 @@ void CHIPTestClusterNullableInt32uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt40uAttributeCallback::CHIPTestClusterNullableInt40uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPKeypadInputAttributeListAttributeCallback::CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5843,7 +5770,7 @@ CHIPTestClusterNullableInt40uAttributeCallback::CHIPTestClusterNullableInt40uAtt } } -CHIPTestClusterNullableInt40uAttributeCallback::~CHIPTestClusterNullableInt40uAttributeCallback() +CHIPKeypadInputAttributeListAttributeCallback::~CHIPKeypadInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5854,8 +5781,8 @@ CHIPTestClusterNullableInt40uAttributeCallback::~CHIPTestClusterNullableInt40uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt40uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5863,31 +5790,60 @@ void CHIPTestClusterNullableInt40uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt48uAttributeCallback::CHIPTestClusterNullableInt48uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5904,7 +5860,7 @@ CHIPTestClusterNullableInt48uAttributeCallback::CHIPTestClusterNullableInt48uAtt } } -CHIPTestClusterNullableInt48uAttributeCallback::~CHIPTestClusterNullableInt48uAttributeCallback() +CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5915,8 +5871,8 @@ CHIPTestClusterNullableInt48uAttributeCallback::~CHIPTestClusterNullableInt48uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5924,8 +5880,8 @@ void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5933,22 +5889,22 @@ void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTestClusterNullableInt56uAttributeCallback::CHIPTestClusterNullableInt56uAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5965,7 +5921,7 @@ CHIPTestClusterNullableInt56uAttributeCallback::CHIPTestClusterNullableInt56uAtt } } -CHIPTestClusterNullableInt56uAttributeCallback::~CHIPTestClusterNullableInt56uAttributeCallback() +CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5976,8 +5932,8 @@ CHIPTestClusterNullableInt56uAttributeCallback::~CHIPTestClusterNullableInt56uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5985,8 +5941,8 @@ void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -5994,22 +5950,22 @@ void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTestClusterNullableInt64uAttributeCallback::CHIPTestClusterNullableInt64uAttributeCallback(jobject javaCallback, +CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6026,7 +5982,7 @@ CHIPTestClusterNullableInt64uAttributeCallback::CHIPTestClusterNullableInt64uAtt } } -CHIPTestClusterNullableInt64uAttributeCallback::~CHIPTestClusterNullableInt64uAttributeCallback() +CHIPLevelControlAttributeListAttributeCallback::~CHIPLevelControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6037,8 +5993,8 @@ CHIPTestClusterNullableInt64uAttributeCallback::~CHIPTestClusterNullableInt64uAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt64uAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6046,30 +6002,59 @@ void CHIPTestClusterNullableInt64uAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt8sAttributeCallback::CHIPTestClusterNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLowPowerAttributeListAttributeCallback::CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6085,7 +6070,7 @@ CHIPTestClusterNullableInt8sAttributeCallback::CHIPTestClusterNullableInt8sAttri } } -CHIPTestClusterNullableInt8sAttributeCallback::~CHIPTestClusterNullableInt8sAttributeCallback() +CHIPLowPowerAttributeListAttributeCallback::~CHIPLowPowerAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6096,7 +6081,8 @@ CHIPTestClusterNullableInt8sAttributeCallback::~CHIPTestClusterNullableInt8sAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt8sAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6104,32 +6090,59 @@ void CHIPTestClusterNullableInt8sAttributeCallback::CallbackFn(void * context, c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt16sAttributeCallback::CHIPTestClusterNullableInt16sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaInputMediaInputListAttributeCallback::CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6145,7 +6158,7 @@ CHIPTestClusterNullableInt16sAttributeCallback::CHIPTestClusterNullableInt16sAtt } } -CHIPTestClusterNullableInt16sAttributeCallback::~CHIPTestClusterNullableInt16sAttributeCallback() +CHIPMediaInputMediaInputListAttributeCallback::~CHIPMediaInputMediaInputListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6156,8 +6169,9 @@ CHIPTestClusterNullableInt16sAttributeCallback::~CHIPTestClusterNullableInt16sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt16sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6165,32 +6179,115 @@ void CHIPTestClusterNullableInt16sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find MediaInputListAttribute constructor")); - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool indexNull = false; + bool indexHasValue = true; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + uint8_t indexValue = entry.index; + + jobject index = nullptr; + if (!indexNull && indexHasValue) + { + jclass indexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); + chip::JniClass indexJniClass(indexEntryCls); + jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); + index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); + } + + bool inputTypeNull = false; + bool inputTypeHasValue = true; + + chip::app::Clusters::MediaInput::MediaInputType inputTypeValue = entry.inputType; + + jobject inputType = nullptr; + if (!inputTypeNull && inputTypeHasValue) + { + jclass inputTypeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", inputTypeEntryCls); + chip::JniClass inputTypeJniClass(inputTypeEntryCls); + jmethodID inputTypeEntryTypeCtor = env->GetMethodID(inputTypeEntryCls, "", "(I)V"); + inputType = env->NewObject(inputTypeEntryCls, inputTypeEntryTypeCtor, inputTypeValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + bool descriptionNull = false; + bool descriptionHasValue = true; + + chip::CharSpan descriptionValue = entry.description; + + jstring description = nullptr; + chip::UtfString descriptionStr(env, descriptionValue); + if (!descriptionNull && descriptionHasValue) + { + description = jstring(descriptionStr.jniValue()); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, inputType, name, description); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create MediaInputListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding MediaInputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt24sAttributeCallback::CHIPTestClusterNullableInt24sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMediaInputAttributeListAttributeCallback::CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6206,7 +6303,7 @@ CHIPTestClusterNullableInt24sAttributeCallback::CHIPTestClusterNullableInt24sAtt } } -CHIPTestClusterNullableInt24sAttributeCallback::~CHIPTestClusterNullableInt24sAttributeCallback() +CHIPMediaInputAttributeListAttributeCallback::~CHIPMediaInputAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6217,8 +6314,8 @@ CHIPTestClusterNullableInt24sAttributeCallback::~CHIPTestClusterNullableInt24sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt24sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6226,31 +6323,60 @@ void CHIPTestClusterNullableInt24sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt32sAttributeCallback::CHIPTestClusterNullableInt32sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMediaPlaybackAttributeListAttributeCallback::CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6267,7 +6393,7 @@ CHIPTestClusterNullableInt32sAttributeCallback::CHIPTestClusterNullableInt32sAtt } } -CHIPTestClusterNullableInt32sAttributeCallback::~CHIPTestClusterNullableInt32sAttributeCallback() +CHIPMediaPlaybackAttributeListAttributeCallback::~CHIPMediaPlaybackAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6278,8 +6404,8 @@ CHIPTestClusterNullableInt32sAttributeCallback::~CHIPTestClusterNullableInt32sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt32sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6287,32 +6413,59 @@ void CHIPTestClusterNullableInt32sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt40sAttributeCallback::CHIPTestClusterNullableInt40sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6328,7 +6481,7 @@ CHIPTestClusterNullableInt40sAttributeCallback::CHIPTestClusterNullableInt40sAtt } } -CHIPTestClusterNullableInt40sAttributeCallback::~CHIPTestClusterNullableInt40sAttributeCallback() +CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6339,8 +6492,9 @@ CHIPTestClusterNullableInt40sAttributeCallback::~CHIPTestClusterNullableInt40sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt40sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6348,32 +6502,103 @@ void CHIPTestClusterNullableInt40sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SupportedModesAttribute constructor")); - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool labelNull = false; + bool labelHasValue = true; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + chip::CharSpan labelValue = entry.label; + + jstring label = nullptr; + chip::UtfString labelStr(env, labelValue); + if (!labelNull && labelHasValue) + { + label = jstring(labelStr.jniValue()); + } + + bool modeNull = false; + bool modeHasValue = true; + + uint8_t modeValue = entry.mode; + + jobject mode = nullptr; + if (!modeNull && modeHasValue) + { + jclass modeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", modeEntryCls); + chip::JniClass modeJniClass(modeEntryCls); + jmethodID modeEntryTypeCtor = env->GetMethodID(modeEntryCls, "", "(I)V"); + mode = env->NewObject(modeEntryCls, modeEntryTypeCtor, modeValue); + } + + bool semanticTagNull = false; + bool semanticTagHasValue = true; + + uint32_t semanticTagValue = entry.semanticTag; + + jobject semanticTag = nullptr; + if (!semanticTagNull && semanticTagHasValue) + { + jclass semanticTagEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", semanticTagEntryCls); + chip::JniClass semanticTagJniClass(semanticTagEntryCls); + jmethodID semanticTagEntryTypeCtor = env->GetMethodID(semanticTagEntryCls, "", "(J)V"); + semanticTag = env->NewObject(semanticTagEntryCls, semanticTagEntryTypeCtor, semanticTagValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, mode, semanticTag); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SupportedModesAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SupportedModesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt48sAttributeCallback::CHIPTestClusterNullableInt48sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6389,7 +6614,7 @@ CHIPTestClusterNullableInt48sAttributeCallback::CHIPTestClusterNullableInt48sAtt } } -CHIPTestClusterNullableInt48sAttributeCallback::~CHIPTestClusterNullableInt48sAttributeCallback() +CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6400,8 +6625,8 @@ CHIPTestClusterNullableInt48sAttributeCallback::~CHIPTestClusterNullableInt48sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt48sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6409,31 +6634,60 @@ void CHIPTestClusterNullableInt48sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt56sAttributeCallback::CHIPTestClusterNullableInt56sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNetworkCommissioningAttributeListAttributeCallback::CHIPNetworkCommissioningAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6450,7 +6704,7 @@ CHIPTestClusterNullableInt56sAttributeCallback::CHIPTestClusterNullableInt56sAtt } } -CHIPTestClusterNullableInt56sAttributeCallback::~CHIPTestClusterNullableInt56sAttributeCallback() +CHIPNetworkCommissioningAttributeListAttributeCallback::~CHIPNetworkCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6461,8 +6715,8 @@ CHIPTestClusterNullableInt56sAttributeCallback::~CHIPTestClusterNullableInt56sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt56sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6470,31 +6724,60 @@ void CHIPTestClusterNullableInt56sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableInt64sAttributeCallback::CHIPTestClusterNullableInt64sAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6511,7 +6794,7 @@ CHIPTestClusterNullableInt64sAttributeCallback::CHIPTestClusterNullableInt64sAtt } } -CHIPTestClusterNullableInt64sAttributeCallback::~CHIPTestClusterNullableInt64sAttributeCallback() +CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6522,8 +6805,8 @@ CHIPTestClusterNullableInt64sAttributeCallback::~CHIPTestClusterNullableInt64sAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableInt64sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6531,31 +6814,60 @@ void CHIPTestClusterNullableInt64sAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableEnum16AttributeCallback::CHIPTestClusterNullableEnum16AttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6572,7 +6884,7 @@ CHIPTestClusterNullableEnum16AttributeCallback::CHIPTestClusterNullableEnum16Att } } -CHIPTestClusterNullableEnum16AttributeCallback::~CHIPTestClusterNullableEnum16AttributeCallback() +CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6583,8 +6895,8 @@ CHIPTestClusterNullableEnum16AttributeCallback::~CHIPTestClusterNullableEnum16At env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableEnum16AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6592,31 +6904,60 @@ void CHIPTestClusterNullableEnum16AttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableFloatSingleAttributeCallback::CHIPTestClusterNullableFloatSingleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOccupancySensingAttributeListAttributeCallback::CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6633,7 +6974,7 @@ CHIPTestClusterNullableFloatSingleAttributeCallback::CHIPTestClusterNullableFloa } } -CHIPTestClusterNullableFloatSingleAttributeCallback::~CHIPTestClusterNullableFloatSingleAttributeCallback() +CHIPOccupancySensingAttributeListAttributeCallback::~CHIPOccupancySensingAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6644,8 +6985,8 @@ CHIPTestClusterNullableFloatSingleAttributeCallback::~CHIPTestClusterNullableFlo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableFloatSingleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6653,32 +6994,59 @@ void CHIPTestClusterNullableFloatSingleAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableFloatDoubleAttributeCallback::CHIPTestClusterNullableFloatDoubleAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6694,7 +7062,7 @@ CHIPTestClusterNullableFloatDoubleAttributeCallback::CHIPTestClusterNullableFloa } } -CHIPTestClusterNullableFloatDoubleAttributeCallback::~CHIPTestClusterNullableFloatDoubleAttributeCallback() +CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6705,8 +7073,8 @@ CHIPTestClusterNullableFloatDoubleAttributeCallback::~CHIPTestClusterNullableFlo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableFloatDoubleAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6714,31 +7082,60 @@ void CHIPTestClusterNullableFloatDoubleAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Double;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - std::string javaValueClassName = "java/lang/Double"; - std::string javaValueCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableOctetStringAttributeCallback::CHIPTestClusterNullableOctetStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6755,7 +7152,7 @@ CHIPTestClusterNullableOctetStringAttributeCallback::CHIPTestClusterNullableOcte } } -CHIPTestClusterNullableOctetStringAttributeCallback::~CHIPTestClusterNullableOctetStringAttributeCallback() +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6766,8 +7163,8 @@ CHIPTestClusterNullableOctetStringAttributeCallback::~CHIPTestClusterNullableOct env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6775,29 +7172,60 @@ void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - chip::ByteArray javaValueByteArray(env, value.Value()); - javaValue = javaValueByteArray.jniValue(); + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableCharStringAttributeCallback::CHIPTestClusterNullableCharStringAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsFabricsListAttributeCallback::CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6814,7 +7242,7 @@ CHIPTestClusterNullableCharStringAttributeCallback::CHIPTestClusterNullableCharS } } -CHIPTestClusterNullableCharStringAttributeCallback::~CHIPTestClusterNullableCharStringAttributeCallback() +CHIPOperationalCredentialsFabricsListAttributeCallback::~CHIPOperationalCredentialsFabricsListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6825,8 +7253,10 @@ CHIPTestClusterNullableCharStringAttributeCallback::~CHIPTestClusterNullableChar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6834,90 +7264,148 @@ void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - - chip::UtfString javaValueUtfString(env, value.Value()); - javaValue = javaValueUtfString.jniValue(); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); -CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, + "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID( + attributeClass, "", "(Ljava/lang/Integer;[BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find FabricsListAttribute constructor")); - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) + auto iter = list.begin(); + while (iter.Next()) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} + auto & entry = iter.GetValue(); + (void) entry; + bool fabricIndexNull = false; + bool fabricIndexHasValue = true; -CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} + uint8_t fabricIndexValue = entry.fabricIndex; -void CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; + jobject fabricIndex = nullptr; + if (!fabricIndexNull && fabricIndexHasValue) + { + jclass fabricIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); + chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); + jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); + fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + } - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + bool rootPublicKeyNull = false; + bool rootPublicKeyHasValue = true; - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + chip::ByteSpan rootPublicKeyValue = entry.rootPublicKey; - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jbyteArray rootPublicKey = nullptr; + if (!rootPublicKeyNull && rootPublicKeyHasValue) + { + rootPublicKey = env->NewByteArray(rootPublicKeyValue.size()); + env->SetByteArrayRegion(rootPublicKey, 0, rootPublicKeyValue.size(), + reinterpret_cast(rootPublicKeyValue.data())); + } - jobject javaValue; + bool vendorIdNull = false; + bool vendorIdHasValue = true; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + uint16_t vendorIdValue = entry.vendorId; - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + jobject vendorId = nullptr; + if (!vendorIdNull && vendorIdHasValue) + { + jclass vendorIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); + chip::JniClass vendorIdJniClass(vendorIdEntryCls); + jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); + vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); + } + + bool fabricIdNull = false; + bool fabricIdHasValue = true; + + chip::FabricId fabricIdValue = entry.fabricId; + + jobject fabricId = nullptr; + if (!fabricIdNull && fabricIdHasValue) + { + jclass fabricIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIdEntryCls); + chip::JniClass fabricIdJniClass(fabricIdEntryCls); + jmethodID fabricIdEntryTypeCtor = env->GetMethodID(fabricIdEntryCls, "", "(J)V"); + fabricId = env->NewObject(fabricIdEntryCls, fabricIdEntryTypeCtor, fabricIdValue); + } + + bool nodeIdNull = false; + bool nodeIdHasValue = true; + + chip::NodeId nodeIdValue = entry.nodeId; + + jobject nodeId = nullptr; + if (!nodeIdNull && nodeIdHasValue) + { + jclass nodeIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", nodeIdEntryCls); + chip::JniClass nodeIdJniClass(nodeIdEntryCls); + jmethodID nodeIdEntryTypeCtor = env->GetMethodID(nodeIdEntryCls, "", "(J)V"); + nodeId = env->NewObject(nodeIdEntryCls, nodeIdEntryTypeCtor, nodeIdValue); + } + + bool labelNull = false; + bool labelHasValue = true; + + chip::CharSpan labelValue = entry.label; + + jstring label = nullptr; + chip::UtfString labelStr(env, labelValue); + if (!labelNull && labelHasValue) + { + label = jstring(labelStr.jniValue()); + } + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, fabricIndex, rootPublicKey, vendorId, fabricId, nodeId, label); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create FabricsListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding FabricsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6934,7 +7422,8 @@ CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CHIPTestClusterNu } } -CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback() +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6945,8 +7434,8 @@ CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::~CHIPTestClusterN env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6954,31 +7443,57 @@ void CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ByteSpan entryValue = entry; - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + jbyteArray entryObject = nullptr; + if (!entryNull) + { + entryObject = env->NewByteArray(entryValue.size()); + env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding TrustedRootCertificatesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback( +CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6995,7 +7510,7 @@ CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CHIPTestClusterNu } } -CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback() +CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7006,8 +7521,7 @@ CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::~CHIPTestClusterN env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(void * context, chip::FabricIndex value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7015,8 +7529,8 @@ void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -7031,15 +7545,15 @@ void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::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); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), + javaValueCtorSignature.c_str(), value, javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback( +CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7056,7 +7570,7 @@ CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CHIPThreadNetwor } } -CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::~CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback() +CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7067,10 +7581,8 @@ CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::~CHIPThreadNetwo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) +void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7079,8 +7591,8 @@ void CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -7102,255 +7614,5412 @@ void CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CHIPPowerSourceActiveBatteryFaultsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPowerSourceActiveBatteryFaultsAttributeCallback::~CHIPPowerSourceActiveBatteryFaultsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ActiveBatteryFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPowerSourceAttributeListAttributeCallback::CHIPPowerSourceAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPowerSourceAttributeListAttributeCallback::~CHIPPowerSourceAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SourcesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPowerSourceConfigurationAttributeListAttributeCallback::CHIPPowerSourceConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPowerSourceConfigurationAttributeListAttributeCallback::~CHIPPowerSourceConfigurationAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPressureMeasurementAttributeListAttributeCallback::~CHIPPressureMeasurementAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CHIPPumpConfigurationAndControlAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlAttributeListAttributeCallback::~CHIPPumpConfigurationAndControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CHIPRelativeHumidityMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPScenesAttributeListAttributeCallback::CHIPScenesAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesAttributeListAttributeCallback::~CHIPScenesAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, + "Could not find class chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID( + attributeClass, "", "(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ThreadMetricsAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool idNull = false; + bool idHasValue = true; + + uint64_t idValue = entry.id; + + jobject id = nullptr; + if (!idNull && idHasValue) + { + jclass idEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", idEntryCls); + chip::JniClass idJniClass(idEntryCls); + jmethodID idEntryTypeCtor = env->GetMethodID(idEntryCls, "", "(J)V"); + id = env->NewObject(idEntryCls, idEntryTypeCtor, idValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + bool stackFreeCurrentNull = false; + bool stackFreeCurrentHasValue = true; + + uint32_t stackFreeCurrentValue = entry.stackFreeCurrent; + + jobject stackFreeCurrent = nullptr; + if (!stackFreeCurrentNull && stackFreeCurrentHasValue) + { + jclass stackFreeCurrentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeCurrentEntryCls); + chip::JniClass stackFreeCurrentJniClass(stackFreeCurrentEntryCls); + jmethodID stackFreeCurrentEntryTypeCtor = env->GetMethodID(stackFreeCurrentEntryCls, "", "(J)V"); + stackFreeCurrent = env->NewObject(stackFreeCurrentEntryCls, stackFreeCurrentEntryTypeCtor, stackFreeCurrentValue); + } + + bool stackFreeMinimumNull = false; + bool stackFreeMinimumHasValue = true; + + uint32_t stackFreeMinimumValue = entry.stackFreeMinimum; + + jobject stackFreeMinimum = nullptr; + if (!stackFreeMinimumNull && stackFreeMinimumHasValue) + { + jclass stackFreeMinimumEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeMinimumEntryCls); + chip::JniClass stackFreeMinimumJniClass(stackFreeMinimumEntryCls); + jmethodID stackFreeMinimumEntryTypeCtor = env->GetMethodID(stackFreeMinimumEntryCls, "", "(J)V"); + stackFreeMinimum = env->NewObject(stackFreeMinimumEntryCls, stackFreeMinimumEntryTypeCtor, stackFreeMinimumValue); + } + + bool stackSizeNull = false; + bool stackSizeHasValue = true; + + uint32_t stackSizeValue = entry.stackSize; + + jobject stackSize = nullptr; + if (!stackSizeNull && stackSizeHasValue) + { + jclass stackSizeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackSizeEntryCls); + chip::JniClass stackSizeJniClass(stackSizeEntryCls); + jmethodID stackSizeEntryTypeCtor = env->GetMethodID(stackSizeEntryCls, "", "(J)V"); + stackSize = env->NewObject(stackSizeEntryCls, stackSizeEntryTypeCtor, stackSizeValue); + } + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, id, name, stackFreeCurrent, stackFreeMinimum, stackSize); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ThreadMetricsAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ThreadMetricsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CHIPSoftwareDiagnosticsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPSoftwareDiagnosticsAttributeListAttributeCallback::~CHIPSoftwareDiagnosticsAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTvChannelTvChannelListAttributeCallback::CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTvChannelTvChannelListAttributeCallback::~CHIPTvChannelTvChannelListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTvChannelTvChannelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$TvChannelCluster$TvChannelListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TvChannelListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool majorNumberNull = false; + bool majorNumberHasValue = true; + + uint16_t majorNumberValue = entry.majorNumber; + + jobject majorNumber = nullptr; + if (!majorNumberNull && majorNumberHasValue) + { + jclass majorNumberEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", majorNumberEntryCls); + chip::JniClass majorNumberJniClass(majorNumberEntryCls); + jmethodID majorNumberEntryTypeCtor = env->GetMethodID(majorNumberEntryCls, "", "(I)V"); + majorNumber = env->NewObject(majorNumberEntryCls, majorNumberEntryTypeCtor, majorNumberValue); + } + + bool minorNumberNull = false; + bool minorNumberHasValue = true; + + uint16_t minorNumberValue = entry.minorNumber; + + jobject minorNumber = nullptr; + if (!minorNumberNull && minorNumberHasValue) + { + jclass minorNumberEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", minorNumberEntryCls); + chip::JniClass minorNumberJniClass(minorNumberEntryCls); + jmethodID minorNumberEntryTypeCtor = env->GetMethodID(minorNumberEntryCls, "", "(I)V"); + minorNumber = env->NewObject(minorNumberEntryCls, minorNumberEntryTypeCtor, minorNumberValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + bool callSignNull = false; + bool callSignHasValue = true; + + chip::CharSpan callSignValue = entry.callSign; + + jstring callSign = nullptr; + chip::UtfString callSignStr(env, callSignValue); + if (!callSignNull && callSignHasValue) + { + callSign = jstring(callSignStr.jniValue()); + } + + bool affiliateCallSignNull = false; + bool affiliateCallSignHasValue = true; + + chip::CharSpan affiliateCallSignValue = entry.affiliateCallSign; + + jstring affiliateCallSign = nullptr; + chip::UtfString affiliateCallSignStr(env, affiliateCallSignValue); + if (!affiliateCallSignNull && affiliateCallSignHasValue) + { + affiliateCallSign = jstring(affiliateCallSignStr.jniValue()); + } + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TvChannelListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding TvChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTvChannelAttributeListAttributeCallback::CHIPTvChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTvChannelAttributeListAttributeCallback::~CHIPTvChannelAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTvChannelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CHIPTargetNavigatorTargetNavigatorListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTargetNavigatorTargetNavigatorListAttributeCallback::~CHIPTargetNavigatorTargetNavigatorListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError( + Zcl, "Could not find class chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TargetNavigatorListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool identifierNull = false; + bool identifierHasValue = true; + + uint8_t identifierValue = entry.identifier; + + jobject identifier = nullptr; + if (!identifierNull && identifierHasValue) + { + jclass identifierEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", identifierEntryCls); + chip::JniClass identifierJniClass(identifierEntryCls); + jmethodID identifierEntryTypeCtor = env->GetMethodID(identifierEntryCls, "", "(I)V"); + identifier = env->NewObject(identifierEntryCls, identifierEntryTypeCtor, identifierValue); + } + + bool nameNull = false; + bool nameHasValue = true; + + chip::CharSpan nameValue = entry.name; + + jstring name = nullptr; + chip::UtfString nameStr(env, nameValue); + if (!nameNull && nameHasValue) + { + name = jstring(nameStr.jniValue()); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, identifier, name); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TargetNavigatorListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding TargetNavigatorListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTargetNavigatorAttributeListAttributeCallback::CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTargetNavigatorAttributeListAttributeCallback::~CHIPTargetNavigatorAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTemperatureMeasurementAttributeListAttributeCallback::CHIPTemperatureMeasurementAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTemperatureMeasurementAttributeListAttributeCallback::~CHIPTemperatureMeasurementAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterListInt8uAttributeCallback::CHIPTestClusterListInt8uAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterListInt8uAttributeCallback::~CHIPTestClusterListInt8uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + uint8_t entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ListInt8uAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterListOctetStringAttributeCallback::CHIPTestClusterListOctetStringAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterListOctetStringAttributeCallback::~CHIPTestClusterListOctetStringAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ByteSpan entryValue = entry; + + jbyteArray entryObject = nullptr; + if (!entryNull) + { + entryObject = env->NewByteArray(entryValue.size()); + env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ListOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterListStructOctetStringAttributeCallback::CHIPTestClusterListStructOctetStringAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterListStructOctetStringAttributeCallback::~CHIPTestClusterListStructOctetStringAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, + "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;[B)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ListStructOctetStringAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool fabricIndexNull = false; + bool fabricIndexHasValue = true; + + uint64_t fabricIndexValue = entry.fabricIndex; + + jobject fabricIndex = nullptr; + if (!fabricIndexNull && fabricIndexHasValue) + { + jclass fabricIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIndexEntryCls); + chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); + jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(J)V"); + fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + } + + bool operationalCertNull = false; + bool operationalCertHasValue = true; + + chip::ByteSpan operationalCertValue = entry.operationalCert; + + jbyteArray operationalCert = nullptr; + if (!operationalCertNull && operationalCertHasValue) + { + operationalCert = env->NewByteArray(operationalCertValue.size()); + env->SetByteArrayRegion(operationalCert, 0, operationalCertValue.size(), + reinterpret_cast(operationalCertValue.data())); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, operationalCert); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ListStructOctetStringAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ListStructOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterVendorIdAttributeCallback::CHIPTestClusterVendorIdAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterVendorIdAttributeCallback::~CHIPTestClusterVendorIdAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterVendorIdAttributeCallback::CallbackFn(void * context, chip::VendorId value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value, javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::~CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError( + Zcl, + "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID( + attributeClass, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V"); + VerifyOrReturn(attributeCtor != nullptr, + ChipLogError(Zcl, "Could not find ListNullablesAndOptionalsStructAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool nullableIntNull = false; + bool nullableIntHasValue = true; + uint16_t nullableIntValue; + nullableIntNull = entry.nullableInt.IsNull(); + if (!nullableIntNull) + { + nullableIntValue = entry.nullableInt.Value(); + } + + jobject nullableInt = nullptr; + if (!nullableIntNull && nullableIntHasValue) + { + jclass nullableIntEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableIntEntryCls); + chip::JniClass nullableIntJniClass(nullableIntEntryCls); + jmethodID nullableIntEntryTypeCtor = env->GetMethodID(nullableIntEntryCls, "", "(I)V"); + nullableInt = env->NewObject(nullableIntEntryCls, nullableIntEntryTypeCtor, nullableIntValue); + } + + bool optionalIntNull = false; + bool optionalIntHasValue = true; + + uint16_t optionalIntValue; + optionalIntHasValue = entry.optionalInt.HasValue(); + if (optionalIntHasValue) + { + optionalIntValue = entry.optionalInt.Value(); + } + + jobject optionalInt = nullptr; + if (!optionalIntNull && optionalIntHasValue) + { + jclass optionalIntEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", optionalIntEntryCls); + chip::JniClass optionalIntJniClass(optionalIntEntryCls); + jmethodID optionalIntEntryTypeCtor = env->GetMethodID(optionalIntEntryCls, "", "(I)V"); + optionalInt = env->NewObject(optionalIntEntryCls, optionalIntEntryTypeCtor, optionalIntValue); + } + + jobject optionalIntOptional = nullptr; + chip::JniReferences::GetInstance().CreateOptional(optionalInt, optionalIntOptional); + bool nullableOptionalIntNull = false; + bool nullableOptionalIntHasValue = true; + + uint16_t nullableOptionalIntValue; + nullableOptionalIntHasValue = entry.nullableOptionalInt.HasValue(); + if (nullableOptionalIntHasValue) + { + auto nullableOptionalIntValueFromOptional = entry.nullableOptionalInt.Value(); + nullableOptionalIntNull = nullableOptionalIntValueFromOptional.IsNull(); + if (!nullableOptionalIntNull) + { + nullableOptionalIntValue = nullableOptionalIntValueFromOptional.Value(); + } + } + + jobject nullableOptionalInt = nullptr; + if (!nullableOptionalIntNull && nullableOptionalIntHasValue) + { + jclass nullableOptionalIntEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableOptionalIntEntryCls); + chip::JniClass nullableOptionalIntJniClass(nullableOptionalIntEntryCls); + jmethodID nullableOptionalIntEntryTypeCtor = env->GetMethodID(nullableOptionalIntEntryCls, "", "(I)V"); + nullableOptionalInt = + env->NewObject(nullableOptionalIntEntryCls, nullableOptionalIntEntryTypeCtor, nullableOptionalIntValue); + } + + jobject nullableOptionalIntOptional = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullableOptionalInt, nullableOptionalIntOptional); + bool nullableStringNull = false; + bool nullableStringHasValue = true; + chip::CharSpan nullableStringValue; + nullableStringNull = entry.nullableString.IsNull(); + if (!nullableStringNull) + { + nullableStringValue = entry.nullableString.Value(); + } + + jstring nullableString = nullptr; + chip::UtfString nullableStringStr(env, nullableStringValue); + if (!nullableStringNull && nullableStringHasValue) + { + nullableString = jstring(nullableStringStr.jniValue()); + } + + bool optionalStringNull = false; + bool optionalStringHasValue = true; + + chip::CharSpan optionalStringValue; + optionalStringHasValue = entry.optionalString.HasValue(); + if (optionalStringHasValue) + { + optionalStringValue = entry.optionalString.Value(); + } + + jstring optionalString = nullptr; + chip::UtfString optionalStringStr(env, optionalStringValue); + if (!optionalStringNull && optionalStringHasValue) + { + optionalString = jstring(optionalStringStr.jniValue()); + } + + jobject optionalStringOptional = nullptr; + chip::JniReferences::GetInstance().CreateOptional(optionalString, optionalStringOptional); + bool nullableOptionalStringNull = false; + bool nullableOptionalStringHasValue = true; + + chip::CharSpan nullableOptionalStringValue; + nullableOptionalStringHasValue = entry.nullableOptionalString.HasValue(); + if (nullableOptionalStringHasValue) + { + auto nullableOptionalStringValueFromOptional = entry.nullableOptionalString.Value(); + nullableOptionalStringNull = nullableOptionalStringValueFromOptional.IsNull(); + if (!nullableOptionalStringNull) + { + nullableOptionalStringValue = nullableOptionalStringValueFromOptional.Value(); + } + } + + jstring nullableOptionalString = nullptr; + chip::UtfString nullableOptionalStringStr(env, nullableOptionalStringValue); + if (!nullableOptionalStringNull && nullableOptionalStringHasValue) + { + nullableOptionalString = jstring(nullableOptionalStringStr.jniValue()); + } + + jobject nullableOptionalStringOptional = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullableOptionalString, nullableOptionalStringOptional); + + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, nullableInt, optionalIntOptional, nullableOptionalIntOptional, + nullableString, optionalStringOptional, nullableOptionalStringOptional); + VerifyOrReturn(attributeObj != nullptr, + ChipLogError(Zcl, "Could not create ListNullablesAndOptionalsStructAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ListNullablesAndOptionalsStructAttribute value: %" CHIP_ERROR_FORMAT, + iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterListLongOctetStringAttributeCallback::CHIPTestClusterListLongOctetStringAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterListLongOctetStringAttributeCallback::~CHIPTestClusterListLongOctetStringAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::ByteSpan entryValue = entry; + + jbyteArray entryObject = nullptr; + if (!entryNull) + { + entryObject = env->NewByteArray(entryValue.size()); + env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding ListLongOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPTestClusterNullableBooleanAttributeCallback::CHIPTestClusterNullableBooleanAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableBooleanAttributeCallback::~CHIPTestClusterNullableBooleanAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableBooleanAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableBitmap16AttributeCallback::CHIPTestClusterNullableBitmap16AttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap16AttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableBitmap32AttributeCallback::CHIPTestClusterNullableBitmap32AttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap32AttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableBitmap64AttributeCallback::CHIPTestClusterNullableBitmap64AttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap64AttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt16uAttributeCallback::CHIPTestClusterNullableInt16uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt16uAttributeCallback::~CHIPTestClusterNullableInt16uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt24uAttributeCallback::CHIPTestClusterNullableInt24uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt24uAttributeCallback::~CHIPTestClusterNullableInt24uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt32uAttributeCallback::CHIPTestClusterNullableInt32uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt32uAttributeCallback::~CHIPTestClusterNullableInt32uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt32uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt40uAttributeCallback::CHIPTestClusterNullableInt40uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt40uAttributeCallback::~CHIPTestClusterNullableInt40uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt40uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt48uAttributeCallback::CHIPTestClusterNullableInt48uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt48uAttributeCallback::~CHIPTestClusterNullableInt48uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt56uAttributeCallback::CHIPTestClusterNullableInt56uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt56uAttributeCallback::~CHIPTestClusterNullableInt56uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt64uAttributeCallback::CHIPTestClusterNullableInt64uAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt64uAttributeCallback::~CHIPTestClusterNullableInt64uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt64uAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt8sAttributeCallback::CHIPTestClusterNullableInt8sAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt8sAttributeCallback::~CHIPTestClusterNullableInt8sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt8sAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt16sAttributeCallback::CHIPTestClusterNullableInt16sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt16sAttributeCallback::~CHIPTestClusterNullableInt16sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt16sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt24sAttributeCallback::CHIPTestClusterNullableInt24sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt24sAttributeCallback::~CHIPTestClusterNullableInt24sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt24sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt32sAttributeCallback::CHIPTestClusterNullableInt32sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt32sAttributeCallback::~CHIPTestClusterNullableInt32sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt32sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt40sAttributeCallback::CHIPTestClusterNullableInt40sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt40sAttributeCallback::~CHIPTestClusterNullableInt40sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt40sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt48sAttributeCallback::CHIPTestClusterNullableInt48sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt48sAttributeCallback::~CHIPTestClusterNullableInt48sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt48sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt56sAttributeCallback::CHIPTestClusterNullableInt56sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt56sAttributeCallback::~CHIPTestClusterNullableInt56sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt56sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableInt64sAttributeCallback::CHIPTestClusterNullableInt64sAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableInt64sAttributeCallback::~CHIPTestClusterNullableInt64sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableInt64sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableEnum16AttributeCallback::CHIPTestClusterNullableEnum16AttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableEnum16AttributeCallback::~CHIPTestClusterNullableEnum16AttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableEnum16AttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableFloatSingleAttributeCallback::CHIPTestClusterNullableFloatSingleAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableFloatSingleAttributeCallback::~CHIPTestClusterNullableFloatSingleAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableFloatSingleAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Float;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableFloatDoubleAttributeCallback::CHIPTestClusterNullableFloatDoubleAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableFloatDoubleAttributeCallback::~CHIPTestClusterNullableFloatDoubleAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableFloatDoubleAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Double;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Double"; + std::string javaValueCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableOctetStringAttributeCallback::CHIPTestClusterNullableOctetStringAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableOctetStringAttributeCallback::~CHIPTestClusterNullableOctetStringAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + chip::ByteArray javaValueByteArray(env, value.Value()); + javaValue = javaValueByteArray.jniValue(); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableCharStringAttributeCallback::CHIPTestClusterNullableCharStringAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableCharStringAttributeCallback::~CHIPTestClusterNullableCharStringAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + chip::UtfString javaValueUtfString(env, value.Value()); + javaValue = javaValueUtfString.jniValue(); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::~CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPTestClusterAttributeListAttributeCallback::CHIPTestClusterAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPTestClusterAttributeListAttributeCallback::~CHIPTestClusterAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPTestClusterAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatAttributeListAttributeCallback::CHIPThermostatAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatAttributeListAttributeCallback::~CHIPThermostatAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: + CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback:: + ~CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::~CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError( + Zcl, + "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NeighborTableListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool extAddressNull = false; + bool extAddressHasValue = true; + + uint64_t extAddressValue = entry.extAddress; + + jobject extAddress = nullptr; + if (!extAddressNull && extAddressHasValue) + { + jclass extAddressEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); + chip::JniClass extAddressJniClass(extAddressEntryCls); + jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); + extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); + } + + bool ageNull = false; + bool ageHasValue = true; + + uint32_t ageValue = entry.age; + + jobject age = nullptr; + if (!ageNull && ageHasValue) + { + jclass ageEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", ageEntryCls); + chip::JniClass ageJniClass(ageEntryCls); + jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(J)V"); + age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); + } + + bool rloc16Null = false; + bool rloc16HasValue = true; + + uint16_t rloc16Value = entry.rloc16; + + jobject rloc16 = nullptr; + if (!rloc16Null && rloc16HasValue) + { + jclass rloc16EntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); + chip::JniClass rloc16JniClass(rloc16EntryCls); + jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); + rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); + } + + bool linkFrameCounterNull = false; + bool linkFrameCounterHasValue = true; + + uint32_t linkFrameCounterValue = entry.linkFrameCounter; + + jobject linkFrameCounter = nullptr; + if (!linkFrameCounterNull && linkFrameCounterHasValue) + { + jclass linkFrameCounterEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", linkFrameCounterEntryCls); + chip::JniClass linkFrameCounterJniClass(linkFrameCounterEntryCls); + jmethodID linkFrameCounterEntryTypeCtor = env->GetMethodID(linkFrameCounterEntryCls, "", "(J)V"); + linkFrameCounter = env->NewObject(linkFrameCounterEntryCls, linkFrameCounterEntryTypeCtor, linkFrameCounterValue); + } + + bool mleFrameCounterNull = false; + bool mleFrameCounterHasValue = true; + + uint32_t mleFrameCounterValue = entry.mleFrameCounter; + + jobject mleFrameCounter = nullptr; + if (!mleFrameCounterNull && mleFrameCounterHasValue) + { + jclass mleFrameCounterEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", mleFrameCounterEntryCls); + chip::JniClass mleFrameCounterJniClass(mleFrameCounterEntryCls); + jmethodID mleFrameCounterEntryTypeCtor = env->GetMethodID(mleFrameCounterEntryCls, "", "(J)V"); + mleFrameCounter = env->NewObject(mleFrameCounterEntryCls, mleFrameCounterEntryTypeCtor, mleFrameCounterValue); + } + + bool lqiNull = false; + bool lqiHasValue = true; + + uint8_t lqiValue = entry.lqi; + + jobject lqi = nullptr; + if (!lqiNull && lqiHasValue) + { + jclass lqiEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lqiEntryCls); + chip::JniClass lqiJniClass(lqiEntryCls); + jmethodID lqiEntryTypeCtor = env->GetMethodID(lqiEntryCls, "", "(I)V"); + lqi = env->NewObject(lqiEntryCls, lqiEntryTypeCtor, lqiValue); + } + + bool averageRssiNull = false; + bool averageRssiHasValue = true; + + int8_t averageRssiValue = entry.averageRssi; + + jobject averageRssi = nullptr; + if (!averageRssiNull && averageRssiHasValue) + { + jclass averageRssiEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", averageRssiEntryCls); + chip::JniClass averageRssiJniClass(averageRssiEntryCls); + jmethodID averageRssiEntryTypeCtor = env->GetMethodID(averageRssiEntryCls, "", "(I)V"); + averageRssi = env->NewObject(averageRssiEntryCls, averageRssiEntryTypeCtor, averageRssiValue); + } + + bool lastRssiNull = false; + bool lastRssiHasValue = true; + + int8_t lastRssiValue = entry.lastRssi; + + jobject lastRssi = nullptr; + if (!lastRssiNull && lastRssiHasValue) + { + jclass lastRssiEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lastRssiEntryCls); + chip::JniClass lastRssiJniClass(lastRssiEntryCls); + jmethodID lastRssiEntryTypeCtor = env->GetMethodID(lastRssiEntryCls, "", "(I)V"); + lastRssi = env->NewObject(lastRssiEntryCls, lastRssiEntryTypeCtor, lastRssiValue); + } + + bool frameErrorRateNull = false; + bool frameErrorRateHasValue = true; + + uint8_t frameErrorRateValue = entry.frameErrorRate; + + jobject frameErrorRate = nullptr; + if (!frameErrorRateNull && frameErrorRateHasValue) + { + jclass frameErrorRateEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", frameErrorRateEntryCls); + chip::JniClass frameErrorRateJniClass(frameErrorRateEntryCls); + jmethodID frameErrorRateEntryTypeCtor = env->GetMethodID(frameErrorRateEntryCls, "", "(I)V"); + frameErrorRate = env->NewObject(frameErrorRateEntryCls, frameErrorRateEntryTypeCtor, frameErrorRateValue); + } + + bool messageErrorRateNull = false; + bool messageErrorRateHasValue = true; + + uint8_t messageErrorRateValue = entry.messageErrorRate; + + jobject messageErrorRate = nullptr; + if (!messageErrorRateNull && messageErrorRateHasValue) + { + jclass messageErrorRateEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", messageErrorRateEntryCls); + chip::JniClass messageErrorRateJniClass(messageErrorRateEntryCls); + jmethodID messageErrorRateEntryTypeCtor = env->GetMethodID(messageErrorRateEntryCls, "", "(I)V"); + messageErrorRate = env->NewObject(messageErrorRateEntryCls, messageErrorRateEntryTypeCtor, messageErrorRateValue); + } + + bool rxOnWhenIdleNull = false; + bool rxOnWhenIdleHasValue = true; + + bool rxOnWhenIdleValue = entry.rxOnWhenIdle; + + jobject rxOnWhenIdle = nullptr; + if (!rxOnWhenIdleNull && rxOnWhenIdleHasValue) + { + jclass rxOnWhenIdleEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", rxOnWhenIdleEntryCls); + chip::JniClass rxOnWhenIdleJniClass(rxOnWhenIdleEntryCls); + jmethodID rxOnWhenIdleEntryTypeCtor = env->GetMethodID(rxOnWhenIdleEntryCls, "", "(Z)V"); + rxOnWhenIdle = env->NewObject(rxOnWhenIdleEntryCls, rxOnWhenIdleEntryTypeCtor, rxOnWhenIdleValue); + } + + bool fullThreadDeviceNull = false; + bool fullThreadDeviceHasValue = true; + + bool fullThreadDeviceValue = entry.fullThreadDevice; + + jobject fullThreadDevice = nullptr; + if (!fullThreadDeviceNull && fullThreadDeviceHasValue) + { + jclass fullThreadDeviceEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullThreadDeviceEntryCls); + chip::JniClass fullThreadDeviceJniClass(fullThreadDeviceEntryCls); + jmethodID fullThreadDeviceEntryTypeCtor = env->GetMethodID(fullThreadDeviceEntryCls, "", "(Z)V"); + fullThreadDevice = env->NewObject(fullThreadDeviceEntryCls, fullThreadDeviceEntryTypeCtor, fullThreadDeviceValue); + } + + bool fullNetworkDataNull = false; + bool fullNetworkDataHasValue = true; + + bool fullNetworkDataValue = entry.fullNetworkData; + + jobject fullNetworkData = nullptr; + if (!fullNetworkDataNull && fullNetworkDataHasValue) + { + jclass fullNetworkDataEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullNetworkDataEntryCls); + chip::JniClass fullNetworkDataJniClass(fullNetworkDataEntryCls); + jmethodID fullNetworkDataEntryTypeCtor = env->GetMethodID(fullNetworkDataEntryCls, "", "(Z)V"); + fullNetworkData = env->NewObject(fullNetworkDataEntryCls, fullNetworkDataEntryTypeCtor, fullNetworkDataValue); + } + + bool isChildNull = false; + bool isChildHasValue = true; + + bool isChildValue = entry.isChild; + + jobject isChild = nullptr; + if (!isChildNull && isChildHasValue) + { + jclass isChildEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", isChildEntryCls); + chip::JniClass isChildJniClass(isChildEntryCls); + jmethodID isChildEntryTypeCtor = env->GetMethodID(isChildEntryCls, "", "(Z)V"); + isChild = env->NewObject(isChildEntryCls, isChildEntryTypeCtor, isChildValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, age, rloc16, linkFrameCounter, + mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, + rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NeighborTableListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding NeighborTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::~CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError( + Zcl, + "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = + env->GetMethodID(attributeClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find RouteTableListAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool extAddressNull = false; + bool extAddressHasValue = true; + + uint64_t extAddressValue = entry.extAddress; + + jobject extAddress = nullptr; + if (!extAddressNull && extAddressHasValue) + { + jclass extAddressEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); + chip::JniClass extAddressJniClass(extAddressEntryCls); + jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); + extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); + } + + bool rloc16Null = false; + bool rloc16HasValue = true; + + uint16_t rloc16Value = entry.rloc16; + + jobject rloc16 = nullptr; + if (!rloc16Null && rloc16HasValue) + { + jclass rloc16EntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); + chip::JniClass rloc16JniClass(rloc16EntryCls); + jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); + rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); + } + + bool routerIdNull = false; + bool routerIdHasValue = true; + + uint8_t routerIdValue = entry.routerId; + + jobject routerId = nullptr; + if (!routerIdNull && routerIdHasValue) + { + jclass routerIdEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", routerIdEntryCls); + chip::JniClass routerIdJniClass(routerIdEntryCls); + jmethodID routerIdEntryTypeCtor = env->GetMethodID(routerIdEntryCls, "", "(I)V"); + routerId = env->NewObject(routerIdEntryCls, routerIdEntryTypeCtor, routerIdValue); + } + + bool nextHopNull = false; + bool nextHopHasValue = true; + + uint8_t nextHopValue = entry.nextHop; + + jobject nextHop = nullptr; + if (!nextHopNull && nextHopHasValue) + { + jclass nextHopEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nextHopEntryCls); + chip::JniClass nextHopJniClass(nextHopEntryCls); + jmethodID nextHopEntryTypeCtor = env->GetMethodID(nextHopEntryCls, "", "(I)V"); + nextHop = env->NewObject(nextHopEntryCls, nextHopEntryTypeCtor, nextHopValue); + } + + bool pathCostNull = false; + bool pathCostHasValue = true; + + uint8_t pathCostValue = entry.pathCost; + + jobject pathCost = nullptr; + if (!pathCostNull && pathCostHasValue) + { + jclass pathCostEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", pathCostEntryCls); + chip::JniClass pathCostJniClass(pathCostEntryCls); + jmethodID pathCostEntryTypeCtor = env->GetMethodID(pathCostEntryCls, "", "(I)V"); + pathCost = env->NewObject(pathCostEntryCls, pathCostEntryTypeCtor, pathCostValue); + } + + bool LQIInNull = false; + bool LQIInHasValue = true; + + uint8_t LQIInValue = entry.LQIIn; + + jobject LQIIn = nullptr; + if (!LQIInNull && LQIInHasValue) + { + jclass LQIInEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIInEntryCls); + chip::JniClass LQIInJniClass(LQIInEntryCls); + jmethodID LQIInEntryTypeCtor = env->GetMethodID(LQIInEntryCls, "", "(I)V"); + LQIIn = env->NewObject(LQIInEntryCls, LQIInEntryTypeCtor, LQIInValue); + } + + bool LQIOutNull = false; + bool LQIOutHasValue = true; + + uint8_t LQIOutValue = entry.LQIOut; + + jobject LQIOut = nullptr; + if (!LQIOutNull && LQIOutHasValue) + { + jclass LQIOutEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIOutEntryCls); + chip::JniClass LQIOutJniClass(LQIOutEntryCls); + jmethodID LQIOutEntryTypeCtor = env->GetMethodID(LQIOutEntryCls, "", "(I)V"); + LQIOut = env->NewObject(LQIOutEntryCls, LQIOutEntryTypeCtor, LQIOutValue); + } + + bool ageNull = false; + bool ageHasValue = true; + + uint8_t ageValue = entry.age; + + jobject age = nullptr; + if (!ageNull && ageHasValue) + { + jclass ageEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", ageEntryCls); + chip::JniClass ageJniClass(ageEntryCls); + jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(I)V"); + age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); + } + + bool allocatedNull = false; + bool allocatedHasValue = true; + + bool allocatedValue = entry.allocated; + + jobject allocated = nullptr; + if (!allocatedNull && allocatedHasValue) + { + jclass allocatedEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", allocatedEntryCls); + chip::JniClass allocatedJniClass(allocatedEntryCls); + jmethodID allocatedEntryTypeCtor = env->GetMethodID(allocatedEntryCls, "", "(Z)V"); + allocated = env->NewObject(allocatedEntryCls, allocatedEntryTypeCtor, allocatedValue); + } + + bool linkEstablishedNull = false; + bool linkEstablishedHasValue = true; + + bool linkEstablishedValue = entry.linkEstablished; + + jobject linkEstablished = nullptr; + if (!linkEstablishedNull && linkEstablishedHasValue) + { + jclass linkEstablishedEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", linkEstablishedEntryCls); + chip::JniClass linkEstablishedJniClass(linkEstablishedEntryCls); + jmethodID linkEstablishedEntryTypeCtor = env->GetMethodID(linkEstablishedEntryCls, "", "(Z)V"); + linkEstablished = env->NewObject(linkEstablishedEntryCls, linkEstablishedEntryTypeCtor, linkEstablishedValue); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, + LQIOut, age, allocated, linkEstablished); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create RouteTableListAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding RouteTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::~CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, ChipLogError( Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute")); + "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute")); chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NeighborTableListAttribute constructor")); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SecurityPolicyAttribute constructor")); auto iter = list.begin(); while (iter.Next()) { auto & entry = iter.GetValue(); (void) entry; - bool extAddressNull = false; - bool extAddressHasValue = true; + bool rotationTimeNull = false; + bool rotationTimeHasValue = true; - uint64_t extAddressValue = entry.extAddress; + uint16_t rotationTimeValue = entry.rotationTime; - jobject extAddress = nullptr; - if (!extAddressNull && extAddressHasValue) + jobject rotationTime = nullptr; + if (!rotationTimeNull && rotationTimeHasValue) { - jclass extAddressEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); - chip::JniClass extAddressJniClass(extAddressEntryCls); - jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); - extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); + jclass rotationTimeEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rotationTimeEntryCls); + chip::JniClass rotationTimeJniClass(rotationTimeEntryCls); + jmethodID rotationTimeEntryTypeCtor = env->GetMethodID(rotationTimeEntryCls, "", "(I)V"); + rotationTime = env->NewObject(rotationTimeEntryCls, rotationTimeEntryTypeCtor, rotationTimeValue); } - bool ageNull = false; - bool ageHasValue = true; + bool flagsNull = false; + bool flagsHasValue = true; - uint32_t ageValue = entry.age; + uint16_t flagsValue = entry.flags; - jobject age = nullptr; - if (!ageNull && ageHasValue) + jobject flags = nullptr; + if (!flagsNull && flagsHasValue) { - jclass ageEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", ageEntryCls); - chip::JniClass ageJniClass(ageEntryCls); - jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(J)V"); - age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); + jclass flagsEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", flagsEntryCls); + chip::JniClass flagsJniClass(flagsEntryCls); + jmethodID flagsEntryTypeCtor = env->GetMethodID(flagsEntryCls, "", "(I)V"); + flags = env->NewObject(flagsEntryCls, flagsEntryTypeCtor, flagsValue); } - bool rloc16Null = false; - bool rloc16HasValue = true; + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, rotationTime, flags); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SecurityPolicyAttribute object")); - uint16_t rloc16Value = entry.rloc16; + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding SecurityPolicyAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - jobject rloc16 = nullptr; - if (!rloc16Null && rloc16HasValue) + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: + CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: + ~CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute", + attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, + "Could not find class " + "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID( + attributeClass, "", + "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" + "lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find OperationalDatasetComponentsAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool activeTimestampPresentNull = false; + bool activeTimestampPresentHasValue = true; + + bool activeTimestampPresentValue = entry.activeTimestampPresent; + + jobject activeTimestampPresent = nullptr; + if (!activeTimestampPresentNull && activeTimestampPresentHasValue) { - jclass rloc16EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); - chip::JniClass rloc16JniClass(rloc16EntryCls); - jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); - rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); + jclass activeTimestampPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", activeTimestampPresentEntryCls); + chip::JniClass activeTimestampPresentJniClass(activeTimestampPresentEntryCls); + jmethodID activeTimestampPresentEntryTypeCtor = env->GetMethodID(activeTimestampPresentEntryCls, "", "(Z)V"); + activeTimestampPresent = + env->NewObject(activeTimestampPresentEntryCls, activeTimestampPresentEntryTypeCtor, activeTimestampPresentValue); } - bool linkFrameCounterNull = false; - bool linkFrameCounterHasValue = true; + bool pendingTimestampPresentNull = false; + bool pendingTimestampPresentHasValue = true; - uint32_t linkFrameCounterValue = entry.linkFrameCounter; + bool pendingTimestampPresentValue = entry.pendingTimestampPresent; - jobject linkFrameCounter = nullptr; - if (!linkFrameCounterNull && linkFrameCounterHasValue) + jobject pendingTimestampPresent = nullptr; + if (!pendingTimestampPresentNull && pendingTimestampPresentHasValue) { - jclass linkFrameCounterEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", linkFrameCounterEntryCls); - chip::JniClass linkFrameCounterJniClass(linkFrameCounterEntryCls); - jmethodID linkFrameCounterEntryTypeCtor = env->GetMethodID(linkFrameCounterEntryCls, "", "(J)V"); - linkFrameCounter = env->NewObject(linkFrameCounterEntryCls, linkFrameCounterEntryTypeCtor, linkFrameCounterValue); + jclass pendingTimestampPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pendingTimestampPresentEntryCls); + chip::JniClass pendingTimestampPresentJniClass(pendingTimestampPresentEntryCls); + jmethodID pendingTimestampPresentEntryTypeCtor = env->GetMethodID(pendingTimestampPresentEntryCls, "", "(Z)V"); + pendingTimestampPresent = + env->NewObject(pendingTimestampPresentEntryCls, pendingTimestampPresentEntryTypeCtor, pendingTimestampPresentValue); + } + + bool masterKeyPresentNull = false; + bool masterKeyPresentHasValue = true; + + bool masterKeyPresentValue = entry.masterKeyPresent; + + jobject masterKeyPresent = nullptr; + if (!masterKeyPresentNull && masterKeyPresentHasValue) + { + jclass masterKeyPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", masterKeyPresentEntryCls); + chip::JniClass masterKeyPresentJniClass(masterKeyPresentEntryCls); + jmethodID masterKeyPresentEntryTypeCtor = env->GetMethodID(masterKeyPresentEntryCls, "", "(Z)V"); + masterKeyPresent = env->NewObject(masterKeyPresentEntryCls, masterKeyPresentEntryTypeCtor, masterKeyPresentValue); + } + + bool networkNamePresentNull = false; + bool networkNamePresentHasValue = true; + + bool networkNamePresentValue = entry.networkNamePresent; + + jobject networkNamePresent = nullptr; + if (!networkNamePresentNull && networkNamePresentHasValue) + { + jclass networkNamePresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", networkNamePresentEntryCls); + chip::JniClass networkNamePresentJniClass(networkNamePresentEntryCls); + jmethodID networkNamePresentEntryTypeCtor = env->GetMethodID(networkNamePresentEntryCls, "", "(Z)V"); + networkNamePresent = + env->NewObject(networkNamePresentEntryCls, networkNamePresentEntryTypeCtor, networkNamePresentValue); + } + + bool extendedPanIdPresentNull = false; + bool extendedPanIdPresentHasValue = true; + + bool extendedPanIdPresentValue = entry.extendedPanIdPresent; + + jobject extendedPanIdPresent = nullptr; + if (!extendedPanIdPresentNull && extendedPanIdPresentHasValue) + { + jclass extendedPanIdPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", extendedPanIdPresentEntryCls); + chip::JniClass extendedPanIdPresentJniClass(extendedPanIdPresentEntryCls); + jmethodID extendedPanIdPresentEntryTypeCtor = env->GetMethodID(extendedPanIdPresentEntryCls, "", "(Z)V"); + extendedPanIdPresent = + env->NewObject(extendedPanIdPresentEntryCls, extendedPanIdPresentEntryTypeCtor, extendedPanIdPresentValue); + } + + bool meshLocalPrefixPresentNull = false; + bool meshLocalPrefixPresentHasValue = true; + + bool meshLocalPrefixPresentValue = entry.meshLocalPrefixPresent; + + jobject meshLocalPrefixPresent = nullptr; + if (!meshLocalPrefixPresentNull && meshLocalPrefixPresentHasValue) + { + jclass meshLocalPrefixPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", meshLocalPrefixPresentEntryCls); + chip::JniClass meshLocalPrefixPresentJniClass(meshLocalPrefixPresentEntryCls); + jmethodID meshLocalPrefixPresentEntryTypeCtor = env->GetMethodID(meshLocalPrefixPresentEntryCls, "", "(Z)V"); + meshLocalPrefixPresent = + env->NewObject(meshLocalPrefixPresentEntryCls, meshLocalPrefixPresentEntryTypeCtor, meshLocalPrefixPresentValue); } - bool mleFrameCounterNull = false; - bool mleFrameCounterHasValue = true; + bool delayPresentNull = false; + bool delayPresentHasValue = true; - uint32_t mleFrameCounterValue = entry.mleFrameCounter; + bool delayPresentValue = entry.delayPresent; - jobject mleFrameCounter = nullptr; - if (!mleFrameCounterNull && mleFrameCounterHasValue) + jobject delayPresent = nullptr; + if (!delayPresentNull && delayPresentHasValue) { - jclass mleFrameCounterEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", mleFrameCounterEntryCls); - chip::JniClass mleFrameCounterJniClass(mleFrameCounterEntryCls); - jmethodID mleFrameCounterEntryTypeCtor = env->GetMethodID(mleFrameCounterEntryCls, "", "(J)V"); - mleFrameCounter = env->NewObject(mleFrameCounterEntryCls, mleFrameCounterEntryTypeCtor, mleFrameCounterValue); + jclass delayPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", delayPresentEntryCls); + chip::JniClass delayPresentJniClass(delayPresentEntryCls); + jmethodID delayPresentEntryTypeCtor = env->GetMethodID(delayPresentEntryCls, "", "(Z)V"); + delayPresent = env->NewObject(delayPresentEntryCls, delayPresentEntryTypeCtor, delayPresentValue); } - bool lqiNull = false; - bool lqiHasValue = true; + bool panIdPresentNull = false; + bool panIdPresentHasValue = true; - uint8_t lqiValue = entry.lqi; + bool panIdPresentValue = entry.panIdPresent; - jobject lqi = nullptr; - if (!lqiNull && lqiHasValue) + jobject panIdPresent = nullptr; + if (!panIdPresentNull && panIdPresentHasValue) { - jclass lqiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lqiEntryCls); - chip::JniClass lqiJniClass(lqiEntryCls); - jmethodID lqiEntryTypeCtor = env->GetMethodID(lqiEntryCls, "", "(I)V"); - lqi = env->NewObject(lqiEntryCls, lqiEntryTypeCtor, lqiValue); + jclass panIdPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", panIdPresentEntryCls); + chip::JniClass panIdPresentJniClass(panIdPresentEntryCls); + jmethodID panIdPresentEntryTypeCtor = env->GetMethodID(panIdPresentEntryCls, "", "(Z)V"); + panIdPresent = env->NewObject(panIdPresentEntryCls, panIdPresentEntryTypeCtor, panIdPresentValue); } - bool averageRssiNull = false; - bool averageRssiHasValue = true; + bool channelPresentNull = false; + bool channelPresentHasValue = true; - int8_t averageRssiValue = entry.averageRssi; + bool channelPresentValue = entry.channelPresent; - jobject averageRssi = nullptr; - if (!averageRssiNull && averageRssiHasValue) + jobject channelPresent = nullptr; + if (!channelPresentNull && channelPresentHasValue) { - jclass averageRssiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", averageRssiEntryCls); - chip::JniClass averageRssiJniClass(averageRssiEntryCls); - jmethodID averageRssiEntryTypeCtor = env->GetMethodID(averageRssiEntryCls, "", "(I)V"); - averageRssi = env->NewObject(averageRssiEntryCls, averageRssiEntryTypeCtor, averageRssiValue); + jclass channelPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelPresentEntryCls); + chip::JniClass channelPresentJniClass(channelPresentEntryCls); + jmethodID channelPresentEntryTypeCtor = env->GetMethodID(channelPresentEntryCls, "", "(Z)V"); + channelPresent = env->NewObject(channelPresentEntryCls, channelPresentEntryTypeCtor, channelPresentValue); } - bool lastRssiNull = false; - bool lastRssiHasValue = true; + bool pskcPresentNull = false; + bool pskcPresentHasValue = true; - int8_t lastRssiValue = entry.lastRssi; + bool pskcPresentValue = entry.pskcPresent; - jobject lastRssi = nullptr; - if (!lastRssiNull && lastRssiHasValue) + jobject pskcPresent = nullptr; + if (!pskcPresentNull && pskcPresentHasValue) { - jclass lastRssiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lastRssiEntryCls); - chip::JniClass lastRssiJniClass(lastRssiEntryCls); - jmethodID lastRssiEntryTypeCtor = env->GetMethodID(lastRssiEntryCls, "", "(I)V"); - lastRssi = env->NewObject(lastRssiEntryCls, lastRssiEntryTypeCtor, lastRssiValue); + jclass pskcPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pskcPresentEntryCls); + chip::JniClass pskcPresentJniClass(pskcPresentEntryCls); + jmethodID pskcPresentEntryTypeCtor = env->GetMethodID(pskcPresentEntryCls, "", "(Z)V"); + pskcPresent = env->NewObject(pskcPresentEntryCls, pskcPresentEntryTypeCtor, pskcPresentValue); } - bool frameErrorRateNull = false; - bool frameErrorRateHasValue = true; + bool securityPolicyPresentNull = false; + bool securityPolicyPresentHasValue = true; - uint8_t frameErrorRateValue = entry.frameErrorRate; + bool securityPolicyPresentValue = entry.securityPolicyPresent; - jobject frameErrorRate = nullptr; - if (!frameErrorRateNull && frameErrorRateHasValue) + jobject securityPolicyPresent = nullptr; + if (!securityPolicyPresentNull && securityPolicyPresentHasValue) { - jclass frameErrorRateEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", frameErrorRateEntryCls); - chip::JniClass frameErrorRateJniClass(frameErrorRateEntryCls); - jmethodID frameErrorRateEntryTypeCtor = env->GetMethodID(frameErrorRateEntryCls, "", "(I)V"); - frameErrorRate = env->NewObject(frameErrorRateEntryCls, frameErrorRateEntryTypeCtor, frameErrorRateValue); + jclass securityPolicyPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", securityPolicyPresentEntryCls); + chip::JniClass securityPolicyPresentJniClass(securityPolicyPresentEntryCls); + jmethodID securityPolicyPresentEntryTypeCtor = env->GetMethodID(securityPolicyPresentEntryCls, "", "(Z)V"); + securityPolicyPresent = + env->NewObject(securityPolicyPresentEntryCls, securityPolicyPresentEntryTypeCtor, securityPolicyPresentValue); } - bool messageErrorRateNull = false; - bool messageErrorRateHasValue = true; + bool channelMaskPresentNull = false; + bool channelMaskPresentHasValue = true; - uint8_t messageErrorRateValue = entry.messageErrorRate; + bool channelMaskPresentValue = entry.channelMaskPresent; - jobject messageErrorRate = nullptr; - if (!messageErrorRateNull && messageErrorRateHasValue) + jobject channelMaskPresent = nullptr; + if (!channelMaskPresentNull && channelMaskPresentHasValue) { - jclass messageErrorRateEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", messageErrorRateEntryCls); - chip::JniClass messageErrorRateJniClass(messageErrorRateEntryCls); - jmethodID messageErrorRateEntryTypeCtor = env->GetMethodID(messageErrorRateEntryCls, "", "(I)V"); - messageErrorRate = env->NewObject(messageErrorRateEntryCls, messageErrorRateEntryTypeCtor, messageErrorRateValue); + jclass channelMaskPresentEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelMaskPresentEntryCls); + chip::JniClass channelMaskPresentJniClass(channelMaskPresentEntryCls); + jmethodID channelMaskPresentEntryTypeCtor = env->GetMethodID(channelMaskPresentEntryCls, "", "(Z)V"); + channelMaskPresent = + env->NewObject(channelMaskPresentEntryCls, channelMaskPresentEntryTypeCtor, channelMaskPresentValue); } - bool rxOnWhenIdleNull = false; - bool rxOnWhenIdleHasValue = true; + jobject attributeObj = + env->NewObject(attributeClass, attributeCtor, activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, + networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, + channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create OperationalDatasetComponentsAttribute object")); - bool rxOnWhenIdleValue = entry.rxOnWhenIdle; + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding OperationalDatasetComponentsAttribute value: %" CHIP_ERROR_FORMAT, + iter.GetStatus().Format())); - jobject rxOnWhenIdle = nullptr; - if (!rxOnWhenIdleNull && rxOnWhenIdleHasValue) - { - jclass rxOnWhenIdleEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", rxOnWhenIdleEntryCls); - chip::JniClass rxOnWhenIdleJniClass(rxOnWhenIdleEntryCls); - jmethodID rxOnWhenIdleEntryTypeCtor = env->GetMethodID(rxOnWhenIdleEntryCls, "", "(Z)V"); - rxOnWhenIdle = env->NewObject(rxOnWhenIdleEntryCls, rxOnWhenIdleEntryTypeCtor, rxOnWhenIdleValue); - } + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} - bool fullThreadDeviceNull = false; - bool fullThreadDeviceHasValue = true; +CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: + CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } - bool fullThreadDeviceValue = entry.fullThreadDevice; + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} - jobject fullThreadDevice = nullptr; - if (!fullThreadDeviceNull && fullThreadDeviceHasValue) - { - jclass fullThreadDeviceEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullThreadDeviceEntryCls); - chip::JniClass fullThreadDeviceJniClass(fullThreadDeviceEntryCls); - jmethodID fullThreadDeviceEntryTypeCtor = env->GetMethodID(fullThreadDeviceEntryCls, "", "(Z)V"); - fullThreadDevice = env->NewObject(fullThreadDeviceEntryCls, fullThreadDeviceEntryTypeCtor, fullThreadDeviceValue); - } +CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: + ~CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} - bool fullNetworkDataNull = false; - bool fullNetworkDataHasValue = true; +void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; - bool fullNetworkDataValue = entry.fullNetworkData; + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - jobject fullNetworkData = nullptr; - if (!fullNetworkDataNull && fullNetworkDataHasValue) - { - jclass fullNetworkDataEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullNetworkDataEntryCls); - chip::JniClass fullNetworkDataJniClass(fullNetworkDataEntryCls); - jmethodID fullNetworkDataEntryTypeCtor = env->GetMethodID(fullNetworkDataEntryCls, "", "(Z)V"); - fullNetworkData = env->NewObject(fullNetworkDataEntryCls, fullNetworkDataEntryTypeCtor, fullNetworkDataValue); - } + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); - bool isChildNull = false; - bool isChildHasValue = true; + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - bool isChildValue = entry.isChild; + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jobject isChild = nullptr; - if (!isChildNull && isChildHasValue) - { - jclass isChildEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", isChildEntryCls); - chip::JniClass isChildJniClass(isChildEntryCls); - jmethodID isChildEntryTypeCtor = env->GetMethodID(isChildEntryCls, "", "(Z)V"); - isChild = env->NewObject(isChildEntryCls, isChildEntryTypeCtor, isChildValue); - } + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, age, rloc16, linkFrameCounter, - mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, - rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NeighborTableListAttribute object")); + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault entryValue = entry; + + jobject entryObject = nullptr; + if (!entryNull) + { + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NeighborTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback( +CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7367,7 +13036,7 @@ CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CHIPThreadNetworkDi } } -CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::~CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback() +CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::~CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7378,10 +13047,8 @@ CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::~CHIPThreadNetworkD env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7390,8 +13057,8 @@ void CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -7413,194 +13080,35 @@ void CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find RouteTableListAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool extAddressNull = false; - bool extAddressHasValue = true; - - uint64_t extAddressValue = entry.extAddress; - - jobject extAddress = nullptr; - if (!extAddressNull && extAddressHasValue) - { - jclass extAddressEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); - chip::JniClass extAddressJniClass(extAddressEntryCls); - jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); - extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); - } - - bool rloc16Null = false; - bool rloc16HasValue = true; - - uint16_t rloc16Value = entry.rloc16; - - jobject rloc16 = nullptr; - if (!rloc16Null && rloc16HasValue) - { - jclass rloc16EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); - chip::JniClass rloc16JniClass(rloc16EntryCls); - jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); - rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); - } - - bool routerIdNull = false; - bool routerIdHasValue = true; - - uint8_t routerIdValue = entry.routerId; - - jobject routerId = nullptr; - if (!routerIdNull && routerIdHasValue) - { - jclass routerIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", routerIdEntryCls); - chip::JniClass routerIdJniClass(routerIdEntryCls); - jmethodID routerIdEntryTypeCtor = env->GetMethodID(routerIdEntryCls, "", "(I)V"); - routerId = env->NewObject(routerIdEntryCls, routerIdEntryTypeCtor, routerIdValue); - } - - bool nextHopNull = false; - bool nextHopHasValue = true; - - uint8_t nextHopValue = entry.nextHop; - - jobject nextHop = nullptr; - if (!nextHopNull && nextHopHasValue) - { - jclass nextHopEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nextHopEntryCls); - chip::JniClass nextHopJniClass(nextHopEntryCls); - jmethodID nextHopEntryTypeCtor = env->GetMethodID(nextHopEntryCls, "", "(I)V"); - nextHop = env->NewObject(nextHopEntryCls, nextHopEntryTypeCtor, nextHopValue); - } - - bool pathCostNull = false; - bool pathCostHasValue = true; - - uint8_t pathCostValue = entry.pathCost; - - jobject pathCost = nullptr; - if (!pathCostNull && pathCostHasValue) - { - jclass pathCostEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", pathCostEntryCls); - chip::JniClass pathCostJniClass(pathCostEntryCls); - jmethodID pathCostEntryTypeCtor = env->GetMethodID(pathCostEntryCls, "", "(I)V"); - pathCost = env->NewObject(pathCostEntryCls, pathCostEntryTypeCtor, pathCostValue); - } - - bool LQIInNull = false; - bool LQIInHasValue = true; - - uint8_t LQIInValue = entry.LQIIn; - - jobject LQIIn = nullptr; - if (!LQIInNull && LQIInHasValue) - { - jclass LQIInEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIInEntryCls); - chip::JniClass LQIInJniClass(LQIInEntryCls); - jmethodID LQIInEntryTypeCtor = env->GetMethodID(LQIInEntryCls, "", "(I)V"); - LQIIn = env->NewObject(LQIInEntryCls, LQIInEntryTypeCtor, LQIInValue); - } - - bool LQIOutNull = false; - bool LQIOutHasValue = true; - - uint8_t LQIOutValue = entry.LQIOut; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - jobject LQIOut = nullptr; - if (!LQIOutNull && LQIOutHasValue) - { - jclass LQIOutEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIOutEntryCls); - chip::JniClass LQIOutJniClass(LQIOutEntryCls); - jmethodID LQIOutEntryTypeCtor = env->GetMethodID(LQIOutEntryCls, "", "(I)V"); - LQIOut = env->NewObject(LQIOutEntryCls, LQIOutEntryTypeCtor, LQIOutValue); - } - - bool ageNull = false; - bool ageHasValue = true; - - uint8_t ageValue = entry.age; - - jobject age = nullptr; - if (!ageNull && ageHasValue) - { - jclass ageEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", ageEntryCls); - chip::JniClass ageJniClass(ageEntryCls); - jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(I)V"); - age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); - } - - bool allocatedNull = false; - bool allocatedHasValue = true; - - bool allocatedValue = entry.allocated; - - jobject allocated = nullptr; - if (!allocatedNull && allocatedHasValue) - { - jclass allocatedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", allocatedEntryCls); - chip::JniClass allocatedJniClass(allocatedEntryCls); - jmethodID allocatedEntryTypeCtor = env->GetMethodID(allocatedEntryCls, "", "(Z)V"); - allocated = env->NewObject(allocatedEntryCls, allocatedEntryTypeCtor, allocatedValue); - } - - bool linkEstablishedNull = false; - bool linkEstablishedHasValue = true; - - bool linkEstablishedValue = entry.linkEstablished; - - jobject linkEstablished = nullptr; - if (!linkEstablishedNull && linkEstablishedHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass linkEstablishedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", linkEstablishedEntryCls); - chip::JniClass linkEstablishedJniClass(linkEstablishedEntryCls); - jmethodID linkEstablishedEntryTypeCtor = env->GetMethodID(linkEstablishedEntryCls, "", "(Z)V"); - linkEstablished = env->NewObject(linkEstablishedEntryCls, linkEstablishedEntryTypeCtor, linkEstablishedValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, - LQIOut, age, allocated, linkEstablished); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create RouteTableListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding RouteTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPWakeOnLanAttributeListAttributeCallback::CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7616,7 +13124,7 @@ CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CHIPThreadNetworkDi } } -CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::~CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback() +CHIPWakeOnLanAttributeListAttributeCallback::~CHIPWakeOnLanAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7627,10 +13135,8 @@ CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::~CHIPThreadNetworkD env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) +void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7639,8 +13145,8 @@ void CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -7662,70 +13168,36 @@ void CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SecurityPolicyAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool rotationTimeNull = false; - bool rotationTimeHasValue = true; - - uint16_t rotationTimeValue = entry.rotationTime; - - jobject rotationTime = nullptr; - if (!rotationTimeNull && rotationTimeHasValue) - { - jclass rotationTimeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rotationTimeEntryCls); - chip::JniClass rotationTimeJniClass(rotationTimeEntryCls); - jmethodID rotationTimeEntryTypeCtor = env->GetMethodID(rotationTimeEntryCls, "", "(I)V"); - rotationTime = env->NewObject(rotationTimeEntryCls, rotationTimeEntryTypeCtor, rotationTimeValue); - } - - bool flagsNull = false; - bool flagsHasValue = true; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - uint16_t flagsValue = entry.flags; - - jobject flags = nullptr; - if (!flagsNull && flagsHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass flagsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", flagsEntryCls); - chip::JniClass flagsJniClass(flagsEntryCls); - jmethodID flagsEntryTypeCtor = env->GetMethodID(flagsEntryCls, "", "(I)V"); - flags = env->NewObject(flagsEntryCls, flagsEntryTypeCtor, flagsValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, rotationTime, flags); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SecurityPolicyAttribute object")); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); + } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SecurityPolicyAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: - CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7742,8 +13214,7 @@ CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: } } -CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback() +CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7754,10 +13225,8 @@ CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & list) +void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7766,8 +13235,8 @@ void CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -7789,233 +13258,36 @@ void CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute", - attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class " - "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" - "lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find OperationalDatasetComponentsAttribute constructor")); - auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool activeTimestampPresentNull = false; - bool activeTimestampPresentHasValue = true; - - bool activeTimestampPresentValue = entry.activeTimestampPresent; - - jobject activeTimestampPresent = nullptr; - if (!activeTimestampPresentNull && activeTimestampPresentHasValue) - { - jclass activeTimestampPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", activeTimestampPresentEntryCls); - chip::JniClass activeTimestampPresentJniClass(activeTimestampPresentEntryCls); - jmethodID activeTimestampPresentEntryTypeCtor = env->GetMethodID(activeTimestampPresentEntryCls, "", "(Z)V"); - activeTimestampPresent = - env->NewObject(activeTimestampPresentEntryCls, activeTimestampPresentEntryTypeCtor, activeTimestampPresentValue); - } - - bool pendingTimestampPresentNull = false; - bool pendingTimestampPresentHasValue = true; - - bool pendingTimestampPresentValue = entry.pendingTimestampPresent; - - jobject pendingTimestampPresent = nullptr; - if (!pendingTimestampPresentNull && pendingTimestampPresentHasValue) - { - jclass pendingTimestampPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pendingTimestampPresentEntryCls); - chip::JniClass pendingTimestampPresentJniClass(pendingTimestampPresentEntryCls); - jmethodID pendingTimestampPresentEntryTypeCtor = env->GetMethodID(pendingTimestampPresentEntryCls, "", "(Z)V"); - pendingTimestampPresent = - env->NewObject(pendingTimestampPresentEntryCls, pendingTimestampPresentEntryTypeCtor, pendingTimestampPresentValue); - } - - bool masterKeyPresentNull = false; - bool masterKeyPresentHasValue = true; - - bool masterKeyPresentValue = entry.masterKeyPresent; - - jobject masterKeyPresent = nullptr; - if (!masterKeyPresentNull && masterKeyPresentHasValue) - { - jclass masterKeyPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", masterKeyPresentEntryCls); - chip::JniClass masterKeyPresentJniClass(masterKeyPresentEntryCls); - jmethodID masterKeyPresentEntryTypeCtor = env->GetMethodID(masterKeyPresentEntryCls, "", "(Z)V"); - masterKeyPresent = env->NewObject(masterKeyPresentEntryCls, masterKeyPresentEntryTypeCtor, masterKeyPresentValue); - } - - bool networkNamePresentNull = false; - bool networkNamePresentHasValue = true; - - bool networkNamePresentValue = entry.networkNamePresent; - - jobject networkNamePresent = nullptr; - if (!networkNamePresentNull && networkNamePresentHasValue) - { - jclass networkNamePresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", networkNamePresentEntryCls); - chip::JniClass networkNamePresentJniClass(networkNamePresentEntryCls); - jmethodID networkNamePresentEntryTypeCtor = env->GetMethodID(networkNamePresentEntryCls, "", "(Z)V"); - networkNamePresent = - env->NewObject(networkNamePresentEntryCls, networkNamePresentEntryTypeCtor, networkNamePresentValue); - } - - bool extendedPanIdPresentNull = false; - bool extendedPanIdPresentHasValue = true; - - bool extendedPanIdPresentValue = entry.extendedPanIdPresent; - - jobject extendedPanIdPresent = nullptr; - if (!extendedPanIdPresentNull && extendedPanIdPresentHasValue) - { - jclass extendedPanIdPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", extendedPanIdPresentEntryCls); - chip::JniClass extendedPanIdPresentJniClass(extendedPanIdPresentEntryCls); - jmethodID extendedPanIdPresentEntryTypeCtor = env->GetMethodID(extendedPanIdPresentEntryCls, "", "(Z)V"); - extendedPanIdPresent = - env->NewObject(extendedPanIdPresentEntryCls, extendedPanIdPresentEntryTypeCtor, extendedPanIdPresentValue); - } - - bool meshLocalPrefixPresentNull = false; - bool meshLocalPrefixPresentHasValue = true; - - bool meshLocalPrefixPresentValue = entry.meshLocalPrefixPresent; - - jobject meshLocalPrefixPresent = nullptr; - if (!meshLocalPrefixPresentNull && meshLocalPrefixPresentHasValue) - { - jclass meshLocalPrefixPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", meshLocalPrefixPresentEntryCls); - chip::JniClass meshLocalPrefixPresentJniClass(meshLocalPrefixPresentEntryCls); - jmethodID meshLocalPrefixPresentEntryTypeCtor = env->GetMethodID(meshLocalPrefixPresentEntryCls, "", "(Z)V"); - meshLocalPrefixPresent = - env->NewObject(meshLocalPrefixPresentEntryCls, meshLocalPrefixPresentEntryTypeCtor, meshLocalPrefixPresentValue); - } - - bool delayPresentNull = false; - bool delayPresentHasValue = true; - - bool delayPresentValue = entry.delayPresent; - - jobject delayPresent = nullptr; - if (!delayPresentNull && delayPresentHasValue) - { - jclass delayPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", delayPresentEntryCls); - chip::JniClass delayPresentJniClass(delayPresentEntryCls); - jmethodID delayPresentEntryTypeCtor = env->GetMethodID(delayPresentEntryCls, "", "(Z)V"); - delayPresent = env->NewObject(delayPresentEntryCls, delayPresentEntryTypeCtor, delayPresentValue); - } - - bool panIdPresentNull = false; - bool panIdPresentHasValue = true; - - bool panIdPresentValue = entry.panIdPresent; - - jobject panIdPresent = nullptr; - if (!panIdPresentNull && panIdPresentHasValue) - { - jclass panIdPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", panIdPresentEntryCls); - chip::JniClass panIdPresentJniClass(panIdPresentEntryCls); - jmethodID panIdPresentEntryTypeCtor = env->GetMethodID(panIdPresentEntryCls, "", "(Z)V"); - panIdPresent = env->NewObject(panIdPresentEntryCls, panIdPresentEntryTypeCtor, panIdPresentValue); - } - - bool channelPresentNull = false; - bool channelPresentHasValue = true; - - bool channelPresentValue = entry.channelPresent; - - jobject channelPresent = nullptr; - if (!channelPresentNull && channelPresentHasValue) - { - jclass channelPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelPresentEntryCls); - chip::JniClass channelPresentJniClass(channelPresentEntryCls); - jmethodID channelPresentEntryTypeCtor = env->GetMethodID(channelPresentEntryCls, "", "(Z)V"); - channelPresent = env->NewObject(channelPresentEntryCls, channelPresentEntryTypeCtor, channelPresentValue); - } - - bool pskcPresentNull = false; - bool pskcPresentHasValue = true; - - bool pskcPresentValue = entry.pskcPresent; - - jobject pskcPresent = nullptr; - if (!pskcPresentNull && pskcPresentHasValue) - { - jclass pskcPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pskcPresentEntryCls); - chip::JniClass pskcPresentJniClass(pskcPresentEntryCls); - jmethodID pskcPresentEntryTypeCtor = env->GetMethodID(pskcPresentEntryCls, "", "(Z)V"); - pskcPresent = env->NewObject(pskcPresentEntryCls, pskcPresentEntryTypeCtor, pskcPresentValue); - } - - bool securityPolicyPresentNull = false; - bool securityPolicyPresentHasValue = true; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; - bool securityPolicyPresentValue = entry.securityPolicyPresent; - - jobject securityPolicyPresent = nullptr; - if (!securityPolicyPresentNull && securityPolicyPresentHasValue) - { - jclass securityPolicyPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", securityPolicyPresentEntryCls); - chip::JniClass securityPolicyPresentJniClass(securityPolicyPresentEntryCls); - jmethodID securityPolicyPresentEntryTypeCtor = env->GetMethodID(securityPolicyPresentEntryCls, "", "(Z)V"); - securityPolicyPresent = - env->NewObject(securityPolicyPresentEntryCls, securityPolicyPresentEntryTypeCtor, securityPolicyPresentValue); - } - - bool channelMaskPresentNull = false; - bool channelMaskPresentHasValue = true; - - bool channelMaskPresentValue = entry.channelMaskPresent; - - jobject channelMaskPresent = nullptr; - if (!channelMaskPresentNull && channelMaskPresentHasValue) + jobject entryObject = nullptr; + if (!entryNull) { - jclass channelMaskPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelMaskPresentEntryCls); - chip::JniClass channelMaskPresentJniClass(channelMaskPresentEntryCls); - jmethodID channelMaskPresentEntryTypeCtor = env->GetMethodID(channelMaskPresentEntryCls, "", "(Z)V"); - channelMaskPresent = - env->NewObject(channelMaskPresentEntryCls, channelMaskPresentEntryTypeCtor, channelMaskPresentValue); + jclass entryTypeCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); + chip::JniClass jniClass(entryTypeCls); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); + entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, - networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, - channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create OperationalDatasetComponentsAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding OperationalDatasetComponentsAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); + VerifyOrReturn( + iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWindowCoveringAttributeListAttributeCallback::CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -8032,8 +13304,7 @@ CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: } } -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback() +CHIPWindowCoveringAttributeListAttributeCallback::~CHIPWindowCoveringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8044,8 +13315,8 @@ CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8054,8 +13325,8 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -8080,17 +13351,17 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::AttributeId entryValue = entry; jobject entryObject = nullptr; if (!entryNull) { jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); + jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); } @@ -8098,7 +13369,7 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb } VerifyOrReturn( iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index d9aee047841f0f..3eefb14538cdb2 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -361,904 +361,2150 @@ class CHIPAccessControlExtensionAttributeCallback bool keepAlive; }; +class CHIPAccessControlAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPAccessControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAccessControlAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPAccessControlAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPAccountLoginAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPAccountLoginAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAccountLoginAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPAccountLoginAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback : public chip::Callback::Callback { public: - CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback(); + + static void maybeDestroy(CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, chip::FabricIndex value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPAdministratorCommissioningAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPAdministratorCommissioningAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAdministratorCommissioningAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPAdministratorCommissioningAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPApplicationBasicAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPApplicationBasicAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPApplicationBasicAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPApplicationBasicAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPApplicationLauncherApplicationLauncherListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPApplicationLauncherApplicationLauncherListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPApplicationLauncherApplicationLauncherListAttributeCallback(); + + static void maybeDestroy(CHIPApplicationLauncherApplicationLauncherListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPApplicationLauncherAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPApplicationLauncherAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPApplicationLauncherAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPApplicationLauncherAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPAudioOutputAudioOutputListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPAudioOutputAudioOutputListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAudioOutputAudioOutputListAttributeCallback(); + + static void maybeDestroy(CHIPAudioOutputAudioOutputListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPAudioOutputAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPAudioOutputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPAudioOutputAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPAudioOutputAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBarrierControlAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBarrierControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBarrierControlAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBarrierControlAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBasicAttributeListAttributeCallback : public chip::Callback::Callback +{ +public: + CHIPBasicAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBasicAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBasicAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBinaryInputBasicAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBinaryInputBasicAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBinaryInputBasicAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBinaryInputBasicAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBindingAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBindingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBindingAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBindingAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBooleanStateAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBooleanStateAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBooleanStateAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBridgedActionsActionListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBridgedActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBridgedActionsActionListAttributeCallback(); + + static void maybeDestroy(CHIPBridgedActionsActionListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBridgedActionsEndpointListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBridgedActionsEndpointListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBridgedActionsEndpointListAttributeCallback(); + + static void maybeDestroy(CHIPBridgedActionsEndpointListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBridgedActionsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBridgedActionsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBridgedActionsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBridgedActionsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPBridgedDeviceBasicAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPBridgedDeviceBasicAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPBridgedDeviceBasicAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPBridgedDeviceBasicAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPColorControlAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPColorControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPColorControlAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPColorControlAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPContentLauncherAcceptsHeaderListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPContentLauncherAcceptsHeaderListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPContentLauncherAcceptsHeaderListAttributeCallback(); + + static void maybeDestroy(CHIPContentLauncherAcceptsHeaderListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPContentLauncherSupportedStreamingTypesAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPContentLauncherSupportedStreamingTypesAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPContentLauncherSupportedStreamingTypesAttributeCallback(); + + static void maybeDestroy(CHIPContentLauncherSupportedStreamingTypesAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void + CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPContentLauncherAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPContentLauncherAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPContentLauncherAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPContentLauncherAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDescriptorDeviceListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDescriptorDeviceListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDescriptorDeviceListAttributeCallback(); + + static void maybeDestroy(CHIPDescriptorDeviceListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDescriptorServerListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDescriptorServerListAttributeCallback(); + + static void maybeDestroy(CHIPDescriptorServerListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDescriptorClientListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDescriptorClientListAttributeCallback(); + + static void maybeDestroy(CHIPDescriptorClientListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDescriptorPartsListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDescriptorPartsListAttributeCallback(); + + static void maybeDestroy(CHIPDescriptorPartsListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDescriptorAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDescriptorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDescriptorAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPDescriptorAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDiagnosticLogsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDiagnosticLogsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDiagnosticLogsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPDiagnosticLogsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPDoorLockAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPDoorLockAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPDoorLockAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPDoorLockAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPElectricalMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPElectricalMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPElectricalMeasurementAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPElectricalMeasurementAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPFixedLabelLabelListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFixedLabelLabelListAttributeCallback(); + + static void maybeDestroy(CHIPFixedLabelLabelListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPFixedLabelAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFixedLabelAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPFixedLabelAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPFlowMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPFlowMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPFlowMeasurementAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPFlowMeasurementAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(); + + static void maybeDestroy(CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void + CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralCommissioningAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralCommissioningAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralCommissioningAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPGeneralCommissioningAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback(); + + static void maybeDestroy(CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback(); + + static void maybeDestroy(CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback(); + + static void maybeDestroy(CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback(); + + static void maybeDestroy(CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGeneralDiagnosticsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGeneralDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGeneralDiagnosticsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPGeneralDiagnosticsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGroupKeyManagementGroupsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGroupKeyManagementGroupsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGroupKeyManagementGroupsAttributeCallback(); + + static void maybeDestroy(CHIPGroupKeyManagementGroupsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGroupKeyManagementGroupKeysAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGroupKeyManagementGroupKeysAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGroupKeyManagementGroupKeysAttributeCallback(); + + static void maybeDestroy(CHIPGroupKeyManagementGroupKeysAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGroupKeyManagementAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGroupKeyManagementAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPGroupKeyManagementAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPGroupsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPGroupsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPGroupsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPGroupsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPIdentifyAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPIdentifyAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPIdentifyAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPIdentifyAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPIlluminanceMeasurementMeasuredValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPIlluminanceMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback(); + + static void maybeDestroy(CHIPIlluminanceMeasurementMeasuredValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback(); + + static void maybeDestroy(CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback(); + + static void maybeDestroy(CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPIlluminanceMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPIlluminanceMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPIlluminanceMeasurementAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPIlluminanceMeasurementAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPKeypadInputAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPKeypadInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPKeypadInputAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPKeypadInputAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOnTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOnTransitionTimeAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOnTransitionTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOffTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback(); + ~CHIPLevelControlOffTransitionTimeAttributeCallback(); - static void maybeDestroy(CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback * callback) + static void maybeDestroy(CHIPLevelControlOffTransitionTimeAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, chip::FabricIndex value); + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPApplicationLauncherApplicationLauncherListAttributeCallback - : public chip::Callback::Callback +class CHIPLevelControlAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPApplicationLauncherApplicationLauncherListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPApplicationLauncherApplicationLauncherListAttributeCallback(); + ~CHIPLevelControlAttributeListAttributeCallback(); - static void maybeDestroy(CHIPApplicationLauncherApplicationLauncherListAttributeCallback * callback) + static void maybeDestroy(CHIPLevelControlAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPAudioOutputAudioOutputListAttributeCallback - : public chip::Callback::Callback +class CHIPLowPowerAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPAudioOutputAudioOutputListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPLowPowerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPAudioOutputAudioOutputListAttributeCallback(); + ~CHIPLowPowerAttributeListAttributeCallback(); - static void maybeDestroy(CHIPAudioOutputAudioOutputListAttributeCallback * callback) + static void maybeDestroy(CHIPLowPowerAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPBridgedActionsActionListAttributeCallback - : public chip::Callback::Callback +class CHIPMediaInputMediaInputListAttributeCallback + : public chip::Callback::Callback { public: - CHIPBridgedActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPBridgedActionsActionListAttributeCallback(); + ~CHIPMediaInputMediaInputListAttributeCallback(); - static void maybeDestroy(CHIPBridgedActionsActionListAttributeCallback * callback) + static void maybeDestroy(CHIPMediaInputMediaInputListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } static void CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list); + const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPBridgedActionsEndpointListAttributeCallback - : public chip::Callback::Callback +class CHIPMediaInputAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPBridgedActionsEndpointListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPMediaInputAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPBridgedActionsEndpointListAttributeCallback(); + ~CHIPMediaInputAttributeListAttributeCallback(); - static void maybeDestroy(CHIPBridgedActionsEndpointListAttributeCallback * callback) + static void maybeDestroy(CHIPMediaInputAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPContentLauncherAcceptsHeaderListAttributeCallback - : public chip::Callback::Callback +class CHIPMediaPlaybackAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPContentLauncherAcceptsHeaderListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPMediaPlaybackAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPContentLauncherAcceptsHeaderListAttributeCallback(); + ~CHIPMediaPlaybackAttributeListAttributeCallback(); - static void maybeDestroy(CHIPContentLauncherAcceptsHeaderListAttributeCallback * callback) + static void maybeDestroy(CHIPMediaPlaybackAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPContentLauncherSupportedStreamingTypesAttributeCallback - : public chip::Callback::Callback +class CHIPModeSelectSupportedModesAttributeCallback + : public chip::Callback::Callback { public: - CHIPContentLauncherSupportedStreamingTypesAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPContentLauncherSupportedStreamingTypesAttributeCallback(); + ~CHIPModeSelectSupportedModesAttributeCallback(); - static void maybeDestroy(CHIPContentLauncherSupportedStreamingTypesAttributeCallback * callback) + static void maybeDestroy(CHIPModeSelectSupportedModesAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void - CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list); + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPDescriptorDeviceListAttributeCallback - : public chip::Callback::Callback +class CHIPModeSelectAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPDescriptorDeviceListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPDescriptorDeviceListAttributeCallback(); + ~CHIPModeSelectAttributeListAttributeCallback(); - static void maybeDestroy(CHIPDescriptorDeviceListAttributeCallback * callback) + static void maybeDestroy(CHIPModeSelectAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPDescriptorServerListAttributeCallback - : public chip::Callback::Callback +class CHIPNetworkCommissioningAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPNetworkCommissioningAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPDescriptorServerListAttributeCallback(); + ~CHIPNetworkCommissioningAttributeListAttributeCallback(); - static void maybeDestroy(CHIPDescriptorServerListAttributeCallback * callback) + static void maybeDestroy(CHIPNetworkCommissioningAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPDescriptorClientListAttributeCallback - : public chip::Callback::Callback +class CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPDescriptorClientListAttributeCallback(); + ~CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback(); - static void maybeDestroy(CHIPDescriptorClientListAttributeCallback * callback) + static void maybeDestroy(CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPDescriptorPartsListAttributeCallback - : public chip::Callback::Callback +class CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPDescriptorPartsListAttributeCallback(); + ~CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback(); - static void maybeDestroy(CHIPDescriptorPartsListAttributeCallback * callback) + static void maybeDestroy(CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPFixedLabelLabelListAttributeCallback - : public chip::Callback::Callback +class CHIPOccupancySensingAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOccupancySensingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPFixedLabelLabelListAttributeCallback(); + ~CHIPOccupancySensingAttributeListAttributeCallback(); - static void maybeDestroy(CHIPFixedLabelLabelListAttributeCallback * callback) + static void maybeDestroy(CHIPOccupancySensingAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback - : public chip::Callback::Callback +class CHIPOnOffAttributeListAttributeCallback : public chip::Callback::Callback { public: - CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOnOffAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback(); + ~CHIPOnOffAttributeListAttributeCallback(); - static void maybeDestroy(CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback * callback) + static void maybeDestroy(CHIPOnOffAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void - CallbackFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback - : public chip::Callback::Callback +class CHIPOnOffSwitchConfigurationAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOnOffSwitchConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback(); + ~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback(); - static void maybeDestroy(CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback * callback) + static void maybeDestroy(CHIPOnOffSwitchConfigurationAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback - : public chip::Callback::Callback +class CHIPOperationalCredentialsFabricsListAttributeCallback + : public chip::Callback::Callback { public: - CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback(); + ~CHIPOperationalCredentialsFabricsListAttributeCallback(); - static void maybeDestroy(CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback * callback) + static void maybeDestroy(CHIPOperationalCredentialsFabricsListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback - : public chip::Callback::Callback +class CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback + : public chip::Callback::Callback { public: - CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback(); + ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(); - static void maybeDestroy(CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback * callback) + static void maybeDestroy(CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback - : public chip::Callback::Callback +class CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback + : public chip::Callback::Callback { public: - CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback(); + ~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(); - static void maybeDestroy(CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback * callback) + static void maybeDestroy(CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, chip::FabricIndex value); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGroupKeyManagementGroupsAttributeCallback - : public chip::Callback::Callback +class CHIPOperationalCredentialsAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPGroupKeyManagementGroupsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPOperationalCredentialsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGroupKeyManagementGroupsAttributeCallback(); + ~CHIPOperationalCredentialsAttributeListAttributeCallback(); - static void maybeDestroy(CHIPGroupKeyManagementGroupsAttributeCallback * callback) + static void maybeDestroy(CHIPOperationalCredentialsAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPGroupKeyManagementGroupKeysAttributeCallback - : public chip::Callback::Callback +class CHIPPowerSourceActiveBatteryFaultsAttributeCallback + : public chip::Callback::Callback { public: - CHIPGroupKeyManagementGroupKeysAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPowerSourceActiveBatteryFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPGroupKeyManagementGroupKeysAttributeCallback(); + ~CHIPPowerSourceActiveBatteryFaultsAttributeCallback(); - static void maybeDestroy(CHIPGroupKeyManagementGroupKeysAttributeCallback * callback) + static void maybeDestroy(CHIPPowerSourceActiveBatteryFaultsAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPIlluminanceMeasurementMeasuredValueAttributeCallback - : public chip::Callback::Callback +class CHIPPowerSourceAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPIlluminanceMeasurementMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPowerSourceAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPIlluminanceMeasurementMeasuredValueAttributeCallback(); + ~CHIPPowerSourceAttributeListAttributeCallback(); - static void maybeDestroy(CHIPIlluminanceMeasurementMeasuredValueAttributeCallback * callback) + static void maybeDestroy(CHIPPowerSourceAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback - : public chip::Callback::Callback +class CHIPPowerSourceConfigurationSourcesAttributeCallback + : public chip::Callback::Callback { public: - CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback(); + ~CHIPPowerSourceConfigurationSourcesAttributeCallback(); - static void maybeDestroy(CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback * callback) + static void maybeDestroy(CHIPPowerSourceConfigurationSourcesAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback - : public chip::Callback::Callback +class CHIPPowerSourceConfigurationAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPowerSourceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback(); + ~CHIPPowerSourceConfigurationAttributeListAttributeCallback(); - static void maybeDestroy(CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback * callback) + static void maybeDestroy(CHIPPowerSourceConfigurationAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPLevelControlOnTransitionTimeAttributeCallback - : public chip::Callback::Callback +class CHIPPressureMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPLevelControlOnTransitionTimeAttributeCallback(); + ~CHIPPressureMeasurementAttributeListAttributeCallback(); - static void maybeDestroy(CHIPLevelControlOnTransitionTimeAttributeCallback * callback) + static void maybeDestroy(CHIPPressureMeasurementAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPLevelControlOffTransitionTimeAttributeCallback - : public chip::Callback::Callback +class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback + : public chip::Callback::Callback { public: - CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPLevelControlOffTransitionTimeAttributeCallback(); + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); - static void maybeDestroy(CHIPLevelControlOffTransitionTimeAttributeCallback * callback) + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPMediaInputMediaInputListAttributeCallback - : public chip::Callback::Callback +class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback + : public chip::Callback::Callback { public: - CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPMediaInputMediaInputListAttributeCallback(); + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); - static void maybeDestroy(CHIPMediaInputMediaInputListAttributeCallback * callback) + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPModeSelectSupportedModesAttributeCallback - : public chip::Callback::Callback +class CHIPPumpConfigurationAndControlAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPPumpConfigurationAndControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPModeSelectSupportedModesAttributeCallback(); + ~CHIPPumpConfigurationAndControlAttributeListAttributeCallback(); - static void maybeDestroy(CHIPModeSelectSupportedModesAttributeCallback * callback) + static void maybeDestroy(CHIPPumpConfigurationAndControlAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPOperationalCredentialsFabricsListAttributeCallback - : public chip::Callback::Callback +class CHIPRelativeHumidityMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPRelativeHumidityMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPOperationalCredentialsFabricsListAttributeCallback(); + ~CHIPRelativeHumidityMeasurementAttributeListAttributeCallback(); - static void maybeDestroy(CHIPOperationalCredentialsFabricsListAttributeCallback * callback) + static void maybeDestroy(CHIPRelativeHumidityMeasurementAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback - : public chip::Callback::Callback +class CHIPScenesAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPScenesAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(); + ~CHIPScenesAttributeListAttributeCallback(); - static void maybeDestroy(CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback * callback) + static void maybeDestroy(CHIPScenesAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback - : public chip::Callback::Callback +class CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback + : public chip::Callback::Callback { public: - CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback(); + ~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(); - static void maybeDestroy(CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback * callback) + static void maybeDestroy(CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, chip::FabricIndex value); + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPPowerSourceActiveBatteryFaultsAttributeCallback - : public chip::Callback::Callback +class CHIPSoftwareDiagnosticsAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPPowerSourceActiveBatteryFaultsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPSoftwareDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPowerSourceActiveBatteryFaultsAttributeCallback(); + ~CHIPSoftwareDiagnosticsAttributeListAttributeCallback(); - static void maybeDestroy(CHIPPowerSourceActiveBatteryFaultsAttributeCallback * callback) + static void maybeDestroy(CHIPSoftwareDiagnosticsAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPPowerSourceConfigurationSourcesAttributeCallback - : public chip::Callback::Callback +class CHIPSwitchAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPowerSourceConfigurationSourcesAttributeCallback(); + ~CHIPSwitchAttributeListAttributeCallback(); - static void maybeDestroy(CHIPPowerSourceConfigurationSourcesAttributeCallback * callback) + static void maybeDestroy(CHIPSwitchAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback - : public chip::Callback::Callback +class CHIPTvChannelTvChannelListAttributeCallback + : public chip::Callback::Callback { public: - CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); + ~CHIPTvChannelTvChannelListAttributeCallback(); - static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * callback) + static void maybeDestroy(CHIPTvChannelTvChannelListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback - : public chip::Callback::Callback +class CHIPTvChannelAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTvChannelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); + ~CHIPTvChannelAttributeListAttributeCallback(); - static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * callback) + static void maybeDestroy(CHIPTvChannelAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback - : public chip::Callback::Callback +class CHIPTargetNavigatorTargetNavigatorListAttributeCallback + : public chip::Callback::Callback { public: - CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTargetNavigatorTargetNavigatorListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(); + ~CHIPTargetNavigatorTargetNavigatorListAttributeCallback(); - static void maybeDestroy(CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback * callback) + static void maybeDestroy(CHIPTargetNavigatorTargetNavigatorListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list); + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPTvChannelTvChannelListAttributeCallback - : public chip::Callback::Callback +class CHIPTargetNavigatorAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPTvChannelTvChannelListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTargetNavigatorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPTvChannelTvChannelListAttributeCallback(); + ~CHIPTargetNavigatorAttributeListAttributeCallback(); - static void maybeDestroy(CHIPTvChannelTvChannelListAttributeCallback * callback) + static void maybeDestroy(CHIPTargetNavigatorAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; bool keepAlive; }; -class CHIPTargetNavigatorTargetNavigatorListAttributeCallback - : public chip::Callback::Callback +class CHIPTemperatureMeasurementAttributeListAttributeCallback + : public chip::Callback::Callback { public: - CHIPTargetNavigatorTargetNavigatorListAttributeCallback(jobject javaCallback, bool keepAlive = false); + CHIPTemperatureMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); - ~CHIPTargetNavigatorTargetNavigatorListAttributeCallback(); + ~CHIPTemperatureMeasurementAttributeListAttributeCallback(); - static void maybeDestroy(CHIPTargetNavigatorTargetNavigatorListAttributeCallback * callback) + static void maybeDestroy(CHIPTemperatureMeasurementAttributeListAttributeCallback * callback) { if (!callback->keepAlive) { callback->Cancel(); - chip::Platform::Delete(callback); + chip::Platform::Delete(callback); } } - static void CallbackFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list); + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); private: jobject javaCallbackRef; @@ -2062,6 +3308,78 @@ class CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback bool keepAlive; }; +class CHIPTestClusterAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPTestClusterAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPTestClusterAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPTestClusterAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPThermostatAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback : public chip::Callback::Callback { @@ -2192,3 +3510,99 @@ class CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback jobject javaCallbackRef; bool keepAlive; }; + +class CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWakeOnLanAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWakeOnLanAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWakeOnLanAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPWakeOnLanAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPWindowCoveringAttributeListAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPWindowCoveringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPWindowCoveringAttributeListAttributeCallback(); + + static void maybeDestroy(CHIPWindowCoveringAttributeListAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 462dd58f86e4f7..5f0e085a4c4879 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -176,6 +176,12 @@ public interface ExtensionAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readAclAttribute(AclAttributeCallback callback) { readAclAttribute(chipClusterPtr, callback); } @@ -184,6 +190,10 @@ public void readExtensionAttribute(ExtensionAttributeCallback callback) { readExtensionAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -193,6 +203,9 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readExtensionAttribute( long chipClusterPtr, ExtensionAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } @@ -233,6 +246,16 @@ public interface GetSetupPINResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -246,6 +269,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -317,6 +343,12 @@ public interface AdminFabricIndexAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readWindowStatusAttribute(IntegerAttributeCallback callback) { readWindowStatusAttribute(chipClusterPtr, callback); } @@ -329,6 +361,10 @@ public void readAdminVendorIdAttribute(IntegerAttributeCallback callback) { readAdminVendorIdAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -351,6 +387,9 @@ private native void readAdminFabricIndexAttribute( private native void readAdminVendorIdAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -380,6 +419,12 @@ public void changeStatus(DefaultClusterCallback callback, Integer status) { private native void changeStatus( long chipClusterPtr, DefaultClusterCallback Callback, Integer status); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readVendorNameAttribute(CharStringAttributeCallback callback) { readVendorNameAttribute(chipClusterPtr, callback); } @@ -471,6 +516,10 @@ public void reportApplicationStatusAttribute(IntegerAttributeCallback callback) reportApplicationStatusAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -547,6 +596,9 @@ private native void subscribeApplicationStatusAttribute( private native void reportApplicationStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -596,6 +648,12 @@ public interface ApplicationLauncherListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readApplicationLauncherListAttribute( ApplicationLauncherListAttributeCallback callback) { readApplicationLauncherListAttribute(chipClusterPtr, callback); @@ -627,6 +685,10 @@ public void reportApplicationIdAttribute(IntegerAttributeCallback callback) { reportApplicationIdAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -661,6 +723,9 @@ private native void subscribeApplicationIdAttribute( private native void reportApplicationIdAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -733,6 +798,12 @@ public interface AudioOutputListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readAudioOutputListAttribute(AudioOutputListAttributeCallback callback) { readAudioOutputListAttribute(chipClusterPtr, callback); } @@ -750,6 +821,10 @@ public void reportCurrentAudioOutputAttribute(IntegerAttributeCallback callback) reportCurrentAudioOutputAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -775,6 +850,9 @@ private native void subscribeCurrentAudioOutputAttribute( private native void reportCurrentAudioOutputAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -810,6 +888,12 @@ private native void barrierControlGoToPercent( private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readBarrierMovingStateAttribute(IntegerAttributeCallback callback) { readBarrierMovingStateAttribute(chipClusterPtr, callback); } @@ -862,6 +946,10 @@ public void reportBarrierPositionAttribute(IntegerAttributeCallback callback) { reportBarrierPositionAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -911,6 +999,9 @@ private native void subscribeBarrierPositionAttribute( private native void reportBarrierPositionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -939,6 +1030,12 @@ public void mfgSpecificPing(DefaultClusterCallback callback) { private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readInteractionModelVersionAttribute(IntegerAttributeCallback callback) { readInteractionModelVersionAttribute(chipClusterPtr, callback); } @@ -1189,6 +1286,10 @@ public void readUniqueIDAttribute(CharStringAttributeCallback callback) { readUniqueIDAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1376,6 +1477,9 @@ private native void reportReachableAttribute( private native void readUniqueIDAttribute( long chipClusterPtr, CharStringAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1398,6 +1502,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readOutOfServiceAttribute(BooleanAttributeCallback callback) { readOutOfServiceAttribute(chipClusterPtr, callback); } @@ -1445,6 +1555,10 @@ public void reportStatusFlagsAttribute(IntegerAttributeCallback callback) { reportStatusFlagsAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1491,6 +1605,9 @@ private native void subscribeStatusFlagsAttribute( private native void reportStatusFlagsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1547,6 +1664,16 @@ private native void unbind( Integer endpointId, Long clusterId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1560,6 +1687,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1582,6 +1712,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readStateValueAttribute(BooleanAttributeCallback callback) { readStateValueAttribute(chipClusterPtr, callback); } @@ -1595,6 +1731,10 @@ public void reportStateValueAttribute(BooleanAttributeCallback callback) { reportStateValueAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1617,6 +1757,9 @@ private native void subscribeStateValueAttribute( private native void reportStateValueAttribute( long chipClusterPtr, BooleanAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1875,6 +2018,12 @@ public interface EndpointListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readActionListAttribute(ActionListAttributeCallback callback) { readActionListAttribute(chipClusterPtr, callback); } @@ -1896,6 +2045,10 @@ public void reportSetupUrlAttribute(CharStringAttributeCallback callback) { reportSetupUrlAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1924,6 +2077,9 @@ private native void subscribeSetupUrlAttribute( private native void reportSetupUrlAttribute( long chipClusterPtr, CharStringAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1946,6 +2102,16 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1959,6 +2125,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -2399,6 +2568,12 @@ private native void stopMoveStep( Integer optionsMask, Integer optionsOverride); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readCurrentHueAttribute(IntegerAttributeCallback callback) { readCurrentHueAttribute(chipClusterPtr, callback); } @@ -3132,6 +3307,10 @@ public void reportStartUpColorTemperatureMiredsAttribute(IntegerAttributeCallbac reportStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -3652,6 +3831,9 @@ private native void subscribeStartUpColorTemperatureMiredsAttribute( private native void reportStartUpColorTemperatureMiredsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -3717,6 +3899,12 @@ public interface SupportedStreamingTypesAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readAcceptsHeaderListAttribute(AcceptsHeaderListAttributeCallback callback) { readAcceptsHeaderListAttribute(chipClusterPtr, callback); } @@ -3726,6 +3914,10 @@ public void readSupportedStreamingTypesAttribute( readSupportedStreamingTypesAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -3745,6 +3937,9 @@ private native void readAcceptsHeaderListAttribute( private native void readSupportedStreamingTypesAttribute( long chipClusterPtr, SupportedStreamingTypesAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -3815,6 +4010,12 @@ public interface PartsListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readDeviceListAttribute(DeviceListAttributeCallback callback) { readDeviceListAttribute(chipClusterPtr, callback); } @@ -3831,6 +4032,10 @@ public void readPartsListAttribute(PartsListAttributeCallback callback) { readPartsListAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -3856,6 +4061,9 @@ private native void readClientListAttribute( private native void readPartsListAttribute( long chipClusterPtr, PartsListAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -3899,6 +4107,19 @@ public interface RetrieveLogsResponseCallback { void onError(Exception error); } + + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); } public static class DoorLockCluster extends BaseChipCluster { @@ -4235,6 +4456,12 @@ void onSuccess( void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readActuatorEnabledAttribute(BooleanAttributeCallback callback) { readActuatorEnabledAttribute(chipClusterPtr, callback); } @@ -4248,6 +4475,10 @@ public void reportActuatorEnabledAttribute(BooleanAttributeCallback callback) { reportActuatorEnabledAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4270,6 +4501,9 @@ private native void subscribeActuatorEnabledAttribute( private native void reportActuatorEnabledAttribute( long chipClusterPtr, BooleanAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4292,6 +4526,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasurementTypeAttribute(LongAttributeCallback callback) { readMeasurementTypeAttribute(chipClusterPtr, callback); } @@ -4435,6 +4675,10 @@ public void reportActivePowerMaxAttribute(IntegerAttributeCallback callback) { reportActivePowerMaxAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4547,6 +4791,9 @@ private native void subscribeActivePowerMaxAttribute( private native void reportActivePowerMaxAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4575,6 +4822,12 @@ public void resetCounts(DefaultClusterCallback callback) { private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readPHYRateAttribute(IntegerAttributeCallback callback) { readPHYRateAttribute(chipClusterPtr, callback); } @@ -4692,6 +4945,10 @@ public void reportTimeSinceResetAttribute(LongAttributeCallback callback) { reportTimeSinceResetAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -4790,6 +5047,9 @@ private native void subscribeTimeSinceResetAttribute( private native void reportTimeSinceResetAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -4845,10 +5105,20 @@ public interface LabelListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readLabelListAttribute(LabelListAttributeCallback callback) { readLabelListAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4865,6 +5135,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readLabelListAttribute( long chipClusterPtr, LabelListAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4887,6 +5160,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasuredValueAttribute(IntegerAttributeCallback callback) { readMeasuredValueAttribute(chipClusterPtr, callback); } @@ -4939,6 +5218,10 @@ public void reportToleranceAttribute(IntegerAttributeCallback callback) { reportToleranceAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4988,6 +5271,9 @@ private native void subscribeToleranceAttribute( private native void reportToleranceAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5091,6 +5377,12 @@ public interface BasicCommissioningInfoListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readBreadcrumbAttribute(LongAttributeCallback callback) { readBreadcrumbAttribute(chipClusterPtr, callback); } @@ -5121,6 +5413,10 @@ public void readLocationCapabilityAttribute(IntegerAttributeCallback callback) { readLocationCapabilityAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5155,6 +5451,9 @@ private native void readRegulatoryConfigAttribute( private native void readLocationCapabilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5255,6 +5554,12 @@ public interface ActiveNetworkFaultsAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readNetworkInterfacesAttribute(NetworkInterfacesAttributeCallback callback) { readNetworkInterfacesAttribute(chipClusterPtr, callback); } @@ -5323,6 +5628,10 @@ public void readActiveNetworkFaultsAttribute(ActiveNetworkFaultsAttributeCallbac readActiveNetworkFaultsAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5382,6 +5691,9 @@ private native void readActiveRadioFaultsAttribute( private native void readActiveNetworkFaultsAttribute( long chipClusterPtr, ActiveNetworkFaultsAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5493,6 +5805,12 @@ public interface GroupKeysAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readGroupsAttribute(GroupsAttributeCallback callback) { readGroupsAttribute(chipClusterPtr, callback); } @@ -5501,6 +5819,10 @@ public void readGroupKeysAttribute(GroupKeysAttributeCallback callback) { readGroupKeysAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5519,6 +5841,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readGroupKeysAttribute( long chipClusterPtr, GroupKeysAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5610,6 +5935,12 @@ public interface ViewGroupResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readNameSupportAttribute(IntegerAttributeCallback callback) { readNameSupportAttribute(chipClusterPtr, callback); } @@ -5623,6 +5954,10 @@ public void reportNameSupportAttribute(IntegerAttributeCallback callback) { reportNameSupportAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5645,6 +5980,9 @@ private native void subscribeNameSupportAttribute( private native void reportNameSupportAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5697,6 +6035,12 @@ public interface IdentifyQueryResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readIdentifyTimeAttribute(IntegerAttributeCallback callback) { readIdentifyTimeAttribute(chipClusterPtr, callback); } @@ -5727,6 +6071,10 @@ public void reportIdentifyTypeAttribute(IntegerAttributeCallback callback) { reportIdentifyTypeAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5761,6 +6109,9 @@ private native void subscribeIdentifyTypeAttribute( private native void reportIdentifyTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5801,6 +6152,12 @@ public interface MaxMeasuredValueAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasuredValueAttribute(MeasuredValueAttributeCallback callback) { readMeasuredValueAttribute(chipClusterPtr, callback); } @@ -5866,6 +6223,10 @@ public void reportLightSensorTypeAttribute(IntegerAttributeCallback callback) { reportLightSensorTypeAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5924,6 +6285,9 @@ private native void subscribeLightSensorTypeAttribute( private native void reportLightSensorTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5959,6 +6323,16 @@ public interface SendKeyResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5972,6 +6346,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6109,6 +6486,12 @@ public interface OffTransitionTimeAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readCurrentLevelAttribute(IntegerAttributeCallback callback) { readCurrentLevelAttribute(chipClusterPtr, callback); } @@ -6322,6 +6705,10 @@ public void reportStartUpCurrentLevelAttribute(IntegerAttributeCallback callback reportStartUpCurrentLevelAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6482,6 +6869,9 @@ private native void subscribeStartUpCurrentLevelAttribute( private native void reportStartUpCurrentLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6510,6 +6900,16 @@ public void sleep(DefaultClusterCallback callback) { private native void sleep(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6523,6 +6923,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6614,6 +7017,12 @@ public interface MediaInputListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMediaInputListAttribute(MediaInputListAttributeCallback callback) { readMediaInputListAttribute(chipClusterPtr, callback); } @@ -6631,6 +7040,10 @@ public void reportCurrentMediaInputAttribute(IntegerAttributeCallback callback) reportCurrentMediaInputAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6656,6 +7069,9 @@ private native void subscribeCurrentMediaInputAttribute( private native void reportCurrentMediaInputAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6821,6 +7237,12 @@ public interface MediaStopResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readPlaybackStateAttribute(IntegerAttributeCallback callback) { readPlaybackStateAttribute(chipClusterPtr, callback); } @@ -6925,6 +7347,10 @@ public void reportSeekRangeStartAttribute(LongAttributeCallback callback) { reportSeekRangeStartAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7007,6 +7433,9 @@ private native void subscribeSeekRangeStartAttribute( private native void reportSeekRangeStartAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7072,6 +7501,12 @@ public interface SupportedModesAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readCurrentModeAttribute(IntegerAttributeCallback callback) { readCurrentModeAttribute(chipClusterPtr, callback); } @@ -7132,6 +7567,10 @@ public void reportDescriptionAttribute(CharStringAttributeCallback callback) { reportDescriptionAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7186,6 +7625,9 @@ private native void subscribeDescriptionAttribute( private native void reportDescriptionAttribute( long chipClusterPtr, CharStringAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7376,6 +7818,16 @@ public interface UpdateWiFiNetworkResponseCallback { void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -7402,6 +7854,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -7510,6 +7965,16 @@ void onSuccess( void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7523,6 +7988,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { reportClusterRevisionAttribute(chipClusterPtr, callback); } + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7568,6 +8036,12 @@ private native void announceOtaProvider( Integer announcementReason, Optional metadataForNode); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readDefaultOtaProviderAttribute(OctetStringAttributeCallback callback) { readDefaultOtaProviderAttribute(chipClusterPtr, callback); } @@ -7598,6 +8072,10 @@ public void reportUpdatePossibleAttribute(BooleanAttributeCallback callback) { reportUpdatePossibleAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7632,6 +8110,9 @@ private native void subscribeUpdatePossibleAttribute( private native void reportUpdatePossibleAttribute( long chipClusterPtr, BooleanAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7654,6 +8135,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readOccupancyAttribute(IntegerAttributeCallback callback) { readOccupancyAttribute(chipClusterPtr, callback); } @@ -7694,6 +8181,10 @@ public void reportOccupancySensorTypeBitmapAttribute(IntegerAttributeCallback ca reportOccupancySensorTypeBitmapAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7734,6 +8225,9 @@ private native void subscribeOccupancySensorTypeBitmapAttribute( private native void reportOccupancySensorTypeBitmapAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7807,6 +8301,12 @@ private native void onWithTimedOff( private native void toggle(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readOnOffAttribute(BooleanAttributeCallback callback) { readOnOffAttribute(chipClusterPtr, callback); } @@ -7884,6 +8384,10 @@ public void reportStartUpOnOffAttribute(IntegerAttributeCallback callback) { reportStartUpOnOffAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -7962,6 +8466,9 @@ private native void subscribeStartUpOnOffAttribute( private native void reportStartUpOnOffAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -7993,6 +8500,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readSwitchTypeAttribute(IntegerAttributeCallback callback) { readSwitchTypeAttribute(chipClusterPtr, callback); } @@ -8023,6 +8536,10 @@ public void reportSwitchActionsAttribute(IntegerAttributeCallback callback) { reportSwitchActionsAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8057,6 +8574,9 @@ private native void subscribeSwitchActionsAttribute( private native void reportSwitchActionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8256,6 +8776,12 @@ public interface CurrentFabricIndexAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readFabricsListAttribute(FabricsListAttributeCallback callback) { readFabricsListAttribute(chipClusterPtr, callback); } @@ -8304,6 +8830,10 @@ public void reportCurrentFabricIndexAttribute(IntegerAttributeCallback callback) reportCurrentFabricIndexAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8350,6 +8880,9 @@ private native void subscribeCurrentFabricIndexAttribute( private native void reportCurrentFabricIndexAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8378,6 +8911,12 @@ public interface ActiveBatteryFaultsAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readStatusAttribute(IntegerAttributeCallback callback) { readStatusAttribute(chipClusterPtr, callback); } @@ -8486,6 +9025,10 @@ public void reportBatteryChargeStateAttribute(IntegerAttributeCallback callback) reportBatteryChargeStateAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -8585,6 +9128,9 @@ private native void subscribeBatteryChargeStateAttribute( private native void reportBatteryChargeStateAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -8622,10 +9168,20 @@ public interface SourcesAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readSourcesAttribute(SourcesAttributeCallback callback) { readSourcesAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8633,6 +9189,9 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readSourcesAttribute( long chipClusterPtr, SourcesAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } @@ -8649,6 +9208,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasuredValueAttribute(IntegerAttributeCallback callback) { readMeasuredValueAttribute(chipClusterPtr, callback); } @@ -8688,6 +9253,10 @@ public void reportMaxMeasuredValueAttribute(IntegerAttributeCallback callback) { reportMaxMeasuredValueAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8728,6 +9297,9 @@ private native void subscribeMaxMeasuredValueAttribute( private native void reportMaxMeasuredValueAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8762,6 +9334,12 @@ public interface LifetimeEnergyConsumedAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMaxPressureAttribute(IntegerAttributeCallback callback) { readMaxPressureAttribute(chipClusterPtr, callback); } @@ -9093,6 +9671,10 @@ public void reportAlarmMaskAttribute(IntegerAttributeCallback callback) { reportAlarmMaskAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -9344,6 +9926,9 @@ private native void subscribeAlarmMaskAttribute( private native void reportAlarmMaskAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -9375,6 +9960,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasuredValueAttribute(IntegerAttributeCallback callback) { readMeasuredValueAttribute(chipClusterPtr, callback); } @@ -9427,6 +10018,10 @@ public void reportToleranceAttribute(IntegerAttributeCallback callback) { reportToleranceAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -9476,6 +10071,9 @@ private native void subscribeToleranceAttribute( private native void reportToleranceAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9624,6 +10222,12 @@ void onSuccess( void onError(Exception error); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readSceneCountAttribute(IntegerAttributeCallback callback) { readSceneCountAttribute(chipClusterPtr, callback); } @@ -9689,6 +10293,10 @@ public void reportNameSupportAttribute(IntegerAttributeCallback callback) { reportNameSupportAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -9747,6 +10355,9 @@ private native void subscribeNameSupportAttribute( private native void reportNameSupportAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9824,6 +10435,12 @@ public interface ThreadMetricsAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readThreadMetricsAttribute(ThreadMetricsAttributeCallback callback) { readThreadMetricsAttribute(chipClusterPtr, callback); } @@ -9868,6 +10485,10 @@ public void reportCurrentHeapHighWatermarkAttribute(LongAttributeCallback callba reportCurrentHeapHighWatermarkAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -9915,6 +10536,9 @@ private native void subscribeCurrentHeapHighWatermarkAttribute( private native void reportCurrentHeapHighWatermarkAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -9940,6 +10564,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readNumberOfPositionsAttribute(IntegerAttributeCallback callback) { readNumberOfPositionsAttribute(chipClusterPtr, callback); } @@ -9979,6 +10609,10 @@ public void reportMultiPressMaxAttribute(IntegerAttributeCallback callback) { reportMultiPressMaxAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -10032,6 +10666,9 @@ private native void subscribeMultiPressMaxAttribute( private native void reportMultiPressMaxAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -10149,6 +10786,12 @@ public interface TvChannelListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readTvChannelListAttribute(TvChannelListAttributeCallback callback) { readTvChannelListAttribute(chipClusterPtr, callback); } @@ -10179,6 +10822,10 @@ public void reportCurrentTvChannelAttribute(OctetStringAttributeCallback callbac reportCurrentTvChannelAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10213,6 +10860,9 @@ private native void subscribeCurrentTvChannelAttribute( private native void reportCurrentTvChannelAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10279,10 +10929,20 @@ public interface TargetNavigatorListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readTargetNavigatorListAttribute(TargetNavigatorListAttributeCallback callback) { readTargetNavigatorListAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10299,6 +10959,9 @@ public void reportClusterRevisionAttribute(IntegerAttributeCallback callback) { private native void readTargetNavigatorListAttribute( long chipClusterPtr, TargetNavigatorListAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10321,6 +10984,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readMeasuredValueAttribute(IntegerAttributeCallback callback) { readMeasuredValueAttribute(chipClusterPtr, callback); } @@ -10373,6 +11042,10 @@ public void reportToleranceAttribute(IntegerAttributeCallback callback) { reportToleranceAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10422,6 +11095,9 @@ private native void subscribeToleranceAttribute( private native void reportToleranceAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10934,6 +11610,12 @@ public interface NullableRangeRestrictedInt16sAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readBooleanAttribute(BooleanAttributeCallback callback) { readBooleanAttribute(chipClusterPtr, callback); } @@ -12160,6 +12842,10 @@ public void reportNullableRangeRestrictedInt16sAttribute(IntegerAttributeCallbac reportNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -12974,6 +13660,9 @@ private native void subscribeNullableRangeRestrictedInt16sAttribute( private native void reportNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -13049,6 +13738,12 @@ private native void setWeeklySchedule( private native void setpointRaiseLower( long chipClusterPtr, DefaultClusterCallback Callback, Integer mode, Integer amount); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readLocalTemperatureAttribute(IntegerAttributeCallback callback) { readLocalTemperatureAttribute(chipClusterPtr, callback); } @@ -13312,6 +14007,10 @@ public void reportNumberOfDailyTransitionsAttribute(IntegerAttributeCallback cal reportNumberOfDailyTransitionsAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -13518,6 +14217,9 @@ private native void subscribeNumberOfDailyTransitionsAttribute( private native void reportNumberOfDailyTransitionsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -13549,6 +14251,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readTemperatureDisplayModeAttribute(IntegerAttributeCallback callback) { readTemperatureDisplayModeAttribute(chipClusterPtr, callback); } @@ -13603,6 +14311,10 @@ public void reportScheduleProgrammingVisibilityAttribute(IntegerAttributeCallbac reportScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -13652,6 +14364,9 @@ private native void subscribeScheduleProgrammingVisibilityAttribute( private native void reportScheduleProgrammingVisibilityAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14022,6 +14737,12 @@ public interface ActiveNetworkFaultsListAttributeCallback { void onError(Exception ex); } + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readChannelAttribute(IntegerAttributeCallback callback) { readChannelAttribute(chipClusterPtr, callback); } @@ -14804,6 +15525,10 @@ public void readActiveNetworkFaultsListAttribute( readActiveNetworkFaultsListAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -15355,6 +16080,9 @@ private native void readOperationalDatasetComponentsAttribute( private native void readActiveNetworkFaultsListAttribute( long chipClusterPtr, ActiveNetworkFaultsListAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -15380,6 +16108,12 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readWakeOnLanMacAddressAttribute(CharStringAttributeCallback callback) { readWakeOnLanMacAddressAttribute(chipClusterPtr, callback); } @@ -15393,6 +16127,10 @@ public void reportWakeOnLanMacAddressAttribute(CharStringAttributeCallback callb reportWakeOnLanMacAddressAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -15415,6 +16153,9 @@ private native void subscribeWakeOnLanMacAddressAttribute( private native void reportWakeOnLanMacAddressAttribute( long chipClusterPtr, CharStringAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -15443,6 +16184,12 @@ public void resetCounts(DefaultClusterCallback callback) { private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readBssidAttribute(OctetStringAttributeCallback callback) { readBssidAttribute(chipClusterPtr, callback); } @@ -15612,6 +16359,10 @@ public void reportOverrunCountAttribute(LongAttributeCallback callback) { reportOverrunCountAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -15744,6 +16495,9 @@ private native void subscribeOverrunCountAttribute( private native void reportOverrunCountAttribute( long chipClusterPtr, LongAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -15827,6 +16581,12 @@ private native void goToTiltValue( private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback); + public interface AttributeListAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + } + public void readTypeAttribute(IntegerAttributeCallback callback) { readTypeAttribute(chipClusterPtr, callback); } @@ -16073,6 +16833,10 @@ public void reportSafetyStatusAttribute(IntegerAttributeCallback callback) { reportSafetyStatusAttribute(chipClusterPtr, callback); } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -16260,6 +17024,9 @@ private native void subscribeSafetyStatusAttribute( private native void reportSafetyStatusAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + private native void readAttributeListAttribute( + long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index daebcc16f60a82..91543be0f79e5c 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -221,7 +221,7 @@ public void onError(Exception e) { } } - public static class DelegatedAclAttributeCallback + public static class DelegatedAccessControlClusterAclAttributeCallback implements ChipClusters.AccessControlCluster.AclAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -247,7 +247,7 @@ public void onError(Exception ex) { } } - public static class DelegatedExtensionAttributeCallback + public static class DelegatedAccessControlClusterExtensionAttributeCallback implements ChipClusters.AccessControlCluster.ExtensionAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -274,6 +274,31 @@ public void onError(Exception ex) { } } + public static class DelegatedAccessControlClusterAttributeListAttributeCallback + implements ChipClusters.AccessControlCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedGetSetupPINResponseCallback implements ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback, DelegatedClusterCallback { @@ -298,6 +323,81 @@ public void onError(Exception error) { } } + public static class DelegatedAccountLoginClusterAttributeListAttributeCallback + implements ChipClusters.AccountLoginCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAdministratorCommissioningClusterAttributeListAttributeCallback + implements ChipClusters.AdministratorCommissioningCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplicationBasicClusterAttributeListAttributeCallback + implements ChipClusters.ApplicationBasicCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaunchAppResponseCallback implements ChipClusters.ApplicationLauncherCluster.LaunchAppResponseCallback, DelegatedClusterCallback { @@ -324,7 +424,7 @@ public void onError(Exception error) { } } - public static class DelegatedApplicationLauncherListAttributeCallback + public static class DelegatedApplicationLauncherClusterApplicationLauncherListAttributeCallback implements ChipClusters.ApplicationLauncherCluster.ApplicationLauncherListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -350,7 +450,32 @@ public void onError(Exception ex) { } } - public static class DelegatedAudioOutputListAttributeCallback + public static class DelegatedApplicationLauncherClusterAttributeListAttributeCallback + implements ChipClusters.ApplicationLauncherCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedAudioOutputClusterAudioOutputListAttributeCallback implements ChipClusters.AudioOutputCluster.AudioOutputListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -378,7 +503,157 @@ public void onError(Exception ex) { } } - public static class DelegatedActionListAttributeCallback + public static class DelegatedAudioOutputClusterAttributeListAttributeCallback + implements ChipClusters.AudioOutputCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBarrierControlClusterAttributeListAttributeCallback + implements ChipClusters.BarrierControlCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBasicClusterAttributeListAttributeCallback + implements ChipClusters.BasicCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBinaryInputBasicClusterAttributeListAttributeCallback + implements ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBindingClusterAttributeListAttributeCallback + implements ChipClusters.BindingCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBooleanStateClusterAttributeListAttributeCallback + implements ChipClusters.BooleanStateCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBridgedActionsClusterActionListAttributeCallback implements ChipClusters.BridgedActionsCluster.ActionListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -405,7 +680,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEndpointListAttributeCallback + public static class DelegatedBridgedActionsClusterEndpointListAttributeCallback implements ChipClusters.BridgedActionsCluster.EndpointListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -433,6 +708,81 @@ public void onError(Exception ex) { } } + public static class DelegatedBridgedActionsClusterAttributeListAttributeCallback + implements ChipClusters.BridgedActionsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBridgedDeviceBasicClusterAttributeListAttributeCallback + implements ChipClusters.BridgedDeviceBasicCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedColorControlClusterAttributeListAttributeCallback + implements ChipClusters.ColorControlCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedLaunchContentResponseCallback implements ChipClusters.ContentLauncherCluster.LaunchContentResponseCallback, DelegatedClusterCallback { @@ -487,7 +837,7 @@ public void onError(Exception error) { } } - public static class DelegatedAcceptsHeaderListAttributeCallback + public static class DelegatedContentLauncherClusterAcceptsHeaderListAttributeCallback implements ChipClusters.ContentLauncherCluster.AcceptsHeaderListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -513,7 +863,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSupportedStreamingTypesAttributeCallback + public static class DelegatedContentLauncherClusterSupportedStreamingTypesAttributeCallback implements ChipClusters.ContentLauncherCluster.SupportedStreamingTypesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -539,7 +889,32 @@ public void onError(Exception ex) { } } - public static class DelegatedDeviceListAttributeCallback + public static class DelegatedContentLauncherClusterAttributeListAttributeCallback + implements ChipClusters.ContentLauncherCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDescriptorClusterDeviceListAttributeCallback implements ChipClusters.DescriptorCluster.DeviceListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -566,7 +941,7 @@ public void onError(Exception ex) { } } - public static class DelegatedServerListAttributeCallback + public static class DelegatedDescriptorClusterServerListAttributeCallback implements ChipClusters.DescriptorCluster.ServerListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -591,7 +966,7 @@ public void onError(Exception ex) { } } - public static class DelegatedClientListAttributeCallback + public static class DelegatedDescriptorClusterClientListAttributeCallback implements ChipClusters.DescriptorCluster.ClientListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -616,7 +991,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPartsListAttributeCallback + public static class DelegatedDescriptorClusterPartsListAttributeCallback implements ChipClusters.DescriptorCluster.PartsListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -642,6 +1017,31 @@ public void onError(Exception ex) { } } + public static class DelegatedDescriptorClusterAttributeListAttributeCallback + implements ChipClusters.DescriptorCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedRetrieveLogsResponseCallback implements ChipClusters.DiagnosticLogsCluster.RetrieveLogsResponseCallback, DelegatedClusterCallback { @@ -673,6 +1073,31 @@ public void onError(Exception error) { } } + public static class DelegatedDiagnosticLogsClusterAttributeListAttributeCallback + implements ChipClusters.DiagnosticLogsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedGetHolidayScheduleResponseCallback implements ChipClusters.DoorLockCluster.GetHolidayScheduleResponseCallback, DelegatedClusterCallback { @@ -933,13 +1358,140 @@ public void onSuccess( } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedDoorLockClusterAttributeListAttributeCallback + implements ChipClusters.DoorLockCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedElectricalMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedEthernetNetworkDiagnosticsClusterAttributeListAttributeCallback + implements ChipClusters.EthernetNetworkDiagnosticsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFixedLabelClusterLabelListAttributeCallback + implements ChipClusters.FixedLabelCluster.LabelListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFixedLabelClusterAttributeListAttributeCallback + implements ChipClusters.FixedLabelCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedLabelListAttributeCallback - implements ChipClusters.FixedLabelCluster.LabelListAttributeCallback, + public static class DelegatedFlowMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.FlowMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -949,11 +1501,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); @@ -1043,7 +1593,8 @@ public void onError(Exception error) { } } - public static class DelegatedBasicCommissioningInfoListAttributeCallback + public static + class DelegatedGeneralCommissioningClusterBasicCommissioningInfoListAttributeCallback implements ChipClusters.GeneralCommissioningCluster .BasicCommissioningInfoListAttributeCallback, DelegatedClusterCallback { @@ -1074,7 +1625,32 @@ public void onError(Exception ex) { } } - public static class DelegatedNetworkInterfacesAttributeCallback + public static class DelegatedGeneralCommissioningClusterAttributeListAttributeCallback + implements ChipClusters.GeneralCommissioningCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedGeneralDiagnosticsClusterNetworkInterfacesAttributeCallback implements ChipClusters.GeneralDiagnosticsCluster.NetworkInterfacesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1103,7 +1679,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActiveHardwareFaultsAttributeCallback + public static class DelegatedGeneralDiagnosticsClusterActiveHardwareFaultsAttributeCallback implements ChipClusters.GeneralDiagnosticsCluster.ActiveHardwareFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1129,7 +1705,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActiveRadioFaultsAttributeCallback + public static class DelegatedGeneralDiagnosticsClusterActiveRadioFaultsAttributeCallback implements ChipClusters.GeneralDiagnosticsCluster.ActiveRadioFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1155,7 +1731,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActiveNetworkFaultsAttributeCallback + public static class DelegatedGeneralDiagnosticsClusterActiveNetworkFaultsAttributeCallback implements ChipClusters.GeneralDiagnosticsCluster.ActiveNetworkFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1181,7 +1757,32 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupsAttributeCallback + public static class DelegatedGeneralDiagnosticsClusterAttributeListAttributeCallback + implements ChipClusters.GeneralDiagnosticsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedGroupKeyManagementClusterGroupsAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1208,7 +1809,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeysAttributeCallback + public static class DelegatedGroupKeyManagementClusterGroupKeysAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupKeysAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1236,6 +1837,31 @@ public void onError(Exception ex) { } } + public static class DelegatedGroupKeyManagementClusterAttributeListAttributeCallback + implements ChipClusters.GroupKeyManagementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedAddGroupResponseCallback implements ChipClusters.GroupsCluster.AddGroupResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1337,13 +1963,185 @@ public void onSuccess(Integer status, Integer groupId, String groupName) { } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedGroupsClusterAttributeListAttributeCallback + implements ChipClusters.GroupsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedIdentifyQueryResponseCallback + implements ChipClusters.IdentifyCluster.IdentifyQueryResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer timeout) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo timeoutResponseValue = new CommandResponseInfo("timeout", "int"); + responseValues.put(timeoutResponseValue, timeout); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedIdentifyClusterAttributeListAttributeCallback + implements ChipClusters.IdentifyCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedIlluminanceMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.IlluminanceMeasurementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSendKeyResponseCallback + implements ChipClusters.KeypadInputCluster.SendKeyResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + responseValues.put(statusResponseValue, status); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedKeypadInputClusterAttributeListAttributeCallback + implements ChipClusters.KeypadInputCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedLevelControlClusterAttributeListAttributeCallback + implements ChipClusters.LevelControlCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedIdentifyQueryResponseCallback - implements ChipClusters.IdentifyCluster.IdentifyQueryResponseCallback, + public static class DelegatedLowPowerClusterAttributeListAttributeCallback + implements ChipClusters.LowPowerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1353,21 +2151,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer timeout) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo timeoutResponseValue = new CommandResponseInfo("timeout", "int"); - responseValues.put(timeoutResponseValue, timeout); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedSendKeyResponseCallback - implements ChipClusters.KeypadInputCluster.SendKeyResponseCallback, DelegatedClusterCallback { + public static class DelegatedMediaInputClusterMediaInputListAttributeCallback + implements ChipClusters.MediaInputCluster.MediaInputListAttributeCallback, + DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -1376,21 +2176,24 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); - responseValues.put(statusResponseValue, status); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedMediaInputListAttributeCallback - implements ChipClusters.MediaInputCluster.MediaInputListAttributeCallback, + public static class DelegatedMediaInputClusterAttributeListAttributeCallback + implements ChipClusters.MediaInputCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1400,11 +2203,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); @@ -1691,7 +2492,32 @@ public void onError(Exception error) { } } - public static class DelegatedSupportedModesAttributeCallback + public static class DelegatedMediaPlaybackClusterAttributeListAttributeCallback + implements ChipClusters.MediaPlaybackCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1718,6 +2544,31 @@ public void onError(Exception ex) { } } + public static class DelegatedModeSelectClusterAttributeListAttributeCallback + implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedAddThreadNetworkResponseCallback implements ChipClusters.NetworkCommissioningCluster.AddThreadNetworkResponseCallback, DelegatedClusterCallback { @@ -1935,8 +2786,187 @@ public void onError(Exception error) { } } - public static class DelegatedApplyUpdateResponseCallback - implements ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateResponseCallback, + public static class DelegatedNetworkCommissioningClusterAttributeListAttributeCallback + implements ChipClusters.NetworkCommissioningCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedApplyUpdateResponseCallback + implements ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer action, Long delayedActionTime) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "int"); + responseValues.put(actionResponseValue, action); + CommandResponseInfo delayedActionTimeResponseValue = + new CommandResponseInfo("delayedActionTime", "long"); + responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedQueryImageResponseCallback + implements ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess( + Integer status, + Optional delayedActionTime, + Optional imageURI, + Optional softwareVersion, + Optional softwareVersionString, + Optional updateToken, + Optional userConsentNeeded, + Optional metadataForRequestor) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo delayedActionTimeResponseValue = + new CommandResponseInfo("delayedActionTime", "long"); + responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + CommandResponseInfo imageURIResponseValue = new CommandResponseInfo("imageURI", "String"); + responseValues.put(imageURIResponseValue, imageURI); + CommandResponseInfo softwareVersionResponseValue = + new CommandResponseInfo("softwareVersion", "long"); + responseValues.put(softwareVersionResponseValue, softwareVersion); + CommandResponseInfo softwareVersionStringResponseValue = + new CommandResponseInfo("softwareVersionString", "String"); + responseValues.put(softwareVersionStringResponseValue, softwareVersionString); + CommandResponseInfo updateTokenResponseValue = + new CommandResponseInfo("updateToken", "byte[]"); + responseValues.put(updateTokenResponseValue, updateToken); + CommandResponseInfo userConsentNeededResponseValue = + new CommandResponseInfo("userConsentNeeded", "boolean"); + responseValues.put(userConsentNeededResponseValue, userConsentNeeded); + CommandResponseInfo metadataForRequestorResponseValue = + new CommandResponseInfo("metadataForRequestor", "byte[]"); + responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedOtaSoftwareUpdateProviderClusterAttributeListAttributeCallback + implements ChipClusters.OtaSoftwareUpdateProviderCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallback + implements ChipClusters.OtaSoftwareUpdateRequestorCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOccupancySensingClusterAttributeListAttributeCallback + implements ChipClusters.OccupancySensingCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOnOffClusterAttributeListAttributeCallback + implements ChipClusters.OnOffCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1946,24 +2976,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer action, Long delayedActionTime) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "int"); - responseValues.put(actionResponseValue, action); - CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "long"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedQueryImageResponseCallback - implements ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback, + public static class DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback + implements ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -1973,44 +3001,17 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - Integer status, - Optional delayedActionTime, - Optional imageURI, - Optional softwareVersion, - Optional softwareVersionString, - Optional updateToken, - Optional userConsentNeeded, - Optional metadataForRequestor) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "long"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); - CommandResponseInfo imageURIResponseValue = new CommandResponseInfo("imageURI", "String"); - responseValues.put(imageURIResponseValue, imageURI); - CommandResponseInfo softwareVersionResponseValue = - new CommandResponseInfo("softwareVersion", "long"); - responseValues.put(softwareVersionResponseValue, softwareVersion); - CommandResponseInfo softwareVersionStringResponseValue = - new CommandResponseInfo("softwareVersionString", "String"); - responseValues.put(softwareVersionStringResponseValue, softwareVersionString); - CommandResponseInfo updateTokenResponseValue = - new CommandResponseInfo("updateToken", "byte[]"); - responseValues.put(updateTokenResponseValue, updateToken); - CommandResponseInfo userConsentNeededResponseValue = - new CommandResponseInfo("userConsentNeeded", "boolean"); - responseValues.put(userConsentNeededResponseValue, userConsentNeeded); - CommandResponseInfo metadataForRequestorResponseValue = - new CommandResponseInfo("metadataForRequestor", "byte[]"); - responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } @@ -2122,7 +3123,7 @@ public void onError(Exception error) { } } - public static class DelegatedFabricsListAttributeCallback + public static class DelegatedOperationalCredentialsClusterFabricsListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.FabricsListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2150,7 +3151,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTrustedRootCertificatesAttributeCallback + public static class DelegatedOperationalCredentialsClusterTrustedRootCertificatesAttributeCallback implements ChipClusters.OperationalCredentialsCluster .TrustedRootCertificatesAttributeCallback, DelegatedClusterCallback { @@ -2177,7 +3178,32 @@ public void onError(Exception ex) { } } - public static class DelegatedActiveBatteryFaultsAttributeCallback + public static class DelegatedOperationalCredentialsClusterAttributeListAttributeCallback + implements ChipClusters.OperationalCredentialsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedPowerSourceClusterActiveBatteryFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveBatteryFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2203,7 +3229,32 @@ public void onError(Exception ex) { } } - public static class DelegatedSourcesAttributeCallback + public static class DelegatedPowerSourceClusterAttributeListAttributeCallback + implements ChipClusters.PowerSourceCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedPowerSourceConfigurationClusterSourcesAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2229,6 +3280,106 @@ public void onError(Exception ex) { } } + public static class DelegatedPowerSourceConfigurationClusterAttributeListAttributeCallback + implements ChipClusters.PowerSourceConfigurationCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedPressureMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.PressureMeasurementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback + implements ChipClusters.PumpConfigurationAndControlCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRelativeHumidityMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.RelativeHumidityMeasurementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedAddSceneResponseCallback implements ChipClusters.ScenesCluster.AddSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2404,13 +3555,91 @@ public void onSuccess( } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesClusterAttributeListAttributeCallback + implements ChipClusters.ScenesCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSoftwareDiagnosticsClusterThreadMetricsAttributeCallback + implements ChipClusters.SoftwareDiagnosticsCluster.ThreadMetricsAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess( + List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSoftwareDiagnosticsClusterAttributeListAttributeCallback + implements ChipClusters.SoftwareDiagnosticsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedThreadMetricsAttributeCallback - implements ChipClusters.SoftwareDiagnosticsCluster.ThreadMetricsAttributeCallback, + public static class DelegatedSwitchClusterAttributeListAttributeCallback + implements ChipClusters.SwitchCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2420,12 +3649,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); @@ -2465,7 +3691,7 @@ public void onError(Exception error) { } } - public static class DelegatedTvChannelListAttributeCallback + public static class DelegatedTvChannelClusterTvChannelListAttributeCallback implements ChipClusters.TvChannelCluster.TvChannelListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2492,6 +3718,31 @@ public void onError(Exception ex) { } } + public static class DelegatedTvChannelClusterAttributeListAttributeCallback + implements ChipClusters.TvChannelCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedNavigateTargetResponseCallback implements ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback, DelegatedClusterCallback { @@ -2518,7 +3769,7 @@ public void onError(Exception error) { } } - public static class DelegatedTargetNavigatorListAttributeCallback + public static class DelegatedTargetNavigatorClusterTargetNavigatorListAttributeCallback implements ChipClusters.TargetNavigatorCluster.TargetNavigatorListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2547,6 +3798,56 @@ public void onError(Exception ex) { } } + public static class DelegatedTargetNavigatorClusterAttributeListAttributeCallback + implements ChipClusters.TargetNavigatorCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTemperatureMeasurementClusterAttributeListAttributeCallback + implements ChipClusters.TemperatureMeasurementCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedBooleanResponseCallback implements ChipClusters.TestClusterCluster.BooleanResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2732,7 +4033,7 @@ public void onError(Exception error) { } } - public static class DelegatedListInt8uAttributeCallback + public static class DelegatedTestClusterClusterListInt8uAttributeCallback implements ChipClusters.TestClusterCluster.ListInt8uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2758,7 +4059,7 @@ public void onError(Exception ex) { } } - public static class DelegatedListOctetStringAttributeCallback + public static class DelegatedTestClusterClusterListOctetStringAttributeCallback implements ChipClusters.TestClusterCluster.ListOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2784,7 +4085,7 @@ public void onError(Exception ex) { } } - public static class DelegatedListStructOctetStringAttributeCallback + public static class DelegatedTestClusterClusterListStructOctetStringAttributeCallback implements ChipClusters.TestClusterCluster.ListStructOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2812,7 +4113,7 @@ public void onError(Exception ex) { } } - public static class DelegatedListNullablesAndOptionalsStructAttributeCallback + public static class DelegatedTestClusterClusterListNullablesAndOptionalsStructAttributeCallback implements ChipClusters.TestClusterCluster.ListNullablesAndOptionalsStructAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2841,7 +4142,7 @@ public void onError(Exception ex) { } } - public static class DelegatedListLongOctetStringAttributeCallback + public static class DelegatedTestClusterClusterListLongOctetStringAttributeCallback implements ChipClusters.TestClusterCluster.ListLongOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2867,7 +4168,84 @@ public void onError(Exception ex) { } } - public static class DelegatedNeighborTableListAttributeCallback + public static class DelegatedTestClusterClusterAttributeListAttributeCallback + implements ChipClusters.TestClusterCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterAttributeListAttributeCallback + implements ChipClusters.ThermostatCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static + class DelegatedThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallback + implements ChipClusters.ThermostatUserInterfaceConfigurationCluster + .AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThreadNetworkDiagnosticsClusterNeighborTableListAttributeCallback implements ChipClusters.ThreadNetworkDiagnosticsCluster.NeighborTableListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2896,7 +4274,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRouteTableListAttributeCallback + public static class DelegatedThreadNetworkDiagnosticsClusterRouteTableListAttributeCallback implements ChipClusters.ThreadNetworkDiagnosticsCluster.RouteTableListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2925,7 +4303,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSecurityPolicyAttributeCallback + public static class DelegatedThreadNetworkDiagnosticsClusterSecurityPolicyAttributeCallback implements ChipClusters.ThreadNetworkDiagnosticsCluster.SecurityPolicyAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -2954,7 +4332,8 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalDatasetComponentsAttributeCallback + public static + class DelegatedThreadNetworkDiagnosticsClusterOperationalDatasetComponentsAttributeCallback implements ChipClusters.ThreadNetworkDiagnosticsCluster .OperationalDatasetComponentsAttributeCallback, DelegatedClusterCallback { @@ -2985,7 +4364,8 @@ public void onError(Exception ex) { } } - public static class DelegatedActiveNetworkFaultsListAttributeCallback + public static + class DelegatedThreadNetworkDiagnosticsClusterActiveNetworkFaultsListAttributeCallback implements ChipClusters.ThreadNetworkDiagnosticsCluster .ActiveNetworkFaultsListAttributeCallback, DelegatedClusterCallback { @@ -3012,6 +4392,106 @@ public void onError(Exception ex) { } } + public static class DelegatedThreadNetworkDiagnosticsClusterAttributeListAttributeCallback + implements ChipClusters.ThreadNetworkDiagnosticsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWakeOnLanClusterAttributeListAttributeCallback + implements ChipClusters.WakeOnLanCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWiFiNetworkDiagnosticsClusterAttributeListAttributeCallback + implements ChipClusters.WiFiNetworkDiagnosticsCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedWindowCoveringClusterAttributeListAttributeCallback + implements ChipClusters.WindowCoveringCluster.AttributeListAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public Map getClusterMap() { Map clusterMap = initializeClusterMap(); Map> commandMap = getCommandMap(); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index e07517f4a3f501..721e855c307979 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -39,7 +39,7 @@ public Map> getReadAttributeMap() { .readAclAttribute( (ChipClusters.AccessControlCluster.AclAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedAclAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedAccessControlClusterAclAttributeCallback(), readAccessControlAclCommandParams); readAccessControlInteractionInfo.put( "readAclAttribute", readAccessControlAclAttributeInteractionInfo); @@ -52,10 +52,25 @@ public Map> getReadAttributeMap() { .readExtensionAttribute( (ChipClusters.AccessControlCluster.ExtensionAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedExtensionAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedAccessControlClusterExtensionAttributeCallback(), readAccessControlExtensionCommandParams); readAccessControlInteractionInfo.put( "readExtensionAttribute", readAccessControlExtensionAttributeInteractionInfo); + Map readAccessControlAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readAccessControlAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.AccessControlCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.AccessControlCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedAccessControlClusterAttributeListAttributeCallback(), + readAccessControlAttributeListCommandParams); + readAccessControlInteractionInfo.put( + "readAttributeListAttribute", readAccessControlAttributeListAttributeInteractionInfo); Map readAccessControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readAccessControlClusterRevisionAttributeInteractionInfo = @@ -70,6 +85,20 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readAccessControlClusterRevisionAttributeInteractionInfo); readAttributeMap.put("accessControl", readAccessControlInteractionInfo); Map readAccountLoginInteractionInfo = new LinkedHashMap<>(); + Map readAccountLoginAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readAccountLoginAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.AccountLoginCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.AccountLoginCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedAccountLoginClusterAttributeListAttributeCallback(), + readAccountLoginAttributeListCommandParams); + readAccountLoginInteractionInfo.put( + "readAttributeListAttribute", readAccountLoginAttributeListAttributeInteractionInfo); Map readAccountLoginClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readAccountLoginClusterRevisionAttributeInteractionInfo = @@ -127,6 +156,24 @@ public Map> getReadAttributeMap() { readAdministratorCommissioningInteractionInfo.put( "readAdminVendorIdAttribute", readAdministratorCommissioningAdminVendorIdAttributeInteractionInfo); + Map readAdministratorCommissioningAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readAdministratorCommissioningAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.AdministratorCommissioningCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.AdministratorCommissioningCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedAdministratorCommissioningClusterAttributeListAttributeCallback(), + readAdministratorCommissioningAttributeListCommandParams); + readAdministratorCommissioningInteractionInfo.put( + "readAttributeListAttribute", + readAdministratorCommissioningAttributeListAttributeInteractionInfo); Map readAdministratorCommissioningClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readAdministratorCommissioningClusterRevisionAttributeInteractionInfo = @@ -231,6 +278,22 @@ public Map> getReadAttributeMap() { readApplicationBasicInteractionInfo.put( "readApplicationStatusAttribute", readApplicationBasicApplicationStatusAttributeInteractionInfo); + Map readApplicationBasicAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readApplicationBasicAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ApplicationBasicCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ApplicationBasicCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedApplicationBasicClusterAttributeListAttributeCallback(), + readApplicationBasicAttributeListCommandParams); + readApplicationBasicInteractionInfo.put( + "readAttributeListAttribute", readApplicationBasicAttributeListAttributeInteractionInfo); Map readApplicationBasicClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readApplicationBasicClusterRevisionAttributeInteractionInfo = @@ -257,7 +320,9 @@ public Map> getReadAttributeMap() { .ApplicationLauncherListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedApplicationLauncherListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedApplicationLauncherClusterApplicationLauncherListAttributeCallback(), readApplicationLauncherApplicationLauncherListCommandParams); readApplicationLauncherInteractionInfo.put( "readApplicationLauncherListAttribute", @@ -287,6 +352,22 @@ public Map> getReadAttributeMap() { readApplicationLauncherApplicationIdCommandParams); readApplicationLauncherInteractionInfo.put( "readApplicationIdAttribute", readApplicationLauncherApplicationIdAttributeInteractionInfo); + Map readApplicationLauncherAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readApplicationLauncherAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ApplicationLauncherCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ApplicationLauncherCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedApplicationLauncherClusterAttributeListAttributeCallback(), + readApplicationLauncherAttributeListCommandParams); + readApplicationLauncherInteractionInfo.put( + "readAttributeListAttribute", readApplicationLauncherAttributeListAttributeInteractionInfo); Map readApplicationLauncherClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readApplicationLauncherClusterRevisionAttributeInteractionInfo = @@ -311,7 +392,9 @@ public Map> getReadAttributeMap() { .readAudioOutputListAttribute( (ChipClusters.AudioOutputCluster.AudioOutputListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedAudioOutputListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedAudioOutputClusterAudioOutputListAttributeCallback(), readAudioOutputAudioOutputListCommandParams); readAudioOutputInteractionInfo.put( "readAudioOutputListAttribute", readAudioOutputAudioOutputListAttributeInteractionInfo); @@ -329,6 +412,20 @@ public Map> getReadAttributeMap() { readAudioOutputInteractionInfo.put( "readCurrentAudioOutputAttribute", readAudioOutputCurrentAudioOutputAttributeInteractionInfo); + Map readAudioOutputAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readAudioOutputAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.AudioOutputCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.AudioOutputCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedAudioOutputClusterAttributeListAttributeCallback(), + readAudioOutputAttributeListCommandParams); + readAudioOutputInteractionInfo.put( + "readAttributeListAttribute", readAudioOutputAttributeListAttributeInteractionInfo); Map readAudioOutputClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readAudioOutputClusterRevisionAttributeInteractionInfo = @@ -397,6 +494,21 @@ public Map> getReadAttributeMap() { readBarrierControlBarrierPositionCommandParams); readBarrierControlInteractionInfo.put( "readBarrierPositionAttribute", readBarrierControlBarrierPositionAttributeInteractionInfo); + Map readBarrierControlAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBarrierControlAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BarrierControlCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BarrierControlCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedBarrierControlClusterAttributeListAttributeCallback(), + readBarrierControlAttributeListCommandParams); + readBarrierControlInteractionInfo.put( + "readAttributeListAttribute", readBarrierControlAttributeListAttributeInteractionInfo); Map readBarrierControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBarrierControlClusterRevisionAttributeInteractionInfo = @@ -647,6 +759,19 @@ public Map> getReadAttributeMap() { readBasicUniqueIDCommandParams); readBasicInteractionInfo.put( "readUniqueIDAttribute", readBasicUniqueIDAttributeInteractionInfo); + Map readBasicAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBasicAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BasicCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BasicCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedBasicClusterAttributeListAttributeCallback(), + readBasicAttributeListCommandParams); + readBasicInteractionInfo.put( + "readAttributeListAttribute", readBasicAttributeListAttributeInteractionInfo); Map readBasicClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBasicClusterRevisionAttributeInteractionInfo = @@ -697,6 +822,22 @@ public Map> getReadAttributeMap() { readBinaryInputBasicStatusFlagsCommandParams); readBinaryInputBasicInteractionInfo.put( "readStatusFlagsAttribute", readBinaryInputBasicStatusFlagsAttributeInteractionInfo); + Map readBinaryInputBasicAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBinaryInputBasicAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BinaryInputBasicCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedBinaryInputBasicClusterAttributeListAttributeCallback(), + readBinaryInputBasicAttributeListCommandParams); + readBinaryInputBasicInteractionInfo.put( + "readAttributeListAttribute", readBinaryInputBasicAttributeListAttributeInteractionInfo); Map readBinaryInputBasicClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBinaryInputBasicClusterRevisionAttributeInteractionInfo = @@ -712,6 +853,19 @@ public Map> getReadAttributeMap() { readBinaryInputBasicClusterRevisionAttributeInteractionInfo); readAttributeMap.put("binaryInputBasic", readBinaryInputBasicInteractionInfo); Map readBindingInteractionInfo = new LinkedHashMap<>(); + Map readBindingAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBindingAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BindingCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BindingCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedBindingClusterAttributeListAttributeCallback(), + readBindingAttributeListCommandParams); + readBindingInteractionInfo.put( + "readAttributeListAttribute", readBindingAttributeListAttributeInteractionInfo); Map readBindingClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBindingClusterRevisionAttributeInteractionInfo = @@ -738,6 +892,20 @@ public Map> getReadAttributeMap() { readBooleanStateStateValueCommandParams); readBooleanStateInteractionInfo.put( "readStateValueAttribute", readBooleanStateStateValueAttributeInteractionInfo); + Map readBooleanStateAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBooleanStateAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanStateCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BooleanStateCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedBooleanStateClusterAttributeListAttributeCallback(), + readBooleanStateAttributeListCommandParams); + readBooleanStateInteractionInfo.put( + "readAttributeListAttribute", readBooleanStateAttributeListAttributeInteractionInfo); Map readBooleanStateClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBooleanStateClusterRevisionAttributeInteractionInfo = @@ -761,7 +929,8 @@ public Map> getReadAttributeMap() { .readActionListAttribute( (ChipClusters.BridgedActionsCluster.ActionListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActionListAttributeCallback(), + () -> + new ClusterInfoMapping.DelegatedBridgedActionsClusterActionListAttributeCallback(), readBridgedActionsActionListCommandParams); readBridgedActionsInteractionInfo.put( "readActionListAttribute", readBridgedActionsActionListAttributeInteractionInfo); @@ -774,7 +943,9 @@ public Map> getReadAttributeMap() { .readEndpointListAttribute( (ChipClusters.BridgedActionsCluster.EndpointListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedEndpointListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedBridgedActionsClusterEndpointListAttributeCallback(), readBridgedActionsEndpointListCommandParams); readBridgedActionsInteractionInfo.put( "readEndpointListAttribute", readBridgedActionsEndpointListAttributeInteractionInfo); @@ -790,6 +961,21 @@ public Map> getReadAttributeMap() { readBridgedActionsSetupUrlCommandParams); readBridgedActionsInteractionInfo.put( "readSetupUrlAttribute", readBridgedActionsSetupUrlAttributeInteractionInfo); + Map readBridgedActionsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBridgedActionsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BridgedActionsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BridgedActionsCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedBridgedActionsClusterAttributeListAttributeCallback(), + readBridgedActionsAttributeListCommandParams); + readBridgedActionsInteractionInfo.put( + "readAttributeListAttribute", readBridgedActionsAttributeListAttributeInteractionInfo); Map readBridgedActionsClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBridgedActionsClusterRevisionAttributeInteractionInfo = @@ -804,6 +990,22 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readBridgedActionsClusterRevisionAttributeInteractionInfo); readAttributeMap.put("bridgedActions", readBridgedActionsInteractionInfo); Map readBridgedDeviceBasicInteractionInfo = new LinkedHashMap<>(); + Map readBridgedDeviceBasicAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readBridgedDeviceBasicAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BridgedDeviceBasicCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.BridgedDeviceBasicCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedBridgedDeviceBasicClusterAttributeListAttributeCallback(), + readBridgedDeviceBasicAttributeListCommandParams); + readBridgedDeviceBasicInteractionInfo.put( + "readAttributeListAttribute", readBridgedDeviceBasicAttributeListAttributeInteractionInfo); Map readBridgedDeviceBasicClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readBridgedDeviceBasicClusterRevisionAttributeInteractionInfo = @@ -1479,6 +1681,20 @@ public Map> getReadAttributeMap() { readColorControlInteractionInfo.put( "readStartUpColorTemperatureMiredsAttribute", readColorControlStartUpColorTemperatureMiredsAttributeInteractionInfo); + Map readColorControlAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readColorControlAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ColorControlCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedColorControlClusterAttributeListAttributeCallback(), + readColorControlAttributeListCommandParams); + readColorControlInteractionInfo.put( + "readAttributeListAttribute", readColorControlAttributeListAttributeInteractionInfo); Map readColorControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readColorControlClusterRevisionAttributeInteractionInfo = @@ -1503,7 +1719,9 @@ public Map> getReadAttributeMap() { (ChipClusters.ContentLauncherCluster.AcceptsHeaderListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedAcceptsHeaderListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedContentLauncherClusterAcceptsHeaderListAttributeCallback(), readContentLauncherAcceptsHeaderListCommandParams); readContentLauncherInteractionInfo.put( "readAcceptsHeaderListAttribute", @@ -1518,11 +1736,29 @@ public Map> getReadAttributeMap() { (ChipClusters.ContentLauncherCluster.SupportedStreamingTypesAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedSupportedStreamingTypesAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedContentLauncherClusterSupportedStreamingTypesAttributeCallback(), readContentLauncherSupportedStreamingTypesCommandParams); readContentLauncherInteractionInfo.put( "readSupportedStreamingTypesAttribute", readContentLauncherSupportedStreamingTypesAttributeInteractionInfo); + Map readContentLauncherAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readContentLauncherAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentLauncherCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ContentLauncherCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedContentLauncherClusterAttributeListAttributeCallback(), + readContentLauncherAttributeListCommandParams); + readContentLauncherInteractionInfo.put( + "readAttributeListAttribute", readContentLauncherAttributeListAttributeInteractionInfo); Map readContentLauncherClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readContentLauncherClusterRevisionAttributeInteractionInfo = @@ -1546,7 +1782,7 @@ public Map> getReadAttributeMap() { .readDeviceListAttribute( (ChipClusters.DescriptorCluster.DeviceListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedDeviceListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedDescriptorClusterDeviceListAttributeCallback(), readDescriptorDeviceListCommandParams); readDescriptorInteractionInfo.put( "readDeviceListAttribute", readDescriptorDeviceListAttributeInteractionInfo); @@ -1559,7 +1795,7 @@ public Map> getReadAttributeMap() { .readServerListAttribute( (ChipClusters.DescriptorCluster.ServerListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedServerListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedDescriptorClusterServerListAttributeCallback(), readDescriptorServerListCommandParams); readDescriptorInteractionInfo.put( "readServerListAttribute", readDescriptorServerListAttributeInteractionInfo); @@ -1572,7 +1808,7 @@ public Map> getReadAttributeMap() { .readClientListAttribute( (ChipClusters.DescriptorCluster.ClientListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedClientListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedDescriptorClusterClientListAttributeCallback(), readDescriptorClientListCommandParams); readDescriptorInteractionInfo.put( "readClientListAttribute", readDescriptorClientListAttributeInteractionInfo); @@ -1585,10 +1821,23 @@ public Map> getReadAttributeMap() { .readPartsListAttribute( (ChipClusters.DescriptorCluster.PartsListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedPartsListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedDescriptorClusterPartsListAttributeCallback(), readDescriptorPartsListCommandParams); readDescriptorInteractionInfo.put( "readPartsListAttribute", readDescriptorPartsListAttributeInteractionInfo); + Map readDescriptorAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readDescriptorAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DescriptorCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.DescriptorCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedDescriptorClusterAttributeListAttributeCallback(), + readDescriptorAttributeListCommandParams); + readDescriptorInteractionInfo.put( + "readAttributeListAttribute", readDescriptorAttributeListAttributeInteractionInfo); Map readDescriptorClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readDescriptorClusterRevisionAttributeInteractionInfo = @@ -1603,6 +1852,21 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readDescriptorClusterRevisionAttributeInteractionInfo); readAttributeMap.put("descriptor", readDescriptorInteractionInfo); Map readDiagnosticLogsInteractionInfo = new LinkedHashMap<>(); + Map readDiagnosticLogsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readDiagnosticLogsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DiagnosticLogsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.DiagnosticLogsCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedDiagnosticLogsClusterAttributeListAttributeCallback(), + readDiagnosticLogsAttributeListCommandParams); + readDiagnosticLogsInteractionInfo.put( + "readAttributeListAttribute", readDiagnosticLogsAttributeListAttributeInteractionInfo); readAttributeMap.put("diagnosticLogs", readDiagnosticLogsInteractionInfo); Map readDoorLockInteractionInfo = new LinkedHashMap<>(); Map readDoorLockActuatorEnabledCommandParams = @@ -1617,6 +1881,19 @@ public Map> getReadAttributeMap() { readDoorLockActuatorEnabledCommandParams); readDoorLockInteractionInfo.put( "readActuatorEnabledAttribute", readDoorLockActuatorEnabledAttributeInteractionInfo); + Map readDoorLockAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readDoorLockAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.DoorLockCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedDoorLockClusterAttributeListAttributeCallback(), + readDoorLockAttributeListCommandParams); + readDoorLockInteractionInfo.put( + "readAttributeListAttribute", readDoorLockAttributeListAttributeInteractionInfo); Map readDoorLockClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readDoorLockClusterRevisionAttributeInteractionInfo = @@ -1771,6 +2048,23 @@ public Map> getReadAttributeMap() { readElectricalMeasurementInteractionInfo.put( "readActivePowerMaxAttribute", readElectricalMeasurementActivePowerMaxAttributeInteractionInfo); + Map readElectricalMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readElectricalMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ElectricalMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedElectricalMeasurementClusterAttributeListAttributeCallback(), + readElectricalMeasurementAttributeListCommandParams); + readElectricalMeasurementInteractionInfo.put( + "readAttributeListAttribute", + readElectricalMeasurementAttributeListAttributeInteractionInfo); Map readElectricalMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readElectricalMeasurementClusterRevisionAttributeInteractionInfo = @@ -1903,6 +2197,24 @@ public Map> getReadAttributeMap() { readEthernetNetworkDiagnosticsInteractionInfo.put( "readTimeSinceResetAttribute", readEthernetNetworkDiagnosticsTimeSinceResetAttributeInteractionInfo); + Map readEthernetNetworkDiagnosticsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readEthernetNetworkDiagnosticsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.EthernetNetworkDiagnosticsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.EthernetNetworkDiagnosticsCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedEthernetNetworkDiagnosticsClusterAttributeListAttributeCallback(), + readEthernetNetworkDiagnosticsAttributeListCommandParams); + readEthernetNetworkDiagnosticsInteractionInfo.put( + "readAttributeListAttribute", + readEthernetNetworkDiagnosticsAttributeListAttributeInteractionInfo); Map readEthernetNetworkDiagnosticsFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readEthernetNetworkDiagnosticsFeatureMapAttributeInteractionInfo = @@ -1941,10 +2253,23 @@ public Map> getReadAttributeMap() { .readLabelListAttribute( (ChipClusters.FixedLabelCluster.LabelListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedLabelListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedFixedLabelClusterLabelListAttributeCallback(), readFixedLabelLabelListCommandParams); readFixedLabelInteractionInfo.put( "readLabelListAttribute", readFixedLabelLabelListAttributeInteractionInfo); + Map readFixedLabelAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readFixedLabelAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FixedLabelCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.FixedLabelCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedFixedLabelClusterAttributeListAttributeCallback(), + readFixedLabelAttributeListCommandParams); + readFixedLabelInteractionInfo.put( + "readAttributeListAttribute", readFixedLabelAttributeListAttributeInteractionInfo); Map readFixedLabelClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readFixedLabelClusterRevisionAttributeInteractionInfo = @@ -2009,6 +2334,22 @@ public Map> getReadAttributeMap() { readFlowMeasurementToleranceCommandParams); readFlowMeasurementInteractionInfo.put( "readToleranceAttribute", readFlowMeasurementToleranceAttributeInteractionInfo); + Map readFlowMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readFlowMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.FlowMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.FlowMeasurementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedFlowMeasurementClusterAttributeListAttributeCallback(), + readFlowMeasurementAttributeListCommandParams); + readFlowMeasurementInteractionInfo.put( + "readAttributeListAttribute", readFlowMeasurementAttributeListAttributeInteractionInfo); Map readFlowMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readFlowMeasurementClusterRevisionAttributeInteractionInfo = @@ -2047,7 +2388,9 @@ public Map> getReadAttributeMap() { .BasicCommissioningInfoListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedBasicCommissioningInfoListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGeneralCommissioningClusterBasicCommissioningInfoListAttributeCallback(), readGeneralCommissioningBasicCommissioningInfoListCommandParams); readGeneralCommissioningInteractionInfo.put( "readBasicCommissioningInfoListAttribute", @@ -2079,6 +2422,23 @@ public Map> getReadAttributeMap() { readGeneralCommissioningInteractionInfo.put( "readLocationCapabilityAttribute", readGeneralCommissioningLocationCapabilityAttributeInteractionInfo); + Map readGeneralCommissioningAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readGeneralCommissioningAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GeneralCommissioningCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.GeneralCommissioningCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedGeneralCommissioningClusterAttributeListAttributeCallback(), + readGeneralCommissioningAttributeListCommandParams); + readGeneralCommissioningInteractionInfo.put( + "readAttributeListAttribute", + readGeneralCommissioningAttributeListAttributeInteractionInfo); Map readGeneralCommissioningClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readGeneralCommissioningClusterRevisionAttributeInteractionInfo = @@ -2104,7 +2464,9 @@ public Map> getReadAttributeMap() { (ChipClusters.GeneralDiagnosticsCluster.NetworkInterfacesAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedNetworkInterfacesAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGeneralDiagnosticsClusterNetworkInterfacesAttributeCallback(), readGeneralDiagnosticsNetworkInterfacesCommandParams); readGeneralDiagnosticsInteractionInfo.put( "readNetworkInterfacesAttribute", @@ -2169,7 +2531,9 @@ public Map> getReadAttributeMap() { (ChipClusters.GeneralDiagnosticsCluster.ActiveHardwareFaultsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActiveHardwareFaultsAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGeneralDiagnosticsClusterActiveHardwareFaultsAttributeCallback(), readGeneralDiagnosticsActiveHardwareFaultsCommandParams); readGeneralDiagnosticsInteractionInfo.put( "readActiveHardwareFaultsAttribute", @@ -2184,7 +2548,9 @@ public Map> getReadAttributeMap() { (ChipClusters.GeneralDiagnosticsCluster.ActiveRadioFaultsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActiveRadioFaultsAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGeneralDiagnosticsClusterActiveRadioFaultsAttributeCallback(), readGeneralDiagnosticsActiveRadioFaultsCommandParams); readGeneralDiagnosticsInteractionInfo.put( "readActiveRadioFaultsAttribute", @@ -2199,11 +2565,29 @@ public Map> getReadAttributeMap() { (ChipClusters.GeneralDiagnosticsCluster.ActiveNetworkFaultsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActiveNetworkFaultsAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGeneralDiagnosticsClusterActiveNetworkFaultsAttributeCallback(), readGeneralDiagnosticsActiveNetworkFaultsCommandParams); readGeneralDiagnosticsInteractionInfo.put( "readActiveNetworkFaultsAttribute", readGeneralDiagnosticsActiveNetworkFaultsAttributeInteractionInfo); + Map readGeneralDiagnosticsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readGeneralDiagnosticsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GeneralDiagnosticsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.GeneralDiagnosticsCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedGeneralDiagnosticsClusterAttributeListAttributeCallback(), + readGeneralDiagnosticsAttributeListCommandParams); + readGeneralDiagnosticsInteractionInfo.put( + "readAttributeListAttribute", readGeneralDiagnosticsAttributeListAttributeInteractionInfo); Map readGeneralDiagnosticsClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readGeneralDiagnosticsClusterRevisionAttributeInteractionInfo = @@ -2228,7 +2612,8 @@ public Map> getReadAttributeMap() { .readGroupsAttribute( (ChipClusters.GroupKeyManagementCluster.GroupsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedGroupsAttributeCallback(), + () -> + new ClusterInfoMapping.DelegatedGroupKeyManagementClusterGroupsAttributeCallback(), readGroupKeyManagementGroupsCommandParams); readGroupKeyManagementInteractionInfo.put( "readGroupsAttribute", readGroupKeyManagementGroupsAttributeInteractionInfo); @@ -2241,10 +2626,28 @@ public Map> getReadAttributeMap() { .readGroupKeysAttribute( (ChipClusters.GroupKeyManagementCluster.GroupKeysAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedGroupKeysAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedGroupKeyManagementClusterGroupKeysAttributeCallback(), readGroupKeyManagementGroupKeysCommandParams); readGroupKeyManagementInteractionInfo.put( "readGroupKeysAttribute", readGroupKeyManagementGroupKeysAttributeInteractionInfo); + Map readGroupKeyManagementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readGroupKeyManagementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GroupKeyManagementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.GroupKeyManagementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedGroupKeyManagementClusterAttributeListAttributeCallback(), + readGroupKeyManagementAttributeListCommandParams); + readGroupKeyManagementInteractionInfo.put( + "readAttributeListAttribute", readGroupKeyManagementAttributeListAttributeInteractionInfo); Map readGroupKeyManagementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readGroupKeyManagementClusterRevisionAttributeInteractionInfo = @@ -2272,6 +2675,19 @@ public Map> getReadAttributeMap() { readGroupsNameSupportCommandParams); readGroupsInteractionInfo.put( "readNameSupportAttribute", readGroupsNameSupportAttributeInteractionInfo); + Map readGroupsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readGroupsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GroupsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.GroupsCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedGroupsClusterAttributeListAttributeCallback(), + readGroupsAttributeListCommandParams); + readGroupsInteractionInfo.put( + "readAttributeListAttribute", readGroupsAttributeListAttributeInteractionInfo); Map readGroupsClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readGroupsClusterRevisionAttributeInteractionInfo = @@ -2310,6 +2726,19 @@ public Map> getReadAttributeMap() { readIdentifyIdentifyTypeCommandParams); readIdentifyInteractionInfo.put( "readIdentifyTypeAttribute", readIdentifyIdentifyTypeAttributeInteractionInfo); + Map readIdentifyAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readIdentifyAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IdentifyCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.IdentifyCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIdentifyClusterAttributeListAttributeCallback(), + readIdentifyAttributeListCommandParams); + readIdentifyInteractionInfo.put( + "readAttributeListAttribute", readIdentifyAttributeListAttributeInteractionInfo); Map readIdentifyClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readIdentifyClusterRevisionAttributeInteractionInfo = @@ -2394,6 +2823,23 @@ public Map> getReadAttributeMap() { readIlluminanceMeasurementInteractionInfo.put( "readLightSensorTypeAttribute", readIlluminanceMeasurementLightSensorTypeAttributeInteractionInfo); + Map readIlluminanceMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readIlluminanceMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.IlluminanceMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.IlluminanceMeasurementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedIlluminanceMeasurementClusterAttributeListAttributeCallback(), + readIlluminanceMeasurementAttributeListCommandParams); + readIlluminanceMeasurementInteractionInfo.put( + "readAttributeListAttribute", + readIlluminanceMeasurementAttributeListAttributeInteractionInfo); Map readIlluminanceMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readIlluminanceMeasurementClusterRevisionAttributeInteractionInfo = @@ -2409,6 +2855,20 @@ public Map> getReadAttributeMap() { readIlluminanceMeasurementClusterRevisionAttributeInteractionInfo); readAttributeMap.put("illuminanceMeasurement", readIlluminanceMeasurementInteractionInfo); Map readKeypadInputInteractionInfo = new LinkedHashMap<>(); + Map readKeypadInputAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readKeypadInputAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.KeypadInputCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.KeypadInputCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedKeypadInputClusterAttributeListAttributeCallback(), + readKeypadInputAttributeListCommandParams); + readKeypadInputInteractionInfo.put( + "readAttributeListAttribute", readKeypadInputAttributeListAttributeInteractionInfo); Map readKeypadInputClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readKeypadInputClusterRevisionAttributeInteractionInfo = @@ -2600,6 +3060,20 @@ public Map> getReadAttributeMap() { readLevelControlInteractionInfo.put( "readStartUpCurrentLevelAttribute", readLevelControlStartUpCurrentLevelAttributeInteractionInfo); + Map readLevelControlAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readLevelControlAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LevelControlCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.LevelControlCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedLevelControlClusterAttributeListAttributeCallback(), + readLevelControlAttributeListCommandParams); + readLevelControlInteractionInfo.put( + "readAttributeListAttribute", readLevelControlAttributeListAttributeInteractionInfo); Map readLevelControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readLevelControlClusterRevisionAttributeInteractionInfo = @@ -2614,6 +3088,19 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readLevelControlClusterRevisionAttributeInteractionInfo); readAttributeMap.put("levelControl", readLevelControlInteractionInfo); Map readLowPowerInteractionInfo = new LinkedHashMap<>(); + Map readLowPowerAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readLowPowerAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LowPowerCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.LowPowerCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLowPowerClusterAttributeListAttributeCallback(), + readLowPowerAttributeListCommandParams); + readLowPowerInteractionInfo.put( + "readAttributeListAttribute", readLowPowerAttributeListAttributeInteractionInfo); Map readLowPowerClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readLowPowerClusterRevisionAttributeInteractionInfo = @@ -2637,7 +3124,8 @@ public Map> getReadAttributeMap() { .readMediaInputListAttribute( (ChipClusters.MediaInputCluster.MediaInputListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedMediaInputListAttributeCallback(), + () -> + new ClusterInfoMapping.DelegatedMediaInputClusterMediaInputListAttributeCallback(), readMediaInputMediaInputListCommandParams); readMediaInputInteractionInfo.put( "readMediaInputListAttribute", readMediaInputMediaInputListAttributeInteractionInfo); @@ -2653,6 +3141,19 @@ public Map> getReadAttributeMap() { readMediaInputCurrentMediaInputCommandParams); readMediaInputInteractionInfo.put( "readCurrentMediaInputAttribute", readMediaInputCurrentMediaInputAttributeInteractionInfo); + Map readMediaInputAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readMediaInputAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaInputCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.MediaInputCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedMediaInputClusterAttributeListAttributeCallback(), + readMediaInputAttributeListCommandParams); + readMediaInputInteractionInfo.put( + "readAttributeListAttribute", readMediaInputAttributeListAttributeInteractionInfo); Map readMediaInputClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readMediaInputClusterRevisionAttributeInteractionInfo = @@ -2764,6 +3265,21 @@ public Map> getReadAttributeMap() { readMediaPlaybackSeekRangeStartCommandParams); readMediaPlaybackInteractionInfo.put( "readSeekRangeStartAttribute", readMediaPlaybackSeekRangeStartAttributeInteractionInfo); + Map readMediaPlaybackAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readMediaPlaybackAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.MediaPlaybackCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedMediaPlaybackClusterAttributeListAttributeCallback(), + readMediaPlaybackAttributeListCommandParams); + readMediaPlaybackInteractionInfo.put( + "readAttributeListAttribute", readMediaPlaybackAttributeListAttributeInteractionInfo); Map readMediaPlaybackClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readMediaPlaybackClusterRevisionAttributeInteractionInfo = @@ -2799,7 +3315,8 @@ public Map> getReadAttributeMap() { .readSupportedModesAttribute( (ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedSupportedModesAttributeCallback(), + () -> + new ClusterInfoMapping.DelegatedModeSelectClusterSupportedModesAttributeCallback(), readModeSelectSupportedModesCommandParams); readModeSelectInteractionInfo.put( "readSupportedModesAttribute", readModeSelectSupportedModesAttributeInteractionInfo); @@ -2839,6 +3356,19 @@ public Map> getReadAttributeMap() { readModeSelectDescriptionCommandParams); readModeSelectInteractionInfo.put( "readDescriptionAttribute", readModeSelectDescriptionAttributeInteractionInfo); + Map readModeSelectAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readModeSelectAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ModeSelectCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ModeSelectCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedModeSelectClusterAttributeListAttributeCallback(), + readModeSelectAttributeListCommandParams); + readModeSelectInteractionInfo.put( + "readAttributeListAttribute", readModeSelectAttributeListAttributeInteractionInfo); Map readModeSelectClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readModeSelectClusterRevisionAttributeInteractionInfo = @@ -2853,6 +3383,23 @@ public Map> getReadAttributeMap() { "readClusterRevisionAttribute", readModeSelectClusterRevisionAttributeInteractionInfo); readAttributeMap.put("modeSelect", readModeSelectInteractionInfo); Map readNetworkCommissioningInteractionInfo = new LinkedHashMap<>(); + Map readNetworkCommissioningAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readNetworkCommissioningAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.NetworkCommissioningCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.NetworkCommissioningCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedNetworkCommissioningClusterAttributeListAttributeCallback(), + readNetworkCommissioningAttributeListCommandParams); + readNetworkCommissioningInteractionInfo.put( + "readAttributeListAttribute", + readNetworkCommissioningAttributeListAttributeInteractionInfo); Map readNetworkCommissioningFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readNetworkCommissioningFeatureMapAttributeInteractionInfo = @@ -2881,6 +3428,23 @@ public Map> getReadAttributeMap() { readAttributeMap.put("networkCommissioning", readNetworkCommissioningInteractionInfo); Map readOtaSoftwareUpdateProviderInteractionInfo = new LinkedHashMap<>(); + Map readOtaSoftwareUpdateProviderAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOtaSoftwareUpdateProviderAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OtaSoftwareUpdateProviderCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OtaSoftwareUpdateProviderCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOtaSoftwareUpdateProviderClusterAttributeListAttributeCallback(), + readOtaSoftwareUpdateProviderAttributeListCommandParams); + readOtaSoftwareUpdateProviderInteractionInfo.put( + "readAttributeListAttribute", + readOtaSoftwareUpdateProviderAttributeListAttributeInteractionInfo); Map readOtaSoftwareUpdateProviderClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readOtaSoftwareUpdateProviderClusterRevisionAttributeInteractionInfo = @@ -2925,6 +3489,24 @@ public Map> getReadAttributeMap() { readOtaSoftwareUpdateRequestorInteractionInfo.put( "readUpdatePossibleAttribute", readOtaSoftwareUpdateRequestorUpdatePossibleAttributeInteractionInfo); + Map readOtaSoftwareUpdateRequestorAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOtaSoftwareUpdateRequestorAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OtaSoftwareUpdateRequestorCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OtaSoftwareUpdateRequestorCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallback(), + readOtaSoftwareUpdateRequestorAttributeListCommandParams); + readOtaSoftwareUpdateRequestorInteractionInfo.put( + "readAttributeListAttribute", + readOtaSoftwareUpdateRequestorAttributeListAttributeInteractionInfo); Map readOtaSoftwareUpdateRequestorClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readOtaSoftwareUpdateRequestorClusterRevisionAttributeInteractionInfo = @@ -2981,6 +3563,22 @@ public Map> getReadAttributeMap() { readOccupancySensingInteractionInfo.put( "readOccupancySensorTypeBitmapAttribute", readOccupancySensingOccupancySensorTypeBitmapAttributeInteractionInfo); + Map readOccupancySensingAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOccupancySensingAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OccupancySensingCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OccupancySensingCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOccupancySensingClusterAttributeListAttributeCallback(), + readOccupancySensingAttributeListCommandParams); + readOccupancySensingInteractionInfo.put( + "readAttributeListAttribute", readOccupancySensingAttributeListAttributeInteractionInfo); Map readOccupancySensingClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readOccupancySensingClusterRevisionAttributeInteractionInfo = @@ -3055,6 +3653,19 @@ public Map> getReadAttributeMap() { readOnOffStartUpOnOffCommandParams); readOnOffInteractionInfo.put( "readStartUpOnOffAttribute", readOnOffStartUpOnOffAttributeInteractionInfo); + Map readOnOffAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOnOffAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OnOffCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OnOffCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedOnOffClusterAttributeListAttributeCallback(), + readOnOffAttributeListCommandParams); + readOnOffInteractionInfo.put( + "readAttributeListAttribute", readOnOffAttributeListAttributeInteractionInfo); Map readOnOffFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readOnOffFeatureMapAttributeInteractionInfo = @@ -3107,6 +3718,23 @@ public Map> getReadAttributeMap() { readOnOffSwitchConfigurationInteractionInfo.put( "readSwitchActionsAttribute", readOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo); + Map readOnOffSwitchConfigurationAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOnOffSwitchConfigurationAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OnOffSwitchConfigurationCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback(), + readOnOffSwitchConfigurationAttributeListCommandParams); + readOnOffSwitchConfigurationInteractionInfo.put( + "readAttributeListAttribute", + readOnOffSwitchConfigurationAttributeListAttributeInteractionInfo); Map readOnOffSwitchConfigurationClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readOnOffSwitchConfigurationClusterRevisionAttributeInteractionInfo = @@ -3132,7 +3760,9 @@ public Map> getReadAttributeMap() { (ChipClusters.OperationalCredentialsCluster.FabricsListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedFabricsListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedOperationalCredentialsClusterFabricsListAttributeCallback(), readOperationalCredentialsFabricsListCommandParams); readOperationalCredentialsInteractionInfo.put( "readFabricsListAttribute", readOperationalCredentialsFabricsListAttributeInteractionInfo); @@ -3175,7 +3805,9 @@ public Map> getReadAttributeMap() { .TrustedRootCertificatesAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedTrustedRootCertificatesAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedOperationalCredentialsClusterTrustedRootCertificatesAttributeCallback(), readOperationalCredentialsTrustedRootCertificatesCommandParams); readOperationalCredentialsInteractionInfo.put( "readTrustedRootCertificatesAttribute", @@ -3196,6 +3828,23 @@ public Map> getReadAttributeMap() { readOperationalCredentialsInteractionInfo.put( "readCurrentFabricIndexAttribute", readOperationalCredentialsCurrentFabricIndexAttributeInteractionInfo); + Map readOperationalCredentialsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readOperationalCredentialsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OperationalCredentialsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.OperationalCredentialsCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOperationalCredentialsClusterAttributeListAttributeCallback(), + readOperationalCredentialsAttributeListCommandParams); + readOperationalCredentialsInteractionInfo.put( + "readAttributeListAttribute", + readOperationalCredentialsAttributeListAttributeInteractionInfo); Map readOperationalCredentialsClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readOperationalCredentialsClusterRevisionAttributeInteractionInfo = @@ -3310,7 +3959,9 @@ public Map> getReadAttributeMap() { (ChipClusters.PowerSourceCluster.ActiveBatteryFaultsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActiveBatteryFaultsAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedPowerSourceClusterActiveBatteryFaultsAttributeCallback(), readPowerSourceActiveBatteryFaultsCommandParams); readPowerSourceInteractionInfo.put( "readActiveBatteryFaultsAttribute", @@ -3329,6 +3980,20 @@ public Map> getReadAttributeMap() { readPowerSourceInteractionInfo.put( "readBatteryChargeStateAttribute", readPowerSourceBatteryChargeStateAttributeInteractionInfo); + Map readPowerSourceAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readPowerSourceAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PowerSourceCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.PowerSourceCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedPowerSourceClusterAttributeListAttributeCallback(), + readPowerSourceAttributeListCommandParams); + readPowerSourceInteractionInfo.put( + "readAttributeListAttribute", readPowerSourceAttributeListAttributeInteractionInfo); Map readPowerSourceFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readPowerSourceFeatureMapAttributeInteractionInfo = @@ -3366,10 +4031,29 @@ public Map> getReadAttributeMap() { (ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedSourcesAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedPowerSourceConfigurationClusterSourcesAttributeCallback(), readPowerSourceConfigurationSourcesCommandParams); readPowerSourceConfigurationInteractionInfo.put( "readSourcesAttribute", readPowerSourceConfigurationSourcesAttributeInteractionInfo); + Map readPowerSourceConfigurationAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readPowerSourceConfigurationAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PowerSourceConfigurationCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.PowerSourceConfigurationCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedPowerSourceConfigurationClusterAttributeListAttributeCallback(), + readPowerSourceConfigurationAttributeListCommandParams); + readPowerSourceConfigurationInteractionInfo.put( + "readAttributeListAttribute", + readPowerSourceConfigurationAttributeListAttributeInteractionInfo); Map readPowerSourceConfigurationClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readPowerSourceConfigurationClusterRevisionAttributeInteractionInfo = @@ -3423,6 +4107,22 @@ public Map> getReadAttributeMap() { readPressureMeasurementInteractionInfo.put( "readMaxMeasuredValueAttribute", readPressureMeasurementMaxMeasuredValueAttributeInteractionInfo); + Map readPressureMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.PressureMeasurementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedPressureMeasurementClusterAttributeListAttributeCallback(), + readPressureMeasurementAttributeListCommandParams); + readPressureMeasurementInteractionInfo.put( + "readAttributeListAttribute", readPressureMeasurementAttributeListAttributeInteractionInfo); Map readPressureMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readPressureMeasurementClusterRevisionAttributeInteractionInfo = @@ -3757,6 +4457,24 @@ public Map> getReadAttributeMap() { readPumpConfigurationAndControlAlarmMaskCommandParams); readPumpConfigurationAndControlInteractionInfo.put( "readAlarmMaskAttribute", readPumpConfigurationAndControlAlarmMaskAttributeInteractionInfo); + Map readPumpConfigurationAndControlAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readPumpConfigurationAndControlAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PumpConfigurationAndControlCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback(), + readPumpConfigurationAndControlAttributeListCommandParams); + readPumpConfigurationAndControlInteractionInfo.put( + "readAttributeListAttribute", + readPumpConfigurationAndControlAttributeListAttributeInteractionInfo); Map readPumpConfigurationAndControlFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readPumpConfigurationAndControlFeatureMapAttributeInteractionInfo = @@ -3838,6 +4556,24 @@ public Map> getReadAttributeMap() { readRelativeHumidityMeasurementToleranceCommandParams); readRelativeHumidityMeasurementInteractionInfo.put( "readToleranceAttribute", readRelativeHumidityMeasurementToleranceAttributeInteractionInfo); + Map readRelativeHumidityMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readRelativeHumidityMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.RelativeHumidityMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.RelativeHumidityMeasurementCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedRelativeHumidityMeasurementClusterAttributeListAttributeCallback(), + readRelativeHumidityMeasurementAttributeListCommandParams); + readRelativeHumidityMeasurementInteractionInfo.put( + "readAttributeListAttribute", + readRelativeHumidityMeasurementAttributeListAttributeInteractionInfo); Map readRelativeHumidityMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readRelativeHumidityMeasurementClusterRevisionAttributeInteractionInfo = @@ -3914,6 +4650,19 @@ public Map> getReadAttributeMap() { readScenesNameSupportCommandParams); readScenesInteractionInfo.put( "readNameSupportAttribute", readScenesNameSupportAttributeInteractionInfo); + Map readScenesAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readScenesAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ScenesCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedScenesClusterAttributeListAttributeCallback(), + readScenesAttributeListCommandParams); + readScenesInteractionInfo.put( + "readAttributeListAttribute", readScenesAttributeListAttributeInteractionInfo); Map readScenesClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readScenesClusterRevisionAttributeInteractionInfo = @@ -3938,7 +4687,9 @@ public Map> getReadAttributeMap() { (ChipClusters.SoftwareDiagnosticsCluster.ThreadMetricsAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedThreadMetricsAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedSoftwareDiagnosticsClusterThreadMetricsAttributeCallback(), readSoftwareDiagnosticsThreadMetricsCommandParams); readSoftwareDiagnosticsInteractionInfo.put( "readThreadMetricsAttribute", readSoftwareDiagnosticsThreadMetricsAttributeInteractionInfo); @@ -3982,6 +4733,22 @@ public Map> getReadAttributeMap() { readSoftwareDiagnosticsInteractionInfo.put( "readCurrentHeapHighWatermarkAttribute", readSoftwareDiagnosticsCurrentHeapHighWatermarkAttributeInteractionInfo); + Map readSoftwareDiagnosticsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readSoftwareDiagnosticsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.SoftwareDiagnosticsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.SoftwareDiagnosticsCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedSoftwareDiagnosticsClusterAttributeListAttributeCallback(), + readSoftwareDiagnosticsAttributeListCommandParams); + readSoftwareDiagnosticsInteractionInfo.put( + "readAttributeListAttribute", readSoftwareDiagnosticsAttributeListAttributeInteractionInfo); Map readSoftwareDiagnosticsFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readSoftwareDiagnosticsFeatureMapAttributeInteractionInfo = @@ -4045,6 +4812,19 @@ public Map> getReadAttributeMap() { readSwitchMultiPressMaxCommandParams); readSwitchInteractionInfo.put( "readMultiPressMaxAttribute", readSwitchMultiPressMaxAttributeInteractionInfo); + Map readSwitchAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readSwitchAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.SwitchCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.SwitchCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedSwitchClusterAttributeListAttributeCallback(), + readSwitchAttributeListCommandParams); + readSwitchInteractionInfo.put( + "readAttributeListAttribute", readSwitchAttributeListAttributeInteractionInfo); Map readSwitchFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readSwitchFeatureMapAttributeInteractionInfo = @@ -4080,7 +4860,7 @@ public Map> getReadAttributeMap() { .readTvChannelListAttribute( (ChipClusters.TvChannelCluster.TvChannelListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedTvChannelListAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedTvChannelClusterTvChannelListAttributeCallback(), readTvChannelTvChannelListCommandParams); readTvChannelInteractionInfo.put( "readTvChannelListAttribute", readTvChannelTvChannelListAttributeInteractionInfo); @@ -4110,6 +4890,19 @@ public Map> getReadAttributeMap() { readTvChannelCurrentTvChannelCommandParams); readTvChannelInteractionInfo.put( "readCurrentTvChannelAttribute", readTvChannelCurrentTvChannelAttributeInteractionInfo); + Map readTvChannelAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readTvChannelAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TvChannelCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.TvChannelCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedTvChannelClusterAttributeListAttributeCallback(), + readTvChannelAttributeListCommandParams); + readTvChannelInteractionInfo.put( + "readAttributeListAttribute", readTvChannelAttributeListAttributeInteractionInfo); Map readTvChannelClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readTvChannelClusterRevisionAttributeInteractionInfo = @@ -4134,11 +4927,29 @@ public Map> getReadAttributeMap() { (ChipClusters.TargetNavigatorCluster.TargetNavigatorListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedTargetNavigatorListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedTargetNavigatorClusterTargetNavigatorListAttributeCallback(), readTargetNavigatorTargetNavigatorListCommandParams); readTargetNavigatorInteractionInfo.put( "readTargetNavigatorListAttribute", readTargetNavigatorTargetNavigatorListAttributeInteractionInfo); + Map readTargetNavigatorAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readTargetNavigatorAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TargetNavigatorCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.TargetNavigatorCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTargetNavigatorClusterAttributeListAttributeCallback(), + readTargetNavigatorAttributeListCommandParams); + readTargetNavigatorInteractionInfo.put( + "readAttributeListAttribute", readTargetNavigatorAttributeListAttributeInteractionInfo); Map readTargetNavigatorClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readTargetNavigatorClusterRevisionAttributeInteractionInfo = @@ -4204,6 +5015,23 @@ public Map> getReadAttributeMap() { readTemperatureMeasurementToleranceCommandParams); readTemperatureMeasurementInteractionInfo.put( "readToleranceAttribute", readTemperatureMeasurementToleranceAttributeInteractionInfo); + Map readTemperatureMeasurementAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readTemperatureMeasurementAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TemperatureMeasurementCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.TemperatureMeasurementCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedTemperatureMeasurementClusterAttributeListAttributeCallback(), + readTemperatureMeasurementAttributeListCommandParams); + readTemperatureMeasurementInteractionInfo.put( + "readAttributeListAttribute", + readTemperatureMeasurementAttributeListAttributeInteractionInfo); Map readTemperatureMeasurementClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readTemperatureMeasurementClusterRevisionAttributeInteractionInfo = @@ -4540,7 +5368,7 @@ public Map> getReadAttributeMap() { .readListInt8uAttribute( (ChipClusters.TestClusterCluster.ListInt8uAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedListInt8uAttributeCallback(), + () -> new ClusterInfoMapping.DelegatedTestClusterClusterListInt8uAttributeCallback(), readTestClusterListInt8uCommandParams); readTestClusterInteractionInfo.put( "readListInt8uAttribute", readTestClusterListInt8uAttributeInteractionInfo); @@ -4553,7 +5381,9 @@ public Map> getReadAttributeMap() { .readListOctetStringAttribute( (ChipClusters.TestClusterCluster.ListOctetStringAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedListOctetStringAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedTestClusterClusterListOctetStringAttributeCallback(), readTestClusterListOctetStringCommandParams); readTestClusterInteractionInfo.put( "readListOctetStringAttribute", readTestClusterListOctetStringAttributeInteractionInfo); @@ -4567,7 +5397,9 @@ public Map> getReadAttributeMap() { (ChipClusters.TestClusterCluster.ListStructOctetStringAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedListStructOctetStringAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedTestClusterClusterListStructOctetStringAttributeCallback(), readTestClusterListStructOctetStringCommandParams); readTestClusterInteractionInfo.put( "readListStructOctetStringAttribute", @@ -4658,7 +5490,8 @@ public Map> getReadAttributeMap() { callback); }, () -> - new ClusterInfoMapping.DelegatedListNullablesAndOptionalsStructAttributeCallback(), + new ClusterInfoMapping + .DelegatedTestClusterClusterListNullablesAndOptionalsStructAttributeCallback(), readTestClusterListNullablesAndOptionalsStructCommandParams); readTestClusterInteractionInfo.put( "readListNullablesAndOptionalsStructAttribute", @@ -4729,7 +5562,9 @@ public Map> getReadAttributeMap() { (ChipClusters.TestClusterCluster.ListLongOctetStringAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedListLongOctetStringAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedTestClusterClusterListLongOctetStringAttributeCallback(), readTestClusterListLongOctetStringCommandParams); readTestClusterInteractionInfo.put( "readListLongOctetStringAttribute", @@ -5176,6 +6011,20 @@ public Map> getReadAttributeMap() { readTestClusterInteractionInfo.put( "readNullableRangeRestrictedInt16sAttribute", readTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo); + Map readTestClusterAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readTestClusterAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.TestClusterCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping.DelegatedTestClusterClusterAttributeListAttributeCallback(), + readTestClusterAttributeListCommandParams); + readTestClusterInteractionInfo.put( + "readAttributeListAttribute", readTestClusterAttributeListAttributeInteractionInfo); Map readTestClusterClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readTestClusterClusterRevisionAttributeInteractionInfo = @@ -5422,6 +6271,19 @@ public Map> getReadAttributeMap() { readThermostatInteractionInfo.put( "readNumberOfDailyTransitionsAttribute", readThermostatNumberOfDailyTransitionsAttributeInteractionInfo); + Map readThermostatAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ThermostatCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterAttributeListAttributeCallback(), + readThermostatAttributeListCommandParams); + readThermostatInteractionInfo.put( + "readAttributeListAttribute", readThermostatAttributeListAttributeInteractionInfo); Map readThermostatFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readThermostatFeatureMapAttributeInteractionInfo = @@ -5495,6 +6357,25 @@ public Map> getReadAttributeMap() { readThermostatUserInterfaceConfigurationInteractionInfo.put( "readScheduleProgrammingVisibilityAttribute", readThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityAttributeInteractionInfo); + Map + readThermostatUserInterfaceConfigurationAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readThermostatUserInterfaceConfigurationAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatUserInterfaceConfigurationCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ThermostatUserInterfaceConfigurationCluster + .AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThermostatUserInterfaceConfigurationClusterAttributeListAttributeCallback(), + readThermostatUserInterfaceConfigurationAttributeListCommandParams); + readThermostatUserInterfaceConfigurationInteractionInfo.put( + "readAttributeListAttribute", + readThermostatUserInterfaceConfigurationAttributeListAttributeInteractionInfo); Map readThermostatUserInterfaceConfigurationClusterRevisionCommandParams = new LinkedHashMap(); @@ -5617,7 +6498,9 @@ public Map> getReadAttributeMap() { .NeighborTableListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedNeighborTableListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterNeighborTableListAttributeCallback(), readThreadNetworkDiagnosticsNeighborTableListCommandParams); readThreadNetworkDiagnosticsInteractionInfo.put( "readNeighborTableListAttribute", @@ -5632,7 +6515,9 @@ public Map> getReadAttributeMap() { (ChipClusters.ThreadNetworkDiagnosticsCluster.RouteTableListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedRouteTableListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterRouteTableListAttributeCallback(), readThreadNetworkDiagnosticsRouteTableListCommandParams); readThreadNetworkDiagnosticsInteractionInfo.put( "readRouteTableListAttribute", @@ -6321,7 +7206,9 @@ public Map> getReadAttributeMap() { (ChipClusters.ThreadNetworkDiagnosticsCluster.SecurityPolicyAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedSecurityPolicyAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterSecurityPolicyAttributeCallback(), readThreadNetworkDiagnosticsSecurityPolicyCommandParams); readThreadNetworkDiagnosticsInteractionInfo.put( "readSecurityPolicyAttribute", @@ -6353,7 +7240,8 @@ public Map> getReadAttributeMap() { callback); }, () -> - new ClusterInfoMapping.DelegatedOperationalDatasetComponentsAttributeCallback(), + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterOperationalDatasetComponentsAttributeCallback(), readThreadNetworkDiagnosticsOperationalDatasetComponentsCommandParams); readThreadNetworkDiagnosticsInteractionInfo.put( "readOperationalDatasetComponentsAttribute", @@ -6370,11 +7258,30 @@ public Map> getReadAttributeMap() { .ActiveNetworkFaultsListAttributeCallback) callback); }, - () -> new ClusterInfoMapping.DelegatedActiveNetworkFaultsListAttributeCallback(), + () -> + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterActiveNetworkFaultsListAttributeCallback(), readThreadNetworkDiagnosticsActiveNetworkFaultsListCommandParams); readThreadNetworkDiagnosticsInteractionInfo.put( "readActiveNetworkFaultsListAttribute", readThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeInteractionInfo); + Map readThreadNetworkDiagnosticsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readThreadNetworkDiagnosticsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadNetworkDiagnosticsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.ThreadNetworkDiagnosticsCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedThreadNetworkDiagnosticsClusterAttributeListAttributeCallback(), + readThreadNetworkDiagnosticsAttributeListCommandParams); + readThreadNetworkDiagnosticsInteractionInfo.put( + "readAttributeListAttribute", + readThreadNetworkDiagnosticsAttributeListAttributeInteractionInfo); Map readThreadNetworkDiagnosticsFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readThreadNetworkDiagnosticsFeatureMapAttributeInteractionInfo = @@ -6416,6 +7323,19 @@ public Map> getReadAttributeMap() { readWakeOnLanInteractionInfo.put( "readWakeOnLanMacAddressAttribute", readWakeOnLanWakeOnLanMacAddressAttributeInteractionInfo); + Map readWakeOnLanAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readWakeOnLanAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WakeOnLanCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.WakeOnLanCluster.AttributeListAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedWakeOnLanClusterAttributeListAttributeCallback(), + readWakeOnLanAttributeListCommandParams); + readWakeOnLanInteractionInfo.put( + "readAttributeListAttribute", readWakeOnLanAttributeListAttributeInteractionInfo); Map readWakeOnLanClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readWakeOnLanClusterRevisionAttributeInteractionInfo = @@ -6600,6 +7520,23 @@ public Map> getReadAttributeMap() { readWiFiNetworkDiagnosticsInteractionInfo.put( "readOverrunCountAttribute", readWiFiNetworkDiagnosticsOverrunCountAttributeInteractionInfo); + Map readWiFiNetworkDiagnosticsAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readWiFiNetworkDiagnosticsAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WiFiNetworkDiagnosticsCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.WiFiNetworkDiagnosticsCluster.AttributeListAttributeCallback) + callback); + }, + () -> + new ClusterInfoMapping + .DelegatedWiFiNetworkDiagnosticsClusterAttributeListAttributeCallback(), + readWiFiNetworkDiagnosticsAttributeListCommandParams); + readWiFiNetworkDiagnosticsInteractionInfo.put( + "readAttributeListAttribute", + readWiFiNetworkDiagnosticsAttributeListAttributeInteractionInfo); Map readWiFiNetworkDiagnosticsFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readWiFiNetworkDiagnosticsFeatureMapAttributeInteractionInfo = @@ -6872,6 +7809,21 @@ public Map> getReadAttributeMap() { readWindowCoveringSafetyStatusCommandParams); readWindowCoveringInteractionInfo.put( "readSafetyStatusAttribute", readWindowCoveringSafetyStatusAttributeInteractionInfo); + Map readWindowCoveringAttributeListCommandParams = + new LinkedHashMap(); + InteractionInfo readWindowCoveringAttributeListAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WindowCoveringCluster) cluster) + .readAttributeListAttribute( + (ChipClusters.WindowCoveringCluster.AttributeListAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedWindowCoveringClusterAttributeListAttributeCallback(), + readWindowCoveringAttributeListCommandParams); + readWindowCoveringInteractionInfo.put( + "readAttributeListAttribute", readWindowCoveringAttributeListAttributeInteractionInfo); Map readWindowCoveringFeatureMapCommandParams = new LinkedHashMap(); InteractionInfo readWindowCoveringFeatureMapAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 82e26123a01ebb..1748de05c17073 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -49,6 +49,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -77,6 +82,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -131,6 +141,11 @@ class ChipClusters: "attributeId": 0x00000002, "type": "int", }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -194,6 +209,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -235,6 +255,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -276,6 +301,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -327,6 +357,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -463,6 +498,11 @@ class ChipClusters: "attributeId": 0x00000012, "type": "str", }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -497,6 +537,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -531,6 +576,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -551,6 +601,11 @@ class ChipClusters: "type": "bool", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -684,6 +739,11 @@ class ChipClusters: "type": "str", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -698,6 +758,11 @@ class ChipClusters: "commands": { }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1242,6 +1307,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1284,6 +1354,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1322,6 +1397,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1345,6 +1425,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, }, } _DOOR_LOCK_CLUSTER_INFO = { @@ -1554,6 +1639,11 @@ class ChipClusters: "type": "bool", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1634,6 +1724,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1708,6 +1803,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -1733,6 +1833,11 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1771,6 +1876,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1833,6 +1943,11 @@ class ChipClusters: "attributeId": 0x00000003, "type": "int", }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1895,6 +2010,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1921,6 +2041,11 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -1984,6 +2109,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2032,6 +2162,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2076,6 +2211,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2097,6 +2237,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2272,6 +2417,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2292,6 +2442,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2345,6 +2500,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2476,6 +2636,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2528,6 +2693,11 @@ class ChipClusters: "type": "str", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2616,6 +2786,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -2666,6 +2841,11 @@ class ChipClusters: }, }, "attributes": { + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2703,6 +2883,11 @@ class ChipClusters: "type": "bool", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2735,6 +2920,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2823,6 +3013,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -2856,6 +3051,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -2968,6 +3168,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3036,6 +3241,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -3061,6 +3271,11 @@ class ChipClusters: "attributeId": 0x00000000, "type": "int", }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3092,6 +3307,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3254,6 +3474,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -3298,6 +3523,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3402,6 +3632,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3446,6 +3681,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -3483,6 +3723,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -3543,6 +3788,11 @@ class ChipClusters: "type": "bytes", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3571,6 +3821,11 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -3609,6 +3864,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -4316,6 +4576,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -4479,6 +4744,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -4520,6 +4790,11 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -4918,6 +5193,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -4943,6 +5223,11 @@ class ChipClusters: "type": "str", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, @@ -5041,6 +5326,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, @@ -5217,6 +5507,11 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + }, 0x0000FFFC: { "attributeName": "FeatureMap", "attributeId": 0x0000FFFC, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index a8c7335bdd0e91..7e712cf09c89db 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -952,6 +952,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0001 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -1138,6 +1154,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0002 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -1293,6 +1325,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0003 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -1514,6 +1562,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0004 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -2041,6 +2105,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0005 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -2265,6 +2345,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0006 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -2339,6 +2435,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0007 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -2763,6 +2875,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0008 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -2916,6 +3044,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0009 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -3118,6 +3262,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x000A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -3304,6 +3464,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x000F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -3851,6 +4027,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4106,6 +4298,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4148,6 +4356,22 @@ class PulseWidthModulation(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4269,6 +4493,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4354,6 +4594,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4490,6 +4746,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[AccessControl.Structs.ExtensionEntry]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x001F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -4718,6 +4990,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0020 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -5089,18 +5377,34 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[str]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0025 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) value: 'typing.Optional[uint]' = None @@ -5497,6 +5801,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[str]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -5739,6 +6059,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0029 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -5859,6 +6195,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'bool' = False + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -5973,6 +6325,22 @@ class LocalizationConfiguration(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -6015,6 +6383,22 @@ class LocalizationTimeFormat(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -6057,6 +6441,22 @@ class LocalizationUnit(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -6115,6 +6515,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -6653,6 +7069,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[typing.List[uint]]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x002F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -6889,6 +7321,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0030 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -7283,6 +7731,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0031 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -7383,6 +7847,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0032 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -7621,6 +8101,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[typing.List[uint]]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0033 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -7860,6 +8356,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0034 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -9078,6 +9590,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[ThreadNetworkDiagnostics.Enums.NetworkFault]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0035 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -9389,6 +9917,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0036 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -9662,6 +10206,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0037 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -9704,6 +10264,22 @@ class TimeSynchronization(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0038 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -10040,14 +10616,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[str]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0039 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0039 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -10129,6 +10721,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -10422,6 +11030,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -10807,6 +11431,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -10922,6 +11562,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[GroupKeyManagement.Structs.GroupKey]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -10995,6 +11651,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[FixedLabel.Structs.LabelStruct]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0040 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11068,6 +11740,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[UserLabel.Structs.LabelStruct]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0041 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11110,6 +11798,22 @@ class ProxyConfiguration(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0042 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11152,6 +11856,22 @@ class ProxyDiscovery(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0043 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11194,6 +11914,22 @@ class ProxyValid(Cluster): class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0044 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11252,6 +11988,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'bool' = False + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0045 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11440,6 +12192,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'str' = "" + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0050 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11562,6 +12330,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0100 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -13347,6 +14131,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -14055,6 +14855,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0102 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -14286,6 +15102,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0103 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -14727,6 +15559,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0200 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -15881,6 +16729,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -15956,14 +16820,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0202 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0202 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -16125,6 +17005,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0203 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -16215,6 +17111,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0204 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -17558,6 +18470,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0300 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -17856,6 +18784,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0301 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -17983,6 +18927,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[None, Nullable, uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0400 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18089,6 +19049,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0402 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18275,6 +19251,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[int]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0403 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18381,6 +19373,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0404 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18487,6 +19495,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0405 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18721,6 +19745,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0406 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18827,6 +19867,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x040C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -18933,6 +19989,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x040D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19039,6 +20111,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x040E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19145,6 +20233,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x040F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19251,6 +20355,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0410 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19357,6 +20477,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0411 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19463,6 +20599,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0412 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19570,14 +20722,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0413 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0413 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -19675,6 +20843,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0414 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19781,6 +20965,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0415 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19887,6 +21087,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0416 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -19993,6 +21209,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0417 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20099,6 +21331,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0418 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20205,6 +21453,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0419 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20311,6 +21575,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20417,6 +21697,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20523,6 +21819,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20629,6 +21941,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20735,6 +22063,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20841,6 +22185,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x041F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20947,6 +22307,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0420 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21053,6 +22429,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0421 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21159,6 +22551,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0422 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21265,6 +22673,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0423 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21371,6 +22795,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0424 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21477,6 +22917,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0425 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21583,6 +23039,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0426 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21689,6 +23161,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0427 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21795,6 +23283,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0428 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -21901,6 +23405,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[float]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0429 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -22192,6 +23712,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0500 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -22667,6 +24203,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0501 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -22762,6 +24314,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0502 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -22816,9 +24384,25 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0503 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'str' = "" + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -23021,6 +24605,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'bytes' = b"" + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0504 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -23151,6 +24751,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0505 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -23666,6 +25282,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0506 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -23833,6 +25465,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0507 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -23889,6 +25537,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0508 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24056,6 +25720,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0509 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24307,6 +25987,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[ContentLauncher.Enums.ContentLaunchStreamingType]' = field(default_factory=lambda: []) + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24440,6 +26136,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050B + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24588,6 +26300,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050C + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24765,6 +26493,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -24855,6 +26599,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -26857,6 +28617,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[Nullable, int]' = NullValue + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x050F + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -27165,6 +28941,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0703 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -27399,6 +29191,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0B00 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -27633,6 +29441,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'int' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0B01 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -27748,6 +29572,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0B02 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -27927,6 +29767,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0B03 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -30096,6 +31952,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0B04 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js index f1636b68600873..e4d414db3dff39 100644 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ b/src/darwin/Framework/CHIP/templates/helper.js @@ -34,6 +34,7 @@ function asExpectedEndpointForCluster(clusterName) case 'AdministratorCommissioning': case 'Basic': case 'Descriptor': + case 'DiagnosticLogs': case 'GeneralCommissioning': case 'GeneralDiagnostics': case 'SoftwareDiagnostics': diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index cfba7393cce741..b31f305bad7aa2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -376,8 +376,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPApplicationLauncherApplicationLauncherListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPAccessControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -385,7 +385,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -396,21 +396,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPAudioOutputAudioOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPAccountLoginAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPAudioOutputClusterAudioOutputInfo * newElement_0; - newElement_0 = [CHIPAudioOutputClusterAudioOutputInfo new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -421,24 +416,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPBridgedActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPBridgedActionsClusterActionStruct * newElement_0; - newElement_0 = [CHIPBridgedActionsClusterActionStruct new]; - newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; - newElement_0.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.status)]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -449,33 +436,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPBridgedActionsEndpointListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void CHIPApplicationBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPBridgedActionsClusterEndpointListStruct * newElement_0; - newElement_0 = [CHIPBridgedActionsClusterEndpointListStruct new]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - auto * array_NaN = [NSMutableArray new]; - auto iter_NaN = entry_0.endpoints.begin(); - while (iter_NaN.Next()) { - auto & entry_NaN = iter_NaN.GetValue(); - NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedShort:entry_NaN]; - [array_NaN addObject:newElement_NaN]; - } - if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { - } - newElement_0.endpoints = array_NaN; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -486,16 +456,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPContentLauncherAcceptsHeaderListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPApplicationLauncherApplicationLauncherListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -506,8 +476,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPApplicationLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -515,7 +485,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -526,18 +496,21 @@ DispatchSuccess(context, objCValue); }; -void CHIPDescriptorDeviceListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPAudioOutputAudioOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPDescriptorClusterDeviceType * newElement_0; - newElement_0 = [CHIPDescriptorClusterDeviceType new]; - newElement_0.type = [NSNumber numberWithUnsignedInt:entry_0.type]; - newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; + CHIPAudioOutputClusterAudioOutputInfo * newElement_0; + newElement_0 = [CHIPAudioOutputClusterAudioOutputInfo new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -548,8 +521,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPAudioOutputAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -568,8 +541,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPBarrierControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -588,8 +561,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -597,7 +570,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -608,28 +581,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -640,18 +601,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPGeneralCommissioningBasicCommissioningInfoListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & value) +void CHIPBindingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPGeneralCommissioningClusterBasicCommissioningInfoType * newElement_0; - newElement_0 = [CHIPGeneralCommissioningClusterBasicCommissioningInfoType new]; - newElement_0.failSafeExpiryLengthMs = [NSNumber numberWithUnsignedInt:entry_0.failSafeExpiryLengthMs]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -662,25 +621,44 @@ DispatchSuccess(context, objCValue); }; -void CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & value) +void CHIPBooleanStateAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; - newElement_0 = [CHIPGeneralDiagnosticsClusterNetworkInterfaceType new]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPBridgedActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPBridgedActionsClusterActionStruct * newElement_0; + newElement_0 = [CHIPBridgedActionsClusterActionStruct new]; + newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.fabricConnected = [NSNumber numberWithBool:entry_0.fabricConnected]; - newElement_0.offPremiseServicesReachableIPv4 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4]; - newElement_0.offPremiseServicesReachableIPv6 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6]; - newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() length:entry_0.hardwareAddress.size()]; newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; + newElement_0.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.status)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -691,8 +669,45 @@ DispatchSuccess(context, objCValue); }; -void CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPBridgedActionsEndpointListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPBridgedActionsClusterEndpointListStruct * newElement_0; + newElement_0 = [CHIPBridgedActionsClusterEndpointListStruct new]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + auto * array_NaN = [NSMutableArray new]; + auto iter_NaN = entry_0.endpoints.begin(); + while (iter_NaN.Next()) { + auto & entry_NaN = iter_NaN.GetValue(); + NSNumber * newElement_NaN; + newElement_NaN = [NSNumber numberWithUnsignedShort:entry_NaN]; + [array_NaN addObject:newElement_NaN]; + } + if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { + } + newElement_0.endpoints = array_NaN; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPBridgedActionsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -700,7 +715,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -711,8 +726,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -720,7 +735,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -731,8 +746,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -740,7 +755,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -751,19 +766,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPGroupKeyManagementGroupsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPContentLauncherAcceptsHeaderListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPGroupKeyManagementClusterGroupState * newElement_0; - newElement_0 = [CHIPGroupKeyManagementClusterGroupState new]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; - newElement_0.vendorGroupId = [NSNumber numberWithUnsignedShort:entry_0.vendorGroupId]; - newElement_0.groupKeySetIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetIndex]; + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -774,21 +786,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPGroupKeyManagementGroupKeysListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPGroupKeyManagementClusterGroupKey * newElement_0; - newElement_0 = [CHIPGroupKeyManagementClusterGroupKey new]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; - newElement_0.groupKeyIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeyIndex]; - newElement_0.groupKeyRoot = [NSData dataWithBytes:entry_0.groupKeyRoot.data() length:entry_0.groupKeyRoot.size()]; - newElement_0.groupKeyEpochStartTime = [NSNumber numberWithUnsignedLongLong:entry_0.groupKeyEpochStartTime]; - newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.groupKeySecurityPolicy)]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -799,24 +806,971 @@ DispatchSuccess(context, objCValue); }; -void CHIPMediaInputMediaInputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPContentLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPMediaInputClusterMediaInputInfo * newElement_0; - newElement_0 = [CHIPMediaInputClusterMediaInputInfo new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() - length:entry_0.description.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDescriptorDeviceListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPDescriptorClusterDeviceType * newElement_0; + newElement_0 = [CHIPDescriptorClusterDeviceType new]; + newElement_0.type = [NSNumber numberWithUnsignedInt:entry_0.type]; + newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDescriptorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPFixedLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPFlowMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralCommissioningBasicCommissioningInfoListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPGeneralCommissioningClusterBasicCommissioningInfoType * newElement_0; + newElement_0 = [CHIPGeneralCommissioningClusterBasicCommissioningInfoType new]; + newElement_0.failSafeExpiryLengthMs = [NSNumber numberWithUnsignedInt:entry_0.failSafeExpiryLengthMs]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; + newElement_0 = [CHIPGeneralDiagnosticsClusterNetworkInterfaceType new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricConnected = [NSNumber numberWithBool:entry_0.fabricConnected]; + newElement_0.offPremiseServicesReachableIPv4 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4]; + newElement_0.offPremiseServicesReachableIPv6 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6]; + newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() length:entry_0.hardwareAddress.size()]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGroupKeyManagementGroupsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPGroupKeyManagementClusterGroupState * newElement_0; + newElement_0 = [CHIPGroupKeyManagementClusterGroupState new]; + newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; + newElement_0.vendorGroupId = [NSNumber numberWithUnsignedShort:entry_0.vendorGroupId]; + newElement_0.groupKeySetIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetIndex]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGroupKeyManagementGroupKeysListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPGroupKeyManagementClusterGroupKey * newElement_0; + newElement_0 = [CHIPGroupKeyManagementClusterGroupKey new]; + newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; + newElement_0.groupKeyIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeyIndex]; + newElement_0.groupKeyRoot = [NSData dataWithBytes:entry_0.groupKeyRoot.data() length:entry_0.groupKeyRoot.size()]; + newElement_0.groupKeyEpochStartTime = [NSNumber numberWithUnsignedLongLong:entry_0.groupKeyEpochStartTime]; + newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.groupKeySecurityPolicy)]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPGroupsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPIdentifyAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPKeypadInputAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPLevelControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPMediaInputMediaInputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPMediaInputClusterMediaInputInfo * newElement_0; + newElement_0 = [CHIPMediaInputClusterMediaInputInfo new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() + length:entry_0.description.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPMediaInputAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPMediaPlaybackAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPModeSelectClusterModeOptionStruct * newElement_0; + newElement_0 = [CHIPModeSelectClusterModeOptionStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + newElement_0.semanticTag = [NSNumber numberWithUnsignedInt:entry_0.semanticTag]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPModeSelectAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOccupancySensingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOnOffAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterFabricDescriptor * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterFabricDescriptor new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; + newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; + newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; + newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPPowerSourceAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -827,21 +1781,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPModeSelectClusterModeOptionStruct * newElement_0; - newElement_0 = [CHIPModeSelectClusterModeOptionStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - newElement_0.semanticTag = [NSNumber numberWithUnsignedInt:entry_0.semanticTag]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -852,25 +1801,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) +void CHIPPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPOperationalCredentialsClusterFabricDescriptor * newElement_0; - newElement_0 = [CHIPOperationalCredentialsClusterFabricDescriptor new]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; - newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -881,16 +1821,16 @@ DispatchSuccess(context, objCValue); }; -void CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -901,8 +1841,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -910,7 +1850,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -921,8 +1861,8 @@ DispatchSuccess(context, objCValue); }; -void CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPScenesAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; auto * array_0 = [NSMutableArray new]; @@ -930,7 +1870,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -969,6 +1909,46 @@ DispatchSuccess(context, objCValue); }; +void CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPSwitchAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPTvChannelTvChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value) { @@ -1000,6 +1980,26 @@ DispatchSuccess(context, objCValue); }; +void CHIPTvChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & value) @@ -1025,6 +2025,46 @@ DispatchSuccess(context, objCValue); }; +void CHIPTargetNavigatorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPTestClusterListInt8uListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -1281,6 +2321,66 @@ DispatchSuccess(context, objCValue); }; +void CHIPTestClusterAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & value) @@ -1423,6 +2523,86 @@ DispatchSuccess(context, objCValue); }; +void CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPWakeOnLanAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPWindowCoveringAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + if (iter_0.GetStatus() != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + void CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 9496bca5e721b2..222ac7295de380 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -480,6 +480,51 @@ class CHIPAccessControlExtensionListAttributeCallbackBridge : public CHIPCallbac value); }; +class CHIPAccessControlAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPAccessControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPAccountLoginAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPAccountLoginAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPApplicationBasicAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPApplicationBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPApplicationLauncherApplicationLauncherListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -492,6 +537,17 @@ class CHIPApplicationLauncherApplicationLauncherListListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPApplicationLauncherAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPApplicationLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPAudioOutputAudioOutputListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -506,6 +562,70 @@ class CHIPAudioOutputAudioOutputListListAttributeCallbackBridge value); }; +class CHIPAudioOutputAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPAudioOutputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBarrierControlAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBarrierControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBasicAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBindingAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPBindingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBooleanStateAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBooleanStateAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPBridgedActionsActionListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -534,6 +654,39 @@ class CHIPBridgedActionsEndpointListListAttributeCallbackBridge value); }; +class CHIPBridgedActionsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBridgedActionsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPColorControlAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPColorControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPContentLauncherAcceptsHeaderListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -559,6 +712,17 @@ class CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge const chip::app::DataModel::DecodableList & value); }; +class CHIPContentLauncherAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPContentLauncherAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPDescriptorDeviceListListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -601,6 +765,62 @@ class CHIPDescriptorPartsListListAttributeCallbackBridge : public CHIPCallbackBr static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPDescriptorAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPDoorLockAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPFixedLabelLabelListListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -613,6 +833,28 @@ class CHIPFixedLabelLabelListListAttributeCallbackBridge : public CHIPCallbackBr const chip::app::DataModel::DecodableList & value); }; +class CHIPFixedLabelAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPFlowMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPFlowMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPGeneralCommissioningBasicCommissioningInfoListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -628,6 +870,18 @@ class CHIPGeneralCommissioningBasicCommissioningInfoListListAttributeCallbackBri chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & value); }; +class CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -678,6 +932,17 @@ class CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPGroupKeyManagementGroupsListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -706,6 +971,81 @@ class CHIPGroupKeyManagementGroupKeysListAttributeCallbackBridge value); }; +class CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPGroupsAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPGroupsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPIdentifyAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPIdentifyAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPKeypadInputAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPKeypadInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPLevelControlAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPLevelControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPLowPowerAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPLowPowerAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPMediaInputMediaInputListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -719,6 +1059,28 @@ class CHIPMediaInputMediaInputListListAttributeCallbackBridge const chip::app::DataModel::DecodableList & value); }; +class CHIPMediaInputAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPMediaInputAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPMediaPlaybackAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPMediaPlaybackAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPModeSelectSupportedModesListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -733,6 +1095,86 @@ class CHIPModeSelectSupportedModesListAttributeCallbackBridge value); }; +class CHIPModeSelectAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPModeSelectAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOccupancySensingAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOccupancySensingAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOnOffAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPOnOffAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -759,6 +1201,18 @@ class CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBrid static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -770,6 +1224,17 @@ class CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPPowerSourceAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPowerSourceAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -781,6 +1246,63 @@ class CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPPressureMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPressureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPScenesAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPScenesAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -795,6 +1317,27 @@ class CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge value); }; +class CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPSwitchAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPSwitchAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPTvChannelTvChannelListListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -807,6 +1350,16 @@ class CHIPTvChannelTvChannelListListAttributeCallbackBridge : public CHIPCallbac const chip::app::DataModel::DecodableList & value); }; +class CHIPTvChannelAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTvChannelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -821,6 +1374,29 @@ class CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & value); }; +class CHIPTargetNavigatorAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTargetNavigatorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPTestClusterListInt8uListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -881,6 +1457,42 @@ class CHIPTestClusterListLongOctetStringListAttributeCallbackBridge static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; +class CHIPTestClusterAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPThermostatAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThermostatAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, + OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -954,6 +1566,51 @@ class CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBr const chip::app::DataModel::DecodableList & value); }; +class CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPWakeOnLanAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPWakeOnLanAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPWindowCoveringAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPWindowCoveringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + class CHIPAccountLoginClusterGetSetupPINResponseCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 704f75f8f53e6d..9dc8e79ae0a133 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -59,6 +62,9 @@ NS_ASSUME_NONNULL_BEGIN NSError * _Nullable error))completionHandler; - (void)loginWithParams:(CHIPAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -90,6 +96,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -164,6 +173,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeApplicationStatusWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -203,6 +215,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeApplicationIdWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -235,6 +250,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeCurrentAudioOutputWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -287,6 +305,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeBarrierPositionWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -453,6 +474,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -495,6 +519,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeStatusFlagsWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -514,6 +541,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)bindWithParams:(CHIPBindingClusterBindParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)unbindWithParams:(CHIPBindingClusterUnbindParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -538,6 +568,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeStateValueWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -592,6 +625,9 @@ NS_ASSUME_NONNULL_BEGIN responseHandler:(ResponseHandler)responseHandler; - (void)reportAttributeSetupUrlWithResponseHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -608,6 +644,9 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBridgedDeviceBasic : CHIPCluster +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1089,6 +1128,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeStartUpColorTemperatureMiredsWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1118,6 +1160,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSupportedStreamingTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1146,6 +1191,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributePartsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1166,6 +1214,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + @end /** @@ -1231,6 +1282,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeActuatorEnabledWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1335,6 +1389,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeActivePowerMaxWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1424,6 +1481,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeTimeSinceResetWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -1446,6 +1506,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLabelListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1494,6 +1557,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeToleranceWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1538,6 +1604,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1596,6 +1665,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1617,6 +1689,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeGroupKeysWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1657,6 +1732,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeNameSupportWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1696,6 +1774,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeIdentifyTypeWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1752,6 +1833,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeLightSensorTypeWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1772,6 +1856,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1916,6 +2003,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeStartUpCurrentLevelWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1934,6 +2024,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -1968,6 +2061,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeCurrentMediaInputWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2072,6 +2168,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeSeekRangeStartWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2125,6 +2224,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeDescriptionWithResponseHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2166,6 +2268,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -2199,6 +2304,9 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2235,6 +2343,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeUpdatePossibleWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2275,6 +2386,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeOccupancySensorTypeBitmapWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2338,6 +2452,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeStartUpOnOffWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -2379,6 +2496,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeSwitchActionsWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2452,6 +2572,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeCurrentFabricIndexWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2531,6 +2654,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeBatteryChargeStateWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -2557,6 +2683,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2592,6 +2721,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeMaxMeasuredValueWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2799,6 +2931,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeAlarmMaskWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -2855,6 +2990,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeToleranceWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2931,6 +3069,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeNameSupportWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -2976,6 +3117,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeCurrentHeapHighWatermarkWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3019,6 +3163,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeMultiPressMaxWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -3069,6 +3216,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeCurrentTvChannelWithResponseHandler:(void (^)( NSData * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -3092,6 +3242,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeTargetNavigatorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -3140,6 +3293,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeToleranceWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -3800,6 +3956,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeNullableRangeRestrictedInt16sWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -3977,6 +4136,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeNumberOfDailyTransitionsWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval @@ -4030,6 +4192,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeScheduleProgrammingVisibilityWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -4522,6 +4687,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4549,6 +4717,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeWakeOnLanMacAddressWithResponseHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval @@ -4667,6 +4838,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeOverrunCountWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4839,6 +5013,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)reportAttributeSafetyStatusWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFeatureMapWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 7c3054782a73fd..47a0ebefca7140 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -228,6 +228,22 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPAccessControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -292,6 +308,22 @@ new CHIPCommandSuccessCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPAccountLoginAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -448,6 +480,22 @@ new CHIPInt16uAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -786,6 +834,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPApplicationBasicAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -950,6 +1014,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPApplicationLauncherAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1092,6 +1172,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPAudioOutputAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1332,6 +1428,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBarrierControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2164,6 +2276,22 @@ new CHIPCharStringAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBasicAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2365,6 +2493,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2455,6 +2599,22 @@ new CHIPCommandSuccessCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBindingAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2542,6 +2702,22 @@ new CHIPBooleanAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanStateAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2941,6 +3117,22 @@ new CHIPCharStringAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2989,6 +3181,22 @@ @implementation CHIPBridgedDeviceBasic return &_cppCluster; } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5713,6 +5921,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPColorControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5835,6 +6059,22 @@ new CHIPContentLauncherSupportedStreamingTypesListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPContentLauncherAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -5947,6 +6187,22 @@ new CHIPDescriptorPartsListListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDescriptorAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -6018,6 +6274,22 @@ new CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + @end @implementation CHIPDoorLock @@ -6540,6 +6812,22 @@ new CHIPBooleanAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7017,6 +7305,22 @@ new CHIPInt16sAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7431,6 +7735,22 @@ new CHIPInt64uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7511,6 +7831,22 @@ new CHIPFixedLabelLabelListListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPFixedLabelAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7714,6 +8050,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -7933,6 +8285,22 @@ new CHIPInt8uAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8199,6 +8567,22 @@ new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8278,6 +8662,22 @@ new CHIPGroupKeyManagementGroupKeysListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8504,6 +8904,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGroupsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8706,6 +9122,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPIdentifyAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -8952,6 +9384,22 @@ new CHIPNullableInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9020,6 +9468,22 @@ new CHIPKeypadInputClusterSendKeyResponseCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPKeypadInputAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9920,6 +10384,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPLevelControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -9985,6 +10465,22 @@ new CHIPCommandSuccessCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPLowPowerAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10159,6 +10655,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10720,6 +11232,22 @@ new CHIPInt64uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -10975,6 +11503,22 @@ new CHIPCharStringAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11203,6 +11747,22 @@ new CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11392,6 +11952,22 @@ new CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11562,6 +12138,22 @@ new CHIPBooleanAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -11726,6 +12318,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12129,6 +12737,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12312,6 +12936,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -12700,6 +13340,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13072,6 +13728,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13174,6 +13846,22 @@ new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -13316,6 +14004,22 @@ new CHIPInt16sAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -14377,6 +15081,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -14619,6 +15339,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15032,6 +15768,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPScenesAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15230,6 +15982,22 @@ new CHIPInt64uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15411,6 +16179,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSwitchAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15650,6 +16434,22 @@ new CHIPOctetStringAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTvChannelAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TvChannel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15735,6 +16535,22 @@ new CHIPTargetNavigatorTargetNavigatorListListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15938,6 +16754,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -20912,6 +21744,22 @@ new CHIPNullableInt16sAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTestClusterAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -21909,6 +22757,22 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPThermostatAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -22169,6 +23033,23 @@ new CHIPInt8uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -24569,6 +25450,22 @@ new CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBrid }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -24672,6 +25569,22 @@ new CHIPCharStringAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPWakeOnLanAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -25240,6 +26153,22 @@ new CHIPInt64uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -26149,6 +27078,22 @@ new CHIPInt16uAttributeCallbackBridge( true); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPWindowCoveringAttributeListListAttributeCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 1257bf89abc2d5..601ed5b140f965 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestAccessControl : CHIPAccessControl +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -39,6 +40,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestAccountLogin : CHIPAccountLogin +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -52,6 +54,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeWindowStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAdminFabricIndexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAdminVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -69,6 +72,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeApplicationIdWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeApplicationStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -83,6 +87,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCatalogVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeApplicationIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -95,6 +100,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeAudioOutputListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentAudioOutputWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -109,6 +115,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeBarrierSafetyStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBarrierCapabilitiesWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBarrierPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -138,6 +145,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeSerialNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeReachableWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeUniqueIDWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -149,6 +157,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestBinaryInputBasic : CHIPBinaryInputBasic - (void)writeAttributeStatusFlagsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -159,6 +168,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestBinding : CHIPBinding +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -170,6 +180,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestBooleanState : CHIPBooleanState - (void)writeAttributeStateValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -183,6 +194,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActionListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeEndpointListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSetupUrlWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -193,6 +205,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestBridgedDeviceBasic : CHIPBridgedDeviceBasic +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -247,6 +260,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCoupleColorTempToLevelMinMiredsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -260,6 +274,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeAcceptsHeaderListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSupportedStreamingTypesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -274,6 +289,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeServerListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClientListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePartsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -284,6 +300,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestDiagnosticLogs : CHIPDiagnosticLogs +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; + @end /** @@ -295,6 +313,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeLockStateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeLockTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActuatorEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -316,6 +335,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActivePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActivePowerMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActivePowerMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -335,6 +355,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeTimeSinceResetWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -347,6 +368,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestFixedLabel : CHIPFixedLabel - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -361,6 +383,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -375,6 +398,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeRegulatoryConfigWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeLocationCapabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -394,6 +418,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeActiveHardwareFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveRadioFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveNetworkFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -406,6 +431,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeGroupsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGroupKeysWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -417,6 +443,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestGroups : CHIPGroups - (void)writeAttributeNameSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -428,6 +455,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestIdentify : CHIPIdentify - (void)writeAttributeIdentifyTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -443,6 +471,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeLightSensorTypeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -453,6 +482,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestKeypadInput : CHIPKeypadInput +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -470,6 +500,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeCurrentFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMinFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -480,6 +511,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestLowPower : CHIPLowPower +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -492,6 +524,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMediaInputListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentMediaInputWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -510,6 +543,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributePlaybackSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -524,6 +558,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeSupportedModesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -534,6 +569,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestNetworkCommissioning : CHIPNetworkCommissioning +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -545,6 +581,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestOtaSoftwareUpdateProvider : CHIPOtaSoftwareUpdateProvider +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -556,6 +593,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestOtaSoftwareUpdateRequestor : CHIPOtaSoftwareUpdateRequestor - (void)writeAttributeUpdatePossibleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -570,6 +608,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOccupancySensorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeOccupancySensorTypeBitmapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -582,6 +621,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeOnOffWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeGlobalSceneControlWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -594,6 +634,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestOnOffSwitchConfiguration : CHIPOnOffSwitchConfiguration - (void)writeAttributeSwitchTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -610,6 +651,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeTrustedRootCertificatesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentFabricIndexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -631,6 +673,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeBatteryChargeLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveBatteryFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeBatteryChargeStateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -643,6 +686,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestPowerSourceConfiguration : CHIPPowerSourceConfiguration - (void)writeAttributeSourcesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -656,6 +700,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -688,6 +733,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -703,6 +749,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -718,6 +765,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeCurrentGroupWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSceneValidWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNameSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -733,6 +781,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeCurrentHeapUsedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentHeapHighWatermarkWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -747,6 +796,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeNumberOfPositionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMultiPressMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -761,6 +811,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeTvChannelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeTvChannelLineupWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentTvChannelWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -772,6 +823,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestTargetNavigator : CHIPTargetNavigator - (void)writeAttributeTargetNavigatorListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -786,6 +838,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -799,6 +852,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -823,6 +877,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeNumberOfDailyTransitionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -834,6 +889,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestThermostatUserInterfaceConfiguration : CHIPThermostatUserInterfaceConfiguration +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -921,6 +977,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeActiveNetworkFaultsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -933,6 +990,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPTestWakeOnLan : CHIPWakeOnLan - (void)writeAttributeWakeOnLanMacAddressWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end @@ -960,6 +1018,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCurrentMaxRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -998,6 +1057,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeInstalledClosedLimitTiltWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSafetyStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 71e47cb0041e65..3ffdf39e898ccd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -44,6 +44,45 @@ @implementation CHIPTestAccessControl return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -75,6 +114,45 @@ @implementation CHIPTestAccountLogin return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -160,6 +238,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -317,6 +434,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -424,6 +580,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -516,6 +711,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -619,7 +853,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -628,24 +862,63 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -@end - -@interface CHIPTestBasic () -@property (readonly) chip::Controller::BasicClusterTest cppCluster; -@end - -@implementation CHIPTestBasic - -- (chip::Controller::ClusterBase *)getCluster +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + +@interface CHIPTestBasic () +@property (readonly) chip::Controller::BasicClusterTest cppCluster; +@end + +@implementation CHIPTestBasic + +- (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } @@ -941,6 +1214,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -990,6 +1302,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1021,6 +1372,45 @@ @implementation CHIPTestBinding return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1070,6 +1460,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1232,6 +1661,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1263,6 +1731,45 @@ @implementation CHIPTestBridgedDeviceBasic return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -1999,7 +2506,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -2008,13 +2515,52 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -2110,6 +2656,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -2298,6 +2883,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -2329,6 +2953,45 @@ @implementation CHIPTestDiagnosticLogs return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + @end @interface CHIPTestDoorLock () @@ -2401,6 +3064,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -2630,6 +3332,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -2823,7 +3564,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -2832,16 +3573,55 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -2914,6 +3694,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3017,6 +3836,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3124,6 +3982,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3393,6 +4290,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3510,6 +4446,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3559,6 +4534,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3608,7 +4622,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -3617,22 +4631,61 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -@end - -@interface CHIPTestIlluminanceMeasurement () -@property (readonly) chip::Controller::IlluminanceMeasurementClusterTest cppCluster; -@end - -@implementation CHIPTestIlluminanceMeasurement + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +@end + +@interface CHIPTestIlluminanceMeasurement () +@property (readonly) chip::Controller::IlluminanceMeasurementClusterTest cppCluster; +@end + +@implementation CHIPTestIlluminanceMeasurement - (chip::Controller::ClusterBase *)getCluster { @@ -3749,6 +4802,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3780,6 +4872,45 @@ @implementation CHIPTestKeypadInput return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3937,6 +5068,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -3968,6 +5138,45 @@ @implementation CHIPTestLowPower return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4061,6 +5270,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4236,6 +5484,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4362,6 +5649,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4393,6 +5719,45 @@ @implementation CHIPTestNetworkCommissioning return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4442,6 +5807,45 @@ @implementation CHIPTestOtaSoftwareUpdateProvider return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4491,6 +5895,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4577,6 +6020,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4644,6 +6126,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4711,6 +6232,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -4880,6 +6440,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5095,6 +6694,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5183,6 +6821,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5268,6 +6945,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5660,6 +7376,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5781,6 +7536,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -5902,6 +7696,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6031,6 +7864,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6134,6 +8006,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6262,6 +8173,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TvChannel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6333,6 +8283,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6436,6 +8425,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6679,7 +8707,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -6688,7 +8755,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; TypeInfo::Type cppValue; { using ListType_0 = std::remove_reference_t; @@ -6700,12 +8767,12 @@ new CHIPDefaultSuccessCallbackBridge( } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } cppValue = ListType_0(listHolder_0->mList, value.count); } else { @@ -6899,6 +8966,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -6948,6 +9054,45 @@ @implementation CHIPTestThermostatUserInterfaceConfiguration return &_cppCluster; } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -8265,6 +10410,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -8332,6 +10516,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -8599,6 +10822,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( @@ -8964,6 +11226,45 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index ed2de9c58af826..b9872fb31e1814 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -30025,6 +30025,51 @@ - (void)testSendClusterTestBasicInformation_000004_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTestBasicInformation_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read AttributeList value"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read AttributeList value Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue count], 21); + XCTAssertEqual([actualValue[0] unsignedIntValue], 0UL); + XCTAssertEqual([actualValue[1] unsignedIntValue], 1UL); + XCTAssertEqual([actualValue[2] unsignedIntValue], 2UL); + XCTAssertEqual([actualValue[3] unsignedIntValue], 3UL); + XCTAssertEqual([actualValue[4] unsignedIntValue], 4UL); + XCTAssertEqual([actualValue[5] unsignedIntValue], 5UL); + XCTAssertEqual([actualValue[6] unsignedIntValue], 6UL); + XCTAssertEqual([actualValue[7] unsignedIntValue], 7UL); + XCTAssertEqual([actualValue[8] unsignedIntValue], 8UL); + XCTAssertEqual([actualValue[9] unsignedIntValue], 9UL); + XCTAssertEqual([actualValue[10] unsignedIntValue], 10UL); + XCTAssertEqual([actualValue[11] unsignedIntValue], 11UL); + XCTAssertEqual([actualValue[12] unsignedIntValue], 12UL); + XCTAssertEqual([actualValue[13] unsignedIntValue], 13UL); + XCTAssertEqual([actualValue[14] unsignedIntValue], 14UL); + XCTAssertEqual([actualValue[15] unsignedIntValue], 15UL); + XCTAssertEqual([actualValue[16] unsignedIntValue], 16UL); + XCTAssertEqual([actualValue[17] unsignedIntValue], 17UL); + XCTAssertEqual([actualValue[18] unsignedIntValue], 18UL); + XCTAssertEqual([actualValue[19] unsignedIntValue], 65531UL); + XCTAssertEqual([actualValue[20] unsignedIntValue], 65533UL); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTestGroupsCluster_000000_WaitForCommissionee { @@ -31466,6 +31511,31 @@ - (void)testSendClusterTestSubscribe_OnOff_000007_WaitForReport [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterAccountLoginReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPAccountLogin * cluster = [[CHIPAccountLogin alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"AccountLoginReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"AccountLogin AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterAccountLoginReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31572,6 +31642,33 @@ - (void)testSendClusterAdministratorCommissioningReadAttributeAdminVendorIdWithC [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterAdministratorCommissioningReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPAdministratorCommissioning * cluster = [[CHIPAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"AdministratorCommissioningReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"AdministratorCommissioning AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterAdministratorCommissioningReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31774,6 +31871,31 @@ - (void)testSendClusterApplicationBasicReadAttributeApplicationStatusWithComplet [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterApplicationBasicReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPApplicationBasic * cluster = [[CHIPApplicationBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationBasicReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ApplicationBasic AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterApplicationBasicReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31874,6 +31996,31 @@ - (void)testSendClusterApplicationLauncherReadAttributeApplicationIdWithCompleti [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterApplicationLauncherReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPApplicationLauncher * cluster = [[CHIPApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ApplicationLauncherReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ApplicationLauncher AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterApplicationLauncherReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -31949,6 +32096,31 @@ - (void)testSendClusterAudioOutputReadAttributeCurrentAudioOutputWithCompletionH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterAudioOutputReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPAudioOutput * cluster = [[CHIPAudioOutput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"AudioOutputReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"AudioOutput AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterAudioOutputReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32074,6 +32246,31 @@ - (void)testSendClusterBarrierControlReadAttributeBarrierPositionWithCompletionH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBarrierControlReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBarrierControl * cluster = [[CHIPBarrierControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"BarrierControlReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"BarrierControl AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBarrierControlReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32224,6 +32421,31 @@ - (void)testSendClusterBinaryInputBasicReadAttributeStatusFlagsWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBinaryInputBasicReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBinaryInputBasic * cluster = [[CHIPBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"BinaryInputBasicReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"BinaryInputBasic AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32249,6 +32471,30 @@ - (void)testSendClusterBinaryInputBasicReadAttributeClusterRevisionWithCompletio [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBindingReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBinding * cluster = [[CHIPBinding alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"BindingReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Binding AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBindingReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32297,6 +32543,31 @@ - (void)testSendClusterBooleanStateReadAttributeStateValueWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBooleanStateReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBooleanState * cluster = [[CHIPBooleanState alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"BooleanStateReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"BooleanState AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBooleanStateReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32396,6 +32667,31 @@ - (void)testSendClusterBridgedActionsReadAttributeSetupUrlWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBridgedActionsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBridgedActions * cluster = [[CHIPBridgedActions alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedActionsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"BridgedActions AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBridgedActionsReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -32421,6 +32717,31 @@ - (void)testSendClusterBridgedActionsReadAttributeClusterRevisionWithCompletionH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterBridgedDeviceBasicReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPBridgedDeviceBasic * cluster = [[CHIPBridgedDeviceBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"BridgedDeviceBasicReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"BridgedDeviceBasic AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterBridgedDeviceBasicReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34058,7 +34379,7 @@ - (void)testSendClusterColorControlWriteAttributeStartUpColorTemperatureMiredsWi [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterColorControlReadAttributeClusterRevisionWithCompletionHandler +- (void)testSendClusterColorControlReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34072,10 +34393,10 @@ - (void)testSendClusterColorControlReadAttributeClusterRevisionWithCompletionHan XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"ColorControlReadAttributeClusterRevisionWithCompletionHandler"]; + [self expectationWithDescription:@"ColorControlReadAttributeAttributeListWithCompletionHandler"]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ColorControl ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ColorControl AttributeList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -34083,7 +34404,32 @@ - (void)testSendClusterColorControlReadAttributeClusterRevisionWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithCompletionHandler +- (void)testSendClusterColorControlReadAttributeClusterRevisionWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ColorControlReadAttributeClusterRevisionWithCompletionHandler"]; + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ColorControl ClusterRevision Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterContentLauncherReadAttributeAcceptsHeaderListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34133,6 +34479,31 @@ - (void)testSendClusterContentLauncherReadAttributeSupportedStreamingTypesWithCo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterContentLauncherReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPContentLauncher * cluster = [[CHIPContentLauncher alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ContentLauncherReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ContentLauncher AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterContentLauncherReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34254,6 +34625,31 @@ - (void)testSendClusterDescriptorReadAttributePartsListWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterDescriptorReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPDescriptor * cluster = [[CHIPDescriptor alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"DescriptorReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Descriptor AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterDescriptorReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34279,6 +34675,31 @@ - (void)testSendClusterDescriptorReadAttributeClusterRevisionWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterDiagnosticLogsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPDiagnosticLogs * cluster = [[CHIPDiagnosticLogs alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"DiagnosticLogsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"DiagnosticLogs AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34304,6 +34725,30 @@ - (void)testSendClusterDoorLockReadAttributeActuatorEnabledWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterDoorLockReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"DoorLockReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"DoorLock AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterDoorLockReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34604,6 +35049,31 @@ - (void)testSendClusterElectricalMeasurementReadAttributeActivePowerMaxWithCompl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterElectricalMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPElectricalMeasurement * cluster = [[CHIPElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ElectricalMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ElectricalMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterElectricalMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34872,6 +35342,33 @@ - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeTimeSinceResetWith [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPEthernetNetworkDiagnostics * cluster = [[CHIPEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"EthernetNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"EthernetNetworkDiagnostics AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterEthernetNetworkDiagnosticsReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34950,6 +35447,31 @@ - (void)testSendClusterFixedLabelReadAttributeLabelListWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterFixedLabelReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPFixedLabel * cluster = [[CHIPFixedLabel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"FixedLabelReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"FixedLabel AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterFixedLabelReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35075,6 +35597,31 @@ - (void)testSendClusterFlowMeasurementReadAttributeToleranceWithCompletionHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterFlowMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPFlowMeasurement * cluster = [[CHIPFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"FlowMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"FlowMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterFlowMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35225,6 +35772,31 @@ - (void)testSendClusterGeneralCommissioningReadAttributeLocationCapabilityWithCo [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterGeneralCommissioningReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"GeneralCommissioningReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"GeneralCommissioning AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterGeneralCommissioningReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35450,6 +36022,31 @@ - (void)testSendClusterGeneralDiagnosticsReadAttributeActiveNetworkFaultsWithCom [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterGeneralDiagnosticsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPGeneralDiagnostics * cluster = [[CHIPGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"GeneralDiagnosticsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"GeneralDiagnostics AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterGeneralDiagnosticsReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35525,6 +36122,31 @@ - (void)testSendClusterGroupKeyManagementReadAttributeGroupKeysWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterGroupKeyManagementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPGroupKeyManagement * cluster = [[CHIPGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"GroupKeyManagementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"GroupKeyManagement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterGroupKeyManagementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35574,6 +36196,30 @@ - (void)testSendClusterGroupsReadAttributeNameSupportWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterGroupsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPGroups * cluster = [[CHIPGroups alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"GroupsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Groups AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterGroupsReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35671,6 +36317,30 @@ - (void)testSendClusterIdentifyReadAttributeIdentifyTypeWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterIdentifyReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPIdentify * cluster = [[CHIPIdentify alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"IdentifyReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Identify AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterIdentifyReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35821,6 +36491,31 @@ - (void)testSendClusterIlluminanceMeasurementReadAttributeLightSensorTypeWithCom [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterIlluminanceMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPIlluminanceMeasurement * cluster = [[CHIPIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"IlluminanceMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"IlluminanceMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterIlluminanceMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -35846,6 +36541,31 @@ - (void)testSendClusterIlluminanceMeasurementReadAttributeClusterRevisionWithCom [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterKeypadInputReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPKeypadInput * cluster = [[CHIPKeypadInput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"KeypadInputReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"KeypadInput AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterKeypadInputReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36392,6 +37112,31 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLevelControlReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"LevelControlReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"LevelControl AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36417,6 +37162,30 @@ - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLowPowerReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLowPower * cluster = [[CHIPLowPower alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"LowPowerReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"LowPower AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLowPowerReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36492,6 +37261,31 @@ - (void)testSendClusterMediaInputReadAttributeCurrentMediaInputWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterMediaInputReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPMediaInput * cluster = [[CHIPMediaInput alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"MediaInputReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"MediaInput AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterMediaInputReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36714,6 +37508,31 @@ - (void)testSendClusterMediaPlaybackReadAttributeSeekRangeStartWithCompletionHan [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterMediaPlaybackReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPMediaPlayback * cluster = [[CHIPMediaPlayback alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"MediaPlaybackReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"MediaPlayback AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterMediaPlaybackReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36788,7 +37607,80 @@ - (void)testSendClusterModeSelectReadAttributeSupportedModesWithCompletionHandle [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterModeSelectReadAttributeOnModeWithCompletionHandler +- (void)testSendClusterModeSelectReadAttributeOnModeWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeOnModeWithCompletionHandler"]; + + [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ModeSelect OnMode Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterModeSelectWriteAttributeOnModeWithValue +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectWriteAttributeOnModeWithValue"]; + + NSNumber * _Nonnull value = @(0); + [cluster writeAttributeOnModeWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"ModeSelect OnMode Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterModeSelectReadAttributeStartUpModeWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeStartUpModeWithCompletionHandler"]; + + [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ModeSelect StartUpMode Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterModeSelectReadAttributeDescriptionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36801,10 +37693,10 @@ - (void)testSendClusterModeSelectReadAttributeOnModeWithCompletionHandler CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeOnModeWithCompletionHandler"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeDescriptionWithCompletionHandler"]; - [cluster readAttributeOnModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ModeSelect OnMode Error: %@", err); + [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"ModeSelect Description Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -36812,7 +37704,7 @@ - (void)testSendClusterModeSelectReadAttributeOnModeWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterModeSelectWriteAttributeOnModeWithValue +- (void)testSendClusterModeSelectReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36825,19 +37717,19 @@ - (void)testSendClusterModeSelectWriteAttributeOnModeWithValue CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectWriteAttributeOnModeWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ModeSelectReadAttributeAttributeListWithCompletionHandler"]; - NSNumber * _Nonnull value = @(0); - [cluster writeAttributeOnModeWithValue:value - completionHandler:^(NSError * _Nullable err) { - NSLog(@"ModeSelect OnMode Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ModeSelect AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterModeSelectReadAttributeStartUpModeWithCompletionHandler + +- (void)testSendClusterModeSelectReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36850,10 +37742,11 @@ - (void)testSendClusterModeSelectReadAttributeStartUpModeWithCompletionHandler CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeStartUpModeWithCompletionHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"ModeSelectReadAttributeClusterRevisionWithCompletionHandler"]; - [cluster readAttributeStartUpModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ModeSelect StartUpMode Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"ModeSelect ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -36861,7 +37754,7 @@ - (void)testSendClusterModeSelectReadAttributeStartUpModeWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterModeSelectReadAttributeDescriptionWithCompletionHandler +- (void)testSendClusterNetworkCommissioningReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36871,13 +37764,14 @@ - (void)testSendClusterModeSelectReadAttributeDescriptionWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; CHIPDevice * device = GetConnectedDevice(); - CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPNetworkCommissioning * cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - XCTestExpectation * expectation = [self expectationWithDescription:@"ModeSelectReadAttributeDescriptionWithCompletionHandler"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"NetworkCommissioningReadAttributeAttributeListWithCompletionHandler"]; - [cluster readAttributeDescriptionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"ModeSelect Description Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"NetworkCommissioning AttributeList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -36885,7 +37779,7 @@ - (void)testSendClusterModeSelectReadAttributeDescriptionWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterModeSelectReadAttributeClusterRevisionWithCompletionHandler +- (void)testSendClusterNetworkCommissioningReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36895,14 +37789,14 @@ - (void)testSendClusterModeSelectReadAttributeClusterRevisionWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; CHIPDevice * device = GetConnectedDevice(); - CHIPModeSelect * cluster = [[CHIPModeSelect alloc] initWithDevice:device endpoint:1 queue:queue]; + CHIPNetworkCommissioning * cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"ModeSelectReadAttributeClusterRevisionWithCompletionHandler"]; + [self expectationWithDescription:@"NetworkCommissioningReadAttributeFeatureMapWithCompletionHandler"]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"ModeSelect ClusterRevision Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"NetworkCommissioning FeatureMap Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -36910,7 +37804,7 @@ - (void)testSendClusterModeSelectReadAttributeClusterRevisionWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterNetworkCommissioningReadAttributeFeatureMapWithCompletionHandler +- (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36924,10 +37818,10 @@ - (void)testSendClusterNetworkCommissioningReadAttributeFeatureMapWithCompletion XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"NetworkCommissioningReadAttributeFeatureMapWithCompletionHandler"]; + [self expectationWithDescription:@"NetworkCommissioningReadAttributeClusterRevisionWithCompletionHandler"]; - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"NetworkCommissioning FeatureMap Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"NetworkCommissioning ClusterRevision Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -36935,7 +37829,7 @@ - (void)testSendClusterNetworkCommissioningReadAttributeFeatureMapWithCompletion [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithCompletionHandler +- (void)testSendClusterOtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -36945,14 +37839,14 @@ - (void)testSendClusterNetworkCommissioningReadAttributeClusterRevisionWithCompl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; CHIPDevice * device = GetConnectedDevice(); - CHIPNetworkCommissioning * cluster = [[CHIPNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; + CHIPOtaSoftwareUpdateProvider * cluster = [[CHIPOtaSoftwareUpdateProvider alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"NetworkCommissioningReadAttributeClusterRevisionWithCompletionHandler"]; + [self expectationWithDescription:@"OtaSoftwareUpdateProviderReadAttributeAttributeListWithCompletionHandler"]; - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"NetworkCommissioning ClusterRevision Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OtaSoftwareUpdateProvider AttributeList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -37067,6 +37961,33 @@ - (void)testSendClusterOtaSoftwareUpdateRequestorReadAttributeUpdatePossibleWith [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOtaSoftwareUpdateRequestorReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOtaSoftwareUpdateRequestor * cluster = [[CHIPOtaSoftwareUpdateRequestor alloc] initWithDevice:device + endpoint:0 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OtaSoftwareUpdateRequestorReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OtaSoftwareUpdateRequestor AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOtaSoftwareUpdateRequestorReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37169,6 +38090,31 @@ - (void)testSendClusterOccupancySensingReadAttributeOccupancySensorTypeBitmapWit [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOccupancySensingReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOccupancySensing * cluster = [[CHIPOccupancySensing alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OccupancySensingReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OccupancySensing AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOccupancySensingReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37390,6 +38336,30 @@ - (void)testSendClusterOnOffWriteAttributeStartUpOnOffWithValue [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOnOffReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOnOff * cluster = [[CHIPOnOff alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"OnOffReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OnOff AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOnOffReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37514,6 +38484,31 @@ - (void)testSendClusterOnOffSwitchConfigurationWriteAttributeSwitchActionsWithVa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOnOffSwitchConfigurationReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOnOffSwitchConfiguration * cluster = [[CHIPOnOffSwitchConfiguration alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OnOffSwitchConfigurationReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OnOffSwitchConfiguration AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOnOffSwitchConfigurationReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37664,6 +38659,31 @@ - (void)testSendClusterOperationalCredentialsReadAttributeCurrentFabricIndexWith [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOperationalCredentialsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OperationalCredentialsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OperationalCredentials AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOperationalCredentialsReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37911,6 +38931,31 @@ - (void)testSendClusterPowerSourceReadAttributeBatteryChargeStateWithCompletionH [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterPowerSourceReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPowerSource * cluster = [[CHIPPowerSource alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PowerSourceReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"PowerSource AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterPowerSourceReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -37985,6 +39030,31 @@ - (void)testSendClusterPowerSourceConfigurationReadAttributeSourcesWithCompletio [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterPowerSourceConfigurationReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPowerSourceConfiguration * cluster = [[CHIPPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PowerSourceConfigurationReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"PowerSourceConfiguration AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterPowerSourceConfigurationReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -38085,6 +39155,31 @@ - (void)testSendClusterPressureMeasurementReadAttributeMaxMeasuredValueWithCompl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterPressureMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PressureMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"PressureMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterPressureMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -38859,10 +39954,37 @@ - (void)testSendClusterPumpConfigurationAndControlReadAttributeAlarmMaskWithComp XCTAssertNotNil(cluster); XCTestExpectation * expectation = - [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeAlarmMaskWithCompletionHandler"]; + [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeAlarmMaskWithCompletionHandler"]; + + [cluster readAttributeAlarmMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl AlarmMask Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + +- (void)testSendClusterPumpConfigurationAndControlReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPPumpConfigurationAndControl * cluster = [[CHIPPumpConfigurationAndControl alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeAttributeListWithCompletionHandler"]; - [cluster readAttributeAlarmMaskWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"PumpConfigurationAndControl AlarmMask Error: %@", err); + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl AttributeList Error: %@", err); XCTAssertEqual(err.code, 0); [expectation fulfill]; }]; @@ -39032,6 +40154,33 @@ - (void)testSendClusterRelativeHumidityMeasurementReadAttributeToleranceWithComp [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterRelativeHumidityMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPRelativeHumidityMeasurement * cluster = [[CHIPRelativeHumidityMeasurement alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"RelativeHumidityMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"RelativeHumidityMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterRelativeHumidityMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39179,6 +40328,30 @@ - (void)testSendClusterScenesReadAttributeNameSupportWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterScenesReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPScenes * cluster = [[CHIPScenes alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"ScenesReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Scenes AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterScenesReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39303,6 +40476,31 @@ - (void)testSendClusterSoftwareDiagnosticsReadAttributeCurrentHeapHighWatermarkW [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterSoftwareDiagnosticsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPSoftwareDiagnostics * cluster = [[CHIPSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"SoftwareDiagnosticsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"SoftwareDiagnostics AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterSoftwareDiagnosticsReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39426,6 +40624,30 @@ - (void)testSendClusterSwitchReadAttributeMultiPressMaxWithCompletionHandler [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterSwitchReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPSwitch * cluster = [[CHIPSwitch alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"SwitchReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Switch AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterSwitchReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39548,6 +40770,30 @@ - (void)testSendClusterTvChannelReadAttributeCurrentTvChannelWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTvChannelReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPTvChannel * cluster = [[CHIPTvChannel alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"TvChannelReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TvChannel AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTvChannelReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39598,6 +40844,31 @@ - (void)testSendClusterTargetNavigatorReadAttributeTargetNavigatorListWithComple [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTargetNavigatorReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPTargetNavigator * cluster = [[CHIPTargetNavigator alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"TargetNavigatorReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TargetNavigator AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTargetNavigatorReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39723,6 +40994,31 @@ - (void)testSendClusterTemperatureMeasurementReadAttributeToleranceWithCompletio [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTemperatureMeasurementReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPTemperatureMeasurement * cluster = [[CHIPTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"TemperatureMeasurementReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TemperatureMeasurement AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTemperatureMeasurementReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -39918,6 +41214,33 @@ - (void)testSendClusterThermostatUserInterfaceConfigurationWriteAttributeSchedul [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterThermostatUserInterfaceConfigurationReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPThermostatUserInterfaceConfiguration * cluster = [[CHIPThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpoint:1 + queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ThermostatUserInterfaceConfigurationReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ThermostatUserInterfaceConfiguration AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterThermostatUserInterfaceConfigurationReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41522,6 +42845,31 @@ - (void)testSendClusterThreadNetworkDiagnosticsReadAttributeActiveNetworkFaultsL [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterThreadNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPThreadNetworkDiagnostics * cluster = [[CHIPThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"ThreadNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"ThreadNetworkDiagnostics AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterThreadNetworkDiagnosticsReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41597,6 +42945,30 @@ - (void)testSendClusterWakeOnLanReadAttributeWakeOnLanMacAddressWithCompletionHa [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterWakeOnLanReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPWakeOnLan * cluster = [[CHIPWakeOnLan alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"WakeOnLanReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"WakeOnLan AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterWakeOnLanReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -41947,6 +43319,31 @@ - (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeOverrunCountWithComple [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPWiFiNetworkDiagnostics * cluster = [[CHIPWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"WiFiNetworkDiagnosticsReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"WiFiNetworkDiagnostics AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterWiFiNetworkDiagnosticsReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -42476,6 +43873,31 @@ - (void)testSendClusterWindowCoveringReadAttributeSafetyStatusWithCompletionHand [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterWindowCoveringReadAttributeAttributeListWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPWindowCovering * cluster = [[CHIPWindowCovering alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"WindowCoveringReadAttributeAttributeListWithCompletionHandler"]; + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"WindowCovering AttributeList Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterWindowCoveringReadAttributeFeatureMapWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/src/lib/core/DataModelTypes.h b/src/lib/core/DataModelTypes.h index 8a812302698b94..406818a96abf22 100644 --- a/src/lib/core/DataModelTypes.h +++ b/src/lib/core/DataModelTypes.h @@ -47,4 +47,10 @@ static constexpr FabricIndex kUndefinedFabricIndex = 0; static constexpr EndpointId kInvalidEndpointId = 0xFFFF; static constexpr ListIndex kInvalidListIndex = 0xFFFF; // List index is a uint16 thus 0xFFFF is a invalid list index. +// ClusterId, AttributeId and EventId are MEIs, +// 0xFFFF is not a valid manufacturer code, thus 0xFFFF'FFFF is not a valid MEI. +static constexpr ClusterId kInvalidClusterId = 0xFFFF'FFFF; +static constexpr AttributeId kInvalidAttributeId = 0xFFFF'FFFF; +static constexpr EventId kInvalidEventId = 0xFFFF'FFFF; + } // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 39a0b10475a9b9..4290eb296f5e09 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -21,6 +21,7 @@ #pragma once // Global cluster attribute ids +#define ZCL_ATTRIBUTE_LIST_SERVER_ATTRIBUTE_ID (0xFFFB) #define ZCL_FEATURE_MAP_CLIENT_ATTRIBUTE_ID (0xFFFC) #define ZCL_FEATURE_MAP_SERVER_ATTRIBUTE_ID (0xFFFC) #define ZCL_CLUSTER_REVISION_CLIENT_ATTRIBUTE_ID (0xFFFD) diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 78df546cad4437..416c6feb39f85f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -724,6 +724,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Battery3AlarmState +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -861,6 +873,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace HighTempDwellTripPoint +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DeviceTemperatureConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -1112,6 +1136,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace IdentifyType +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Identify::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -1548,6 +1584,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace NameSupport +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Groups::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -2520,6 +2568,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LastConfiguredBy +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -2874,6 +2934,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace StartUpOnOff +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -2927,6 +2999,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SwitchActions +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -3493,6 +3577,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace StartUpCurrentLevel +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -3767,6 +3863,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AlarmCount +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Alarms::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -3916,6 +4024,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ValidUntilTime +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Time::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -4053,6 +4173,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ApplicationType +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5084,6 +5216,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ScheduleMode +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerProfile::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5509,6 +5653,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RemainingTime +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplianceControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5538,6 +5694,18 @@ struct TypeInfo namespace PulseWidthModulation { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5638,6 +5806,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace PartsList +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5767,6 +5947,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -5915,6 +6107,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Extension +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -6216,6 +6420,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace FastPollTimeoutMax +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PollControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -6895,6 +7111,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SetupUrl +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedActions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -7276,6 +7504,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace UniqueID +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Basic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -7713,6 +7953,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -7867,6 +8119,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace UpdatePossible +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8018,6 +8282,18 @@ struct DecodableType namespace LocalizationConfiguration { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8047,6 +8323,18 @@ struct TypeInfo namespace LocalizationTimeFormat { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationTimeFormat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8076,6 +8364,18 @@ struct TypeInfo namespace LocalizationUnit { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationUnit::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8117,6 +8417,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Sources +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8518,6 +8830,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ActiveBatteryChargeFaults +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -8887,6 +9211,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LocationCapability +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -9677,6 +10013,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -9825,6 +10173,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -10065,6 +10425,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ActiveNetworkFaults +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -10377,6 +10749,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentHeapHighWatermark +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -11412,6 +11796,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ActiveNetworkFaultsList +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -11719,6 +12115,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace OverrunCount +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -12021,6 +12429,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace TimeSinceReset +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -12050,6 +12470,18 @@ struct TypeInfo namespace TimeSynchronization { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -12399,6 +12831,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace UniqueID +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -12464,6 +12908,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace MultiPressMax +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -12918,6 +13374,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AdminVendorId +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13594,6 +14062,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentFabricIndex +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13704,6 +14184,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace GroupKeys +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13768,6 +14260,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LabelList +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13832,6 +14336,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LabelList +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13861,6 +14377,18 @@ struct TypeInfo namespace ProxyConfiguration { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13890,6 +14418,18 @@ struct TypeInfo namespace ProxyDiscovery { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13919,6 +14459,18 @@ struct TypeInfo namespace ProxyValid { namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -13960,6 +14512,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace StateValue +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -14174,6 +14738,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Description +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -14263,6 +14839,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Mode +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ShadeConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -17145,6 +17733,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RFIDProgrammingEventMask +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -18023,6 +18623,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SafetyStatus +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -18250,6 +18862,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace BarrierPosition +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -18599,6 +19223,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AlarmMask +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -19953,6 +20589,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace AcCapacityFormat +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -20006,6 +20654,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace FanModeSequence +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FanControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -20131,6 +20791,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RelativeHumidityDisplay +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DehumidificationControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -20196,6 +20868,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ScheduleProgrammingVisibility +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThermostatUserInterfaceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -21897,6 +22581,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace StartUpColorTemperatureMireds +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22118,6 +22814,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LampBurnHoursTripPoint +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BallastConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22213,6 +22921,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LightSensorType +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::IlluminanceMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22290,6 +23010,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22427,6 +23159,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Scale +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PressureMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22504,6 +23248,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FlowMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22581,6 +23337,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::RelativeHumidityMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22754,6 +23522,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace PhysicalContactUnoccupiedToOccupiedThreshold +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22831,6 +23611,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonMonoxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22908,6 +23700,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::CarbonDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -22985,6 +23789,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::EthyleneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23062,6 +23878,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::EthyleneOxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23139,6 +23967,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::HydrogenConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23216,6 +24056,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::HydrogenSulphideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23293,6 +24145,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitricOxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23370,6 +24234,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::NitrogenDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23447,6 +24323,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OxygenConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23524,6 +24412,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OzoneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23601,6 +24501,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::SulfurDioxideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23678,6 +24590,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::DissolvedOxygenConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23755,6 +24679,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BromateConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23832,6 +24768,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ChloraminesConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23909,6 +24857,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ChlorineConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -23986,6 +24946,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FecalColiformAndEColiConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24063,6 +25035,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FluorideConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24140,6 +25124,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::HaloaceticAcidsConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24217,6 +25213,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalTrihalomethanesConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24294,6 +25302,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TotalColiformBacteriaConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24371,6 +25391,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TurbidityConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24448,6 +25480,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::CopperConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24525,6 +25569,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LeadConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24602,6 +25658,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ManganeseConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24679,6 +25747,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::SulfateConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24756,6 +25836,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BromodichloromethaneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24833,6 +25925,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::BromoformConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24910,6 +26014,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ChlorodibromomethaneConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -24987,6 +26103,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ChloroformConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -25064,6 +26192,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Tolerance +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::SodiumConcentrationMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -25505,6 +26645,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentZoneSensitivityLevel +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::IasZone::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -26460,6 +27612,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::IasAce::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -26608,6 +27772,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace MaxDuration +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::IasWd::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -26649,6 +27825,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace WakeOnLanMacAddress +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::WakeOnLan::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -26940,6 +28128,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentTvChannel +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TvChannel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -27111,6 +28311,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentNavigatorTarget +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TargetNavigator::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -28079,6 +29291,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SeekRangeStart +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::MediaPlayback::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -28332,6 +29556,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMediaInput +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::MediaInput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -28402,6 +29638,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LowPower::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -28622,6 +29870,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -29012,6 +30272,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SupportedStreamingTypes +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ContentLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -29191,6 +30463,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentAudioOutput +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::AudioOutput::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -29383,6 +30667,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ApplicationId +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationLauncher::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -29549,6 +30845,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ApplicationStatus +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplicationBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -29700,6 +31008,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -32215,6 +33535,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace NullableRangeRestrictedInt16s +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -32734,6 +34066,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Messaging::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -32907,6 +34251,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CecedSpecificationVersion +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplianceIdentification::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -33080,6 +34436,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace PowerThreshold +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -33294,6 +34662,18 @@ struct DecodableType } // namespace Commands namespace Attributes { +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplianceEventsAndAlert::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -33597,6 +34977,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace LogQueueMaxSize +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ApplianceStatistics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { @@ -35344,6 +36736,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RmsVoltageSwellPeriodPhaseC +namespace AttributeList { +struct TypeInfo +{ + using Type = DataModel::List; + using DecodableType = DataModel::DecodableList; + using DecodableArgType = const DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttributeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AttributeList namespace FeatureMap { struct TypeInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 686e311edc8967..4578f8d98ffb69 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -28,6 +28,10 @@ namespace Clusters { namespace Globals { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = 0x0000FFFB; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = 0x0000FFFC; } // namespace FeatureMap @@ -270,6 +274,10 @@ namespace Battery3AlarmState { static constexpr AttributeId Id = 0x0000007E; } // namespace Battery3AlarmState +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -320,6 +328,10 @@ namespace HighTempDwellTripPoint { static constexpr AttributeId Id = 0x00000014; } // namespace HighTempDwellTripPoint +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -342,6 +354,10 @@ namespace IdentifyType { static constexpr AttributeId Id = 0x00000001; } // namespace IdentifyType +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -360,6 +376,10 @@ namespace NameSupport { static constexpr AttributeId Id = 0x00000000; } // namespace NameSupport +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -398,6 +418,10 @@ namespace LastConfiguredBy { static constexpr AttributeId Id = 0x00000005; } // namespace LastConfiguredBy +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -432,6 +456,10 @@ namespace StartUpOnOff { static constexpr AttributeId Id = 0x00004003; } // namespace StartUpOnOff +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -454,6 +482,10 @@ namespace SwitchActions { static constexpr AttributeId Id = 0x00000010; } // namespace SwitchActions +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -524,6 +556,10 @@ namespace StartUpCurrentLevel { static constexpr AttributeId Id = 0x00004000; } // namespace StartUpCurrentLevel +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -542,6 +578,10 @@ namespace AlarmCount { static constexpr AttributeId Id = 0x00000000; } // namespace AlarmCount +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -596,6 +636,10 @@ namespace ValidUntilTime { static constexpr AttributeId Id = 0x00000009; } // namespace ValidUntilTime +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -646,6 +690,10 @@ namespace ApplicationType { static constexpr AttributeId Id = 0x00000100; } // namespace ApplicationType +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -680,6 +728,10 @@ namespace ScheduleMode { static constexpr AttributeId Id = 0x00000004; } // namespace ScheduleMode +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -706,6 +758,10 @@ namespace RemainingTime { static constexpr AttributeId Id = 0x00000002; } // namespace RemainingTime +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -720,6 +776,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace PulseWidthModulation { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -750,6 +810,10 @@ namespace PartsList { static constexpr AttributeId Id = 0x00000003; } // namespace PartsList +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -764,6 +828,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace Binding { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -786,6 +854,10 @@ namespace Extension { static constexpr AttributeId Id = 0x00000001; } // namespace Extension +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -828,6 +900,10 @@ namespace FastPollTimeoutMax { static constexpr AttributeId Id = 0x00000006; } // namespace FastPollTimeoutMax +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -854,6 +930,10 @@ namespace SetupUrl { static constexpr AttributeId Id = 0x00000002; } // namespace SetupUrl +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -944,6 +1024,10 @@ namespace UniqueID { static constexpr AttributeId Id = 0x00000012; } // namespace UniqueID +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -958,6 +1042,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace OtaSoftwareUpdateProvider { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -980,6 +1068,10 @@ namespace UpdatePossible { static constexpr AttributeId Id = 0x00000002; } // namespace UpdatePossible +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -994,6 +1086,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace LocalizationConfiguration { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1008,6 +1104,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace LocalizationTimeFormat { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1022,6 +1122,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace LocalizationUnit { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1040,6 +1144,10 @@ namespace Sources { static constexpr AttributeId Id = 0x00000000; } // namespace Sources +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1178,6 +1286,10 @@ namespace ActiveBatteryChargeFaults { static constexpr AttributeId Id = 0x0000001E; } // namespace ActiveBatteryChargeFaults +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1208,6 +1320,10 @@ namespace LocationCapability { static constexpr AttributeId Id = 0x00000003; } // namespace LocationCapability +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1222,6 +1338,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace NetworkCommissioning { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1236,6 +1356,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace DiagnosticLogs { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1282,6 +1406,10 @@ namespace ActiveNetworkFaults { static constexpr AttributeId Id = 0x00000007; } // namespace ActiveNetworkFaults +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1312,6 +1440,10 @@ namespace CurrentHeapHighWatermark { static constexpr AttributeId Id = 0x00000003; } // namespace CurrentHeapHighWatermark +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1578,6 +1710,10 @@ namespace ActiveNetworkFaultsList { static constexpr AttributeId Id = 0x0000003E; } // namespace ActiveNetworkFaultsList +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1644,6 +1780,10 @@ namespace OverrunCount { static constexpr AttributeId Id = 0x0000000C; } // namespace OverrunCount +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1694,6 +1834,10 @@ namespace TimeSinceReset { static constexpr AttributeId Id = 0x00000008; } // namespace TimeSinceReset +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1708,6 +1852,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace TimeSynchronization { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1782,6 +1930,10 @@ namespace UniqueID { static constexpr AttributeId Id = 0x00000012; } // namespace UniqueID +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1808,6 +1960,10 @@ namespace MultiPressMax { static constexpr AttributeId Id = 0x00000002; } // namespace MultiPressMax +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1834,6 +1990,10 @@ namespace AdminVendorId { static constexpr AttributeId Id = 0x00000002; } // namespace AdminVendorId +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1868,6 +2028,10 @@ namespace CurrentFabricIndex { static constexpr AttributeId Id = 0x00000005; } // namespace CurrentFabricIndex +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1890,6 +2054,10 @@ namespace GroupKeys { static constexpr AttributeId Id = 0x00000001; } // namespace GroupKeys +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1908,6 +2076,10 @@ namespace LabelList { static constexpr AttributeId Id = 0x00000000; } // namespace LabelList +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1926,6 +2098,10 @@ namespace LabelList { static constexpr AttributeId Id = 0x00000000; } // namespace LabelList +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1940,6 +2116,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace ProxyConfiguration { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1954,6 +2134,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace ProxyDiscovery { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1968,6 +2152,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace ProxyValid { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -1986,6 +2174,10 @@ namespace StateValue { static constexpr AttributeId Id = 0x00000000; } // namespace StateValue +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2020,6 +2212,10 @@ namespace Description { static constexpr AttributeId Id = 0x00000004; } // namespace Description +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2054,6 +2250,10 @@ namespace Mode { static constexpr AttributeId Id = 0x00000011; } // namespace Mode +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2248,6 +2448,10 @@ namespace RFIDProgrammingEventMask { static constexpr AttributeId Id = 0x00000047; } // namespace RFIDProgrammingEventMask +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2370,6 +2574,10 @@ namespace SafetyStatus { static constexpr AttributeId Id = 0x0000001A; } // namespace SafetyStatus +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2424,6 +2632,10 @@ namespace BarrierPosition { static constexpr AttributeId Id = 0x0000000A; } // namespace BarrierPosition +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2534,6 +2746,10 @@ namespace AlarmMask { static constexpr AttributeId Id = 0x00000022; } // namespace AlarmMask +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2720,6 +2936,10 @@ namespace AcCapacityFormat { static constexpr AttributeId Id = 0x00000047; } // namespace AcCapacityFormat +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2742,6 +2962,10 @@ namespace FanModeSequence { static constexpr AttributeId Id = 0x00000001; } // namespace FanModeSequence +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2788,6 +3012,10 @@ namespace RelativeHumidityDisplay { static constexpr AttributeId Id = 0x00000015; } // namespace RelativeHumidityDisplay +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -2814,6 +3042,10 @@ namespace ScheduleProgrammingVisibility { static constexpr AttributeId Id = 0x00000002; } // namespace ScheduleProgrammingVisibility +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3036,6 +3268,10 @@ namespace StartUpColorTemperatureMireds { static constexpr AttributeId Id = 0x00004010; } // namespace StartUpColorTemperatureMireds +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3114,6 +3350,10 @@ namespace LampBurnHoursTripPoint { static constexpr AttributeId Id = 0x00000035; } // namespace LampBurnHoursTripPoint +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3148,6 +3388,10 @@ namespace LightSensorType { static constexpr AttributeId Id = 0x00000004; } // namespace LightSensorType +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3178,6 +3422,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3228,6 +3476,10 @@ namespace Scale { static constexpr AttributeId Id = 0x00000014; } // namespace Scale +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3258,6 +3510,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3288,6 +3544,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3350,6 +3610,10 @@ namespace PhysicalContactUnoccupiedToOccupiedThreshold { static constexpr AttributeId Id = 0x00000032; } // namespace PhysicalContactUnoccupiedToOccupiedThreshold +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3380,6 +3644,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3410,6 +3678,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3440,6 +3712,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3470,6 +3746,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3500,6 +3780,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3530,6 +3814,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3560,6 +3848,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3590,6 +3882,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3620,6 +3916,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3650,6 +3950,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3680,6 +3984,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3710,6 +4018,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3740,6 +4052,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3770,6 +4086,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3800,6 +4120,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3830,6 +4154,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3860,6 +4188,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3890,6 +4222,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3920,6 +4256,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3950,6 +4290,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -3980,6 +4324,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4010,6 +4358,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4040,6 +4392,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4070,6 +4426,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4100,6 +4460,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4130,6 +4494,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4160,6 +4528,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4190,6 +4562,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4220,6 +4596,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4250,6 +4630,10 @@ namespace Tolerance { static constexpr AttributeId Id = 0x00000003; } // namespace Tolerance +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4292,6 +4676,10 @@ namespace CurrentZoneSensitivityLevel { static constexpr AttributeId Id = 0x00000013; } // namespace CurrentZoneSensitivityLevel +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4306,6 +4694,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace IasAce { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4324,6 +4716,10 @@ namespace MaxDuration { static constexpr AttributeId Id = 0x00000000; } // namespace MaxDuration +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4342,6 +4738,10 @@ namespace WakeOnLanMacAddress { static constexpr AttributeId Id = 0x00000000; } // namespace WakeOnLanMacAddress +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4368,6 +4768,10 @@ namespace CurrentTvChannel { static constexpr AttributeId Id = 0x00000002; } // namespace CurrentTvChannel +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4390,6 +4794,10 @@ namespace CurrentNavigatorTarget { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentNavigatorTarget +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4436,6 +4844,10 @@ namespace SeekRangeStart { static constexpr AttributeId Id = 0x00000007; } // namespace SeekRangeStart +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4458,6 +4870,10 @@ namespace CurrentMediaInput { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentMediaInput +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4472,6 +4888,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace LowPower { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4486,6 +4906,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace KeypadInput { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4508,6 +4932,10 @@ namespace SupportedStreamingTypes { static constexpr AttributeId Id = 0x00000001; } // namespace SupportedStreamingTypes +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4530,6 +4958,10 @@ namespace CurrentAudioOutput { static constexpr AttributeId Id = 0x00000001; } // namespace CurrentAudioOutput +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4556,6 +4988,10 @@ namespace ApplicationId { static constexpr AttributeId Id = 0x00000002; } // namespace ApplicationId +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4598,6 +5034,10 @@ namespace ApplicationStatus { static constexpr AttributeId Id = 0x00000007; } // namespace ApplicationStatus +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4612,6 +5052,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace AccountLogin { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4938,6 +5382,10 @@ namespace NullableRangeRestrictedInt16s { static constexpr AttributeId Id = 0x00008029; } // namespace NullableRangeRestrictedInt16s +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -4952,6 +5400,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace Messaging { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -5014,6 +5466,10 @@ namespace CecedSpecificationVersion { static constexpr AttributeId Id = 0x0000001A; } // namespace CecedSpecificationVersion +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -5076,6 +5532,10 @@ namespace PowerThreshold { static constexpr AttributeId Id = 0x0000000E; } // namespace PowerThreshold +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -5090,6 +5550,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace ApplianceEventsAndAlert { namespace Attributes { +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -5112,6 +5576,10 @@ namespace LogQueueMaxSize { static constexpr AttributeId Id = 0x00000001; } // namespace LogQueueMaxSize +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap @@ -5638,6 +6106,10 @@ namespace RmsVoltageSwellPeriodPhaseC { static constexpr AttributeId Id = 0x00000A17; } // namespace RmsVoltageSwellPeriodPhaseC +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; } // namespace FeatureMap diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 9e2455fcd3219f..040fc0bb02ab6d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3624,6 +3624,7 @@ static void OnTestClusterTestSpecificResponseSuccess( | Attributes: | | | * Acl | 0x0000 | | * Extension | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -3693,6 +3694,36 @@ class ReadAccessControlExtension : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadAccessControlAttributeList : public ModelCommand +{ +public: + ReadAccessControlAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadAccessControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::AccessControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "AccessControl.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -3731,6 +3762,7 @@ class ReadAccessControlClusterRevision : public ModelCommand | * Login | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -3783,6 +3815,36 @@ class AccountLoginLogin : public ModelCommand chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadAccountLoginAttributeList : public ModelCommand +{ +public: + ReadAccountLoginAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadAccountLoginAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050E) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::AccountLoginCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "AccountLogin.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -3877,6 +3939,7 @@ class ReportAccountLoginClusterRevision : public ModelCommand | * WindowStatus | 0x0000 | | * AdminFabricIndex | 0x0001 | | * AdminVendorId | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -4043,6 +4106,36 @@ class ReadAdministratorCommissioningAdminVendorId : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadAdministratorCommissioningAttributeList : public ModelCommand +{ +public: + ReadAdministratorCommissioningAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadAdministratorCommissioningAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003C) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::AdministratorCommissioningCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "AdministratorCommissioning.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -4139,6 +4232,7 @@ class ReportAdministratorCommissioningClusterRevision : public ModelCommand | * ApplicationId | 0x0005 | | * CatalogVendorId | 0x0006 | | * ApplicationStatus | 0x0007 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -4742,6 +4836,36 @@ class ReportApplicationBasicApplicationStatus : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadApplicationBasicAttributeList : public ModelCommand +{ +public: + ReadApplicationBasicAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadApplicationBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050D) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ApplicationBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ApplicationBasic.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -4834,6 +4958,7 @@ class ReportApplicationBasicClusterRevision : public ModelCommand | * ApplicationLauncherList | 0x0000 | | * CatalogVendorId | 0x0001 | | * ApplicationId | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -5057,6 +5182,36 @@ class ReportApplicationLauncherApplicationId : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadApplicationLauncherAttributeList : public ModelCommand +{ +public: + ReadApplicationLauncherAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadApplicationLauncherAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050C) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ApplicationLauncherCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ApplicationLauncher.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -5149,6 +5304,7 @@ class ReportApplicationLauncherClusterRevision : public ModelCommand | Attributes: | | | * AudioOutputList | 0x0000 | | * CurrentAudioOutput | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -5317,6 +5473,36 @@ class ReportAudioOutputCurrentAudioOutput : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadAudioOutputAttributeList : public ModelCommand +{ +public: + ReadAudioOutputAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadAudioOutputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::AudioOutputCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "AudioOutput.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -5411,6 +5597,7 @@ class ReportAudioOutputClusterRevision : public ModelCommand | * BarrierSafetyStatus | 0x0002 | | * BarrierCapabilities | 0x0003 | | * BarrierPosition | 0x000A | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -5789,6 +5976,36 @@ class ReportBarrierControlBarrierPosition : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadBarrierControlAttributeList : public ModelCommand +{ +public: + ReadBarrierControlAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBarrierControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0103) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BarrierControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "BarrierControl.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -5897,6 +6114,7 @@ class ReportBarrierControlClusterRevision : public ModelCommand | * LocalConfigDisabled | 0x0010 | | * Reachable | 0x0011 | | * UniqueID | 0x0012 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -7509,6 +7727,36 @@ class ReadBasicUniqueID : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadBasicAttributeList : public ModelCommand +{ +public: + ReadBasicAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0028) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Basic.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -7600,6 +7848,7 @@ class ReportBasicClusterRevision : public ModelCommand | * OutOfService | 0x0051 | | * PresentValue | 0x0055 | | * StatusFlags | 0x006F | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -7901,6 +8150,36 @@ class ReportBinaryInputBasicStatusFlags : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadBinaryInputBasicAttributeList : public ModelCommand +{ +public: + ReadBinaryInputBasicAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBinaryInputBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x000F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BinaryInputBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "BinaryInputBasic.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -7991,6 +8270,7 @@ class ReportBinaryInputBasicClusterRevision : public ModelCommand | * Unbind | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -8048,6 +8328,36 @@ class BindingUnbind : public ModelCommand chip::app::Clusters::Binding::Commands::Unbind::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadBindingAttributeList : public ModelCommand +{ +public: + ReadBindingAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBindingAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001E) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BindingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Binding.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -8137,6 +8447,7 @@ class ReportBindingClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * StateValue | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -8222,6 +8533,36 @@ class ReportBooleanStateStateValue : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadBooleanStateAttributeList : public ModelCommand +{ +public: + ReadBooleanStateAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBooleanStateAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0045) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BooleanStateCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "BooleanState.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -8325,6 +8666,7 @@ class ReportBooleanStateClusterRevision : public ModelCommand | * ActionList | 0x0000 | | * EndpointList | 0x0001 | | * SetupUrl | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -8781,6 +9123,36 @@ class ReportBridgedActionsSetupUrl : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadBridgedActionsAttributeList : public ModelCommand +{ +public: + ReadBridgedActionsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedActionsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0025) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedActionsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "BridgedActions.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -8869,9 +9241,40 @@ class ReportBridgedActionsClusterRevision : public ModelCommand | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ +/* + * Attribute AttributeList + */ +class ReadBridgedDeviceBasicAttributeList : public ModelCommand +{ +public: + ReadBridgedDeviceBasicAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadBridgedDeviceBasicAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0039) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::BridgedDeviceBasicCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "BridgedDeviceBasic.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -9031,6 +9434,7 @@ class ReportBridgedDeviceBasicClusterRevision : public ModelCommand | * ColorTempPhysicalMax | 0x400C | | * CoupleColorTempToLevelMinMireds | 0x400D | | * StartUpColorTemperatureMireds | 0x4010 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -14201,6 +14605,36 @@ class ReportColorControlStartUpColorTemperatureMireds : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadColorControlAttributeList : public ModelCommand +{ +public: + ReadColorControlAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadColorControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0300) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ColorControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ColorControl.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -14293,6 +14727,7 @@ class ReportColorControlClusterRevision : public ModelCommand | Attributes: | | | * AcceptsHeaderList | 0x0000 | | * SupportedStreamingTypes | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -14408,6 +14843,36 @@ class ReadContentLauncherSupportedStreamingTypes : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadContentLauncherAttributeList : public ModelCommand +{ +public: + ReadContentLauncherAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadContentLauncherAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050A) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ContentLauncherCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ContentLauncher.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -14500,6 +14965,7 @@ class ReportContentLauncherClusterRevision : public ModelCommand | * ServerList | 0x0001 | | * ClientList | 0x0002 | | * PartsList | 0x0003 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -14625,6 +15091,36 @@ class ReadDescriptorPartsList : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadDescriptorAttributeList : public ModelCommand +{ +public: + ReadDescriptorAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadDescriptorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x001D) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::DescriptorCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Descriptor.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -14714,6 +15210,7 @@ class ReportDescriptorClusterRevision : public ModelCommand | * RetrieveLogsRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | \*----------------------------------------------------------------------------*/ /* @@ -14744,6 +15241,36 @@ class DiagnosticLogsRetrieveLogsRequest : public ModelCommand chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadDiagnosticLogsAttributeList : public ModelCommand +{ +public: + ReadDiagnosticLogsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadDiagnosticLogsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0032) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::DiagnosticLogsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "DiagnosticLogs.AttributeList response", value); + } +}; + /*----------------------------------------------------------------------------*\ | Cluster DoorLock | 0x0101 | |------------------------------------------------------------------------------| @@ -14776,6 +15303,7 @@ class DiagnosticLogsRetrieveLogsRequest : public ModelCommand | * LockState | 0x0000 | | * LockType | 0x0001 | | * ActuatorEnabled | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -15436,6 +15964,36 @@ class ReportDoorLockActuatorEnabled : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadDoorLockAttributeList : public ModelCommand +{ +public: + ReadDoorLockAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadDoorLockAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0101) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::DoorLockCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "DoorLock.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -15535,6 +16093,7 @@ class ReportDoorLockClusterRevision : public ModelCommand | * ActivePower | 0x050B | | * ActivePowerMin | 0x050C | | * ActivePowerMax | 0x050D | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -16440,6 +16999,36 @@ class ReportElectricalMeasurementActivePowerMax : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadElectricalMeasurementAttributeList : public ModelCommand +{ +public: + ReadElectricalMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadElectricalMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0B04) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ElectricalMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ElectricalMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -16538,6 +17127,7 @@ class ReportElectricalMeasurementClusterRevision : public ModelCommand | * OverrunCount | 0x0006 | | * CarrierDetect | 0x0007 | | * TimeSinceReset | 0x0008 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -17300,6 +17890,36 @@ class ReportEthernetNetworkDiagnosticsTimeSinceReset : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadEthernetNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReadEthernetNetworkDiagnosticsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadEthernetNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0037) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::EthernetNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "EthernetNetworkDiagnostics.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -17419,6 +18039,7 @@ class ReportEthernetNetworkDiagnosticsClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * LabelList | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -17454,6 +18075,36 @@ class ReadFixedLabelLabelList : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadFixedLabelAttributeList : public ModelCommand +{ +public: + ReadFixedLabelAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadFixedLabelAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0040) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::FixedLabelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "FixedLabel.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -17546,6 +18197,7 @@ class ReportFixedLabelClusterRevision : public ModelCommand | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | | * Tolerance | 0x0003 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -17877,6 +18529,36 @@ class ReportFlowMeasurementTolerance : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadFlowMeasurementAttributeList : public ModelCommand +{ +public: + ReadFlowMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadFlowMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0404) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::FlowMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "FlowMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -17972,6 +18654,7 @@ class ReportFlowMeasurementClusterRevision : public ModelCommand | * BasicCommissioningInfoList | 0x0001 | | * RegulatoryConfig | 0x0002 | | * LocationCapability | 0x0003 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -18250,6 +18933,36 @@ class ReadGeneralCommissioningLocationCapability : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadGeneralCommissioningAttributeList : public ModelCommand +{ +public: + ReadGeneralCommissioningAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadGeneralCommissioningAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0030) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralCommissioningCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "GeneralCommissioning.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -18346,6 +19059,7 @@ class ReportGeneralCommissioningClusterRevision : public ModelCommand | * ActiveHardwareFaults | 0x0005 | | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -18801,6 +19515,36 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadGeneralDiagnosticsAttributeList : public ModelCommand +{ +public: + ReadGeneralDiagnosticsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadGeneralDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0033) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::GeneralDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "GeneralDiagnostics.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -18891,6 +19635,7 @@ class ReportGeneralDiagnosticsClusterRevision : public ModelCommand | Attributes: | | | * Groups | 0x0000 | | * GroupKeys | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -18960,6 +19705,36 @@ class ReadGroupKeyManagementGroupKeys : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadGroupKeyManagementAttributeList : public ModelCommand +{ +public: + ReadGroupKeyManagementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadGroupKeyManagementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupKeyManagementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "GroupKeyManagement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -19055,6 +19830,7 @@ class ReportGroupKeyManagementClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * NameSupport | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -19282,6 +20058,36 @@ class ReportGroupsNameSupport : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadGroupsAttributeList : public ModelCommand +{ +public: + ReadGroupsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadGroupsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0004) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::GroupsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Groups.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -19375,6 +20181,7 @@ class ReportGroupsClusterRevision : public ModelCommand | Attributes: | | | * IdentifyTime | 0x0000 | | * IdentifyType | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -19639,6 +20446,36 @@ class ReportIdentifyIdentifyType : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadIdentifyAttributeList : public ModelCommand +{ +public: + ReadIdentifyAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadIdentifyAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0003) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::IdentifyCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Identify.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -19732,6 +20569,7 @@ class ReportIdentifyClusterRevision : public ModelCommand | * MaxMeasuredValue | 0x0002 | | * Tolerance | 0x0003 | | * LightSensorType | 0x0004 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -20145,6 +20983,36 @@ class ReportIlluminanceMeasurementLightSensorType : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadIlluminanceMeasurementAttributeList : public ModelCommand +{ +public: + ReadIlluminanceMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadIlluminanceMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0400) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::IlluminanceMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "IlluminanceMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -20234,6 +21102,7 @@ class ReportIlluminanceMeasurementClusterRevision : public ModelCommand | * SendKey | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -20262,6 +21131,36 @@ class KeypadInputSendKey : public ModelCommand chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadKeypadInputAttributeList : public ModelCommand +{ +public: + ReadKeypadInputAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadKeypadInputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0509) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::KeypadInputCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "KeypadInput.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -20372,6 +21271,7 @@ class ReportKeypadInputClusterRevision : public ModelCommand | * OffTransitionTime | 0x0013 | | * DefaultMoveRate | 0x0014 | | * StartUpCurrentLevel | 0x4000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -21915,6 +22815,36 @@ class ReportLevelControlStartUpCurrentLevel : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadLevelControlAttributeList : public ModelCommand +{ +public: + ReadLevelControlAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "LevelControl.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -22004,6 +22934,7 @@ class ReportLevelControlClusterRevision : public ModelCommand | * Sleep | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -22027,6 +22958,36 @@ class LowPowerSleep : public ModelCommand chip::app::Clusters::LowPower::Commands::Sleep::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadLowPowerAttributeList : public ModelCommand +{ +public: + ReadLowPowerAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadLowPowerAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0508) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::LowPowerCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "LowPower.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -22121,6 +23082,7 @@ class ReportLowPowerClusterRevision : public ModelCommand | Attributes: | | | * MediaInputList | 0x0000 | | * CurrentMediaInput | 0x0001 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -22328,6 +23290,36 @@ class ReportMediaInputCurrentMediaInput : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadMediaInputAttributeList : public ModelCommand +{ +public: + ReadMediaInputAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadMediaInputAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0507) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaInputCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "MediaInput.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -22435,6 +23427,7 @@ class ReportMediaInputClusterRevision : public ModelCommand | * PlaybackSpeed | 0x0005 | | * SeekRangeEnd | 0x0006 | | * SeekRangeStart | 0x0007 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -23164,18 +24157,100 @@ class ReportMediaPlaybackPlaybackSpeed : public ModelCommand }; /* - * Attribute SeekRangeEnd + * Attribute SeekRangeEnd + */ +class ReadMediaPlaybackSeekRangeEnd : public ModelCommand +{ +public: + ReadMediaPlaybackSeekRangeEnd() : ModelCommand("read") + { + AddArgument("attr-name", "seek-range-end"); + ModelCommand::AddArguments(); + } + + ~ReadMediaPlaybackSeekRangeEnd() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint64_t value) + { + OnGeneralAttributeResponse(context, "MediaPlayback.SeekRangeEnd response", value); + } +}; + +class ReportMediaPlaybackSeekRangeEnd : public ModelCommand +{ +public: + ReportMediaPlaybackSeekRangeEnd() : ModelCommand("report") + { + AddArgument("attr-name", "seek-range-end"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportMediaPlaybackSeekRangeEnd() + { + delete onSuccessCallback; + delete onSuccessCallbackWithoutExit; + delete onFailureCallback; + delete onReportCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::MediaPlaybackCluster cluster; + cluster.Associate(device, endpointId); + + ReturnErrorOnFailure(cluster.ReportAttributeSeekRangeEnd(onReportCallback->Cancel())); + + chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); + return cluster.SubscribeAttributeSeekRangeEnd(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallbackWithoutExit = + new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnInt64uAttributeReport, this); + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/* + * Attribute SeekRangeStart */ -class ReadMediaPlaybackSeekRangeEnd : public ModelCommand +class ReadMediaPlaybackSeekRangeStart : public ModelCommand { public: - ReadMediaPlaybackSeekRangeEnd() : ModelCommand("read") + ReadMediaPlaybackSeekRangeStart() : ModelCommand("read") { - AddArgument("attr-name", "seek-range-end"); + AddArgument("attr-name", "seek-range-start"); ModelCommand::AddArguments(); } - ~ReadMediaPlaybackSeekRangeEnd() {} + ~ReadMediaPlaybackSeekRangeStart() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -23183,29 +24258,29 @@ class ReadMediaPlaybackSeekRangeEnd : public ModelCommand chip::Controller::MediaPlaybackCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } static void OnAttributeResponse(void * context, uint64_t value) { - OnGeneralAttributeResponse(context, "MediaPlayback.SeekRangeEnd response", value); + OnGeneralAttributeResponse(context, "MediaPlayback.SeekRangeStart response", value); } }; -class ReportMediaPlaybackSeekRangeEnd : public ModelCommand +class ReportMediaPlaybackSeekRangeStart : public ModelCommand { public: - ReportMediaPlaybackSeekRangeEnd() : ModelCommand("report") + ReportMediaPlaybackSeekRangeStart() : ModelCommand("report") { - AddArgument("attr-name", "seek-range-end"); + AddArgument("attr-name", "seek-range-start"); AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); AddArgument("wait", 0, 1, &mWait); ModelCommand::AddArguments(); } - ~ReportMediaPlaybackSeekRangeEnd() + ~ReportMediaPlaybackSeekRangeStart() { delete onSuccessCallback; delete onSuccessCallbackWithoutExit; @@ -23220,10 +24295,10 @@ class ReportMediaPlaybackSeekRangeEnd : public ModelCommand chip::Controller::MediaPlaybackCluster cluster; cluster.Associate(device, endpointId); - ReturnErrorOnFailure(cluster.ReportAttributeSeekRangeEnd(onReportCallback->Cancel())); + ReturnErrorOnFailure(cluster.ReportAttributeSeekRangeStart(onReportCallback->Cancel())); chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeSeekRangeEnd(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.SubscribeAttributeSeekRangeStart(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); } chip::System::Clock::Timeout GetWaitDuration() const override @@ -23246,18 +24321,18 @@ class ReportMediaPlaybackSeekRangeEnd : public ModelCommand }; /* - * Attribute SeekRangeStart + * Attribute AttributeList */ -class ReadMediaPlaybackSeekRangeStart : public ModelCommand +class ReadMediaPlaybackAttributeList : public ModelCommand { public: - ReadMediaPlaybackSeekRangeStart() : ModelCommand("read") + ReadMediaPlaybackAttributeList() : ModelCommand("read") { - AddArgument("attr-name", "seek-range-start"); + AddArgument("attr-name", "attribute-list"); ModelCommand::AddArguments(); } - ~ReadMediaPlaybackSeekRangeStart() {} + ~ReadMediaPlaybackAttributeList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -23265,68 +24340,16 @@ class ReadMediaPlaybackSeekRangeStart : public ModelCommand chip::Controller::MediaPlaybackCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( + return cluster.ReadAttribute( this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint64_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) { - OnGeneralAttributeResponse(context, "MediaPlayback.SeekRangeStart response", value); + OnGeneralAttributeResponse(context, "MediaPlayback.AttributeList response", value); } }; -class ReportMediaPlaybackSeekRangeStart : public ModelCommand -{ -public: - ReportMediaPlaybackSeekRangeStart() : ModelCommand("report") - { - AddArgument("attr-name", "seek-range-start"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportMediaPlaybackSeekRangeStart() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0506) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeSeekRangeStart(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeSeekRangeStart(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnInt64uAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; -}; - /* * Attribute ClusterRevision */ @@ -23421,6 +24444,7 @@ class ReportMediaPlaybackClusterRevision : public ModelCommand | * OnMode | 0x0002 | | * StartUpMode | 0x0003 | | * Description | 0x0004 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -23835,6 +24859,36 @@ class ReportModeSelectDescription : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadModeSelectAttributeList : public ModelCommand +{ +public: + ReadModeSelectAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadModeSelectAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0050) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ModeSelectCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ModeSelect.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -23931,6 +24985,7 @@ class ReportModeSelectClusterRevision : public ModelCommand | * UpdateWiFiNetwork | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -24145,6 +25200,36 @@ class NetworkCommissioningUpdateWiFiNetwork : public ModelCommand chip::app::Clusters::NetworkCommissioning::Commands::UpdateWiFiNetwork::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadNetworkCommissioningAttributeList : public ModelCommand +{ +public: + ReadNetworkCommissioningAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadNetworkCommissioningAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0031) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::NetworkCommissioningCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "NetworkCommissioning.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -24318,6 +25403,7 @@ class ReportNetworkCommissioningClusterRevision : public ModelCommand | * QueryImage | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -24402,6 +25488,36 @@ class OtaSoftwareUpdateProviderQueryImage : public ModelCommand chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; }; +/* + * Attribute AttributeList + */ +class ReadOtaSoftwareUpdateProviderAttributeList : public ModelCommand +{ +public: + ReadOtaSoftwareUpdateProviderAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOtaSoftwareUpdateProviderAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0029) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OtaSoftwareUpdateProvider.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -24493,6 +25609,7 @@ class ReportOtaSoftwareUpdateProviderClusterRevision : public ModelCommand | Attributes: | | | * DefaultOtaProvider | 0x0001 | | * UpdatePossible | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -24716,6 +25833,36 @@ class ReportOtaSoftwareUpdateRequestorUpdatePossible : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadOtaSoftwareUpdateRequestorAttributeList : public ModelCommand +{ +public: + ReadOtaSoftwareUpdateRequestorAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOtaSoftwareUpdateRequestorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002A) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OtaSoftwareUpdateRequestor.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -24807,6 +25954,7 @@ class ReportOtaSoftwareUpdateRequestorClusterRevision : public ModelCommand | * Occupancy | 0x0000 | | * OccupancySensorType | 0x0001 | | * OccupancySensorTypeBitmap | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -25058,6 +26206,36 @@ class ReportOccupancySensingOccupancySensorTypeBitmap : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadOccupancySensingAttributeList : public ModelCommand +{ +public: + ReadOccupancySensingAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOccupancySensingAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0406) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OccupancySensingCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OccupancySensing.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -25157,6 +26335,7 @@ class ReportOccupancySensingClusterRevision : public ModelCommand | * OnTime | 0x4001 | | * OffWaitTime | 0x4002 | | * StartUpOnOff | 0x4003 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -25784,6 +26963,36 @@ class ReportOnOffStartUpOnOff : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadOnOffAttributeList : public ModelCommand +{ +public: + ReadOnOffAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOnOffAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0006) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OnOffCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OnOff.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -25956,6 +27165,7 @@ class ReportOnOffClusterRevision : public ModelCommand | Attributes: | | | * SwitchType | 0x0000 | | * SwitchActions | 0x0010 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -26149,6 +27359,36 @@ class ReportOnOffSwitchConfigurationSwitchActions : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadOnOffSwitchConfigurationAttributeList : public ModelCommand +{ +public: + ReadOnOffSwitchConfigurationAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOnOffSwitchConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0007) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OnOffSwitchConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OnOffSwitchConfiguration.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -26251,6 +27491,7 @@ class ReportOnOffSwitchConfigurationClusterRevision : public ModelCommand | * CommissionedFabrics | 0x0003 | | * TrustedRootCertificates | 0x0004 | | * CurrentFabricIndex | 0x0005 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -26786,6 +28027,36 @@ class ReportOperationalCredentialsCurrentFabricIndex : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadOperationalCredentialsAttributeList : public ModelCommand +{ +public: + ReadOperationalCredentialsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadOperationalCredentialsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "OperationalCredentials.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -26883,6 +28154,7 @@ class ReportOperationalCredentialsClusterRevision : public ModelCommand | * BatteryChargeLevel | 0x000E | | * ActiveBatteryFaults | 0x0012 | | * BatteryChargeState | 0x001A | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -27577,6 +28849,36 @@ class ReportPowerSourceBatteryChargeState : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadPowerSourceAttributeList : public ModelCommand +{ +public: + ReadPowerSourceAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadPowerSourceAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "PowerSource.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -27748,6 +29050,7 @@ class ReportPowerSourceClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * Sources | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -27781,6 +29084,36 @@ class ReadPowerSourceConfigurationSources : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadPowerSourceConfigurationAttributeList : public ModelCommand +{ +public: + ReadPowerSourceConfigurationAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadPowerSourceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x002E) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PowerSourceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "PowerSourceConfiguration.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -27820,6 +29153,7 @@ class ReadPowerSourceConfigurationClusterRevision : public ModelCommand | * MeasuredValue | 0x0000 | | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -28069,6 +29403,36 @@ class ReportPressureMeasurementMaxMeasuredValue : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadPressureMeasurementAttributeList : public ModelCommand +{ +public: + ReadPressureMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadPressureMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0403) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PressureMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "PressureMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -28181,6 +29545,7 @@ class ReportPressureMeasurementClusterRevision : public ModelCommand | * OperationMode | 0x0020 | | * ControlMode | 0x0021 | | * AlarmMask | 0x0022 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -30264,6 +31629,36 @@ class ReportPumpConfigurationAndControlAlarmMask : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadPumpConfigurationAndControlAttributeList : public ModelCommand +{ +public: + ReadPumpConfigurationAndControlAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadPumpConfigurationAndControlAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0200) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "PumpConfigurationAndControl.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -30438,6 +31833,7 @@ class ReportPumpConfigurationAndControlClusterRevision : public ModelCommand | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | | * Tolerance | 0x0003 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -30769,6 +32165,36 @@ class ReportRelativeHumidityMeasurementTolerance : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadRelativeHumidityMeasurementAttributeList : public ModelCommand +{ +public: + ReadRelativeHumidityMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadRelativeHumidityMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0405) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::RelativeHumidityMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "RelativeHumidityMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -30869,6 +32295,7 @@ class ReportRelativeHumidityMeasurementClusterRevision : public ModelCommand | * CurrentGroup | 0x0002 | | * SceneValid | 0x0003 | | * NameSupport | 0x0004 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -31459,6 +32886,36 @@ class ReportScenesNameSupport : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadScenesAttributeList : public ModelCommand +{ +public: + ReadScenesAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadScenesAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0005) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ScenesCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Scenes.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -31552,6 +33009,7 @@ class ReportScenesClusterRevision : public ModelCommand | * CurrentHeapFree | 0x0001 | | * CurrentHeapUsed | 0x0002 | | * CurrentHeapHighWatermark | 0x0003 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -31856,6 +33314,36 @@ class ReportSoftwareDiagnosticsCurrentHeapHighWatermark : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadSoftwareDiagnosticsAttributeList : public ModelCommand +{ +public: + ReadSoftwareDiagnosticsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadSoftwareDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0034) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::SoftwareDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "SoftwareDiagnostics.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -31977,6 +33465,7 @@ class ReportSoftwareDiagnosticsClusterRevision : public ModelCommand | * NumberOfPositions | 0x0000 | | * CurrentPosition | 0x0001 | | * MultiPressMax | 0x0002 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -32228,6 +33717,36 @@ class ReportSwitchMultiPressMax : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadSwitchAttributeList : public ModelCommand +{ +public: + ReadSwitchAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadSwitchAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003B) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::SwitchCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Switch.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -32404,6 +33923,7 @@ class ReportSwitchClusterRevision : public ModelCommand | * TvChannelList | 0x0000 | | * TvChannelLineup | 0x0001 | | * CurrentTvChannel | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -32595,18 +34115,100 @@ class ReportTvChannelTvChannelLineup : public ModelCommand }; /* - * Attribute CurrentTvChannel + * Attribute CurrentTvChannel + */ +class ReadTvChannelCurrentTvChannel : public ModelCommand +{ +public: + ReadTvChannelCurrentTvChannel() : ModelCommand("read") + { + AddArgument("attr-name", "current-tv-channel"); + ModelCommand::AddArguments(); + } + + ~ReadTvChannelCurrentTvChannel() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, chip::ByteSpan value) + { + OnGeneralAttributeResponse(context, "TvChannel.CurrentTvChannel response", value); + } +}; + +class ReportTvChannelCurrentTvChannel : public ModelCommand +{ +public: + ReportTvChannelCurrentTvChannel() : ModelCommand("report") + { + AddArgument("attr-name", "current-tv-channel"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportTvChannelCurrentTvChannel() + { + delete onSuccessCallback; + delete onSuccessCallbackWithoutExit; + delete onFailureCallback; + delete onReportCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); + + chip::Controller::TvChannelCluster cluster; + cluster.Associate(device, endpointId); + + ReturnErrorOnFailure(cluster.ReportAttributeCurrentTvChannel(onReportCallback->Cancel())); + + chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); + return cluster.SubscribeAttributeCurrentTvChannel(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onSuccessCallbackWithoutExit = + new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + chip::Callback::Callback * onReportCallback = + new chip::Callback::Callback(OnOctetStringAttributeReport, this); + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + +/* + * Attribute AttributeList */ -class ReadTvChannelCurrentTvChannel : public ModelCommand +class ReadTvChannelAttributeList : public ModelCommand { public: - ReadTvChannelCurrentTvChannel() : ModelCommand("read") + ReadTvChannelAttributeList() : ModelCommand("read") { - AddArgument("attr-name", "current-tv-channel"); + AddArgument("attr-name", "attribute-list"); ModelCommand::AddArguments(); } - ~ReadTvChannelCurrentTvChannel() {} + ~ReadTvChannelAttributeList() {} CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override { @@ -32614,66 +34216,14 @@ class ReadTvChannelCurrentTvChannel : public ModelCommand chip::Controller::TvChannelCluster cluster; cluster.Associate(device, endpointId); - return cluster.ReadAttribute( - this, OnAttributeResponse, OnDefaultFailure); - } - - static void OnAttributeResponse(void * context, chip::ByteSpan value) - { - OnGeneralAttributeResponse(context, "TvChannel.CurrentTvChannel response", value); - } -}; - -class ReportTvChannelCurrentTvChannel : public ModelCommand -{ -public: - ReportTvChannelCurrentTvChannel() : ModelCommand("report") - { - AddArgument("attr-name", "current-tv-channel"); - AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); - AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); - AddArgument("wait", 0, 1, &mWait); - ModelCommand::AddArguments(); - } - - ~ReportTvChannelCurrentTvChannel() - { - delete onSuccessCallback; - delete onSuccessCallbackWithoutExit; - delete onFailureCallback; - delete onReportCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0504) command (0x06) on endpoint %" PRIu8, endpointId); - - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - - ReturnErrorOnFailure(cluster.ReportAttributeCurrentTvChannel(onReportCallback->Cancel())); - - chip::Callback::Cancelable * successCallback = mWait ? onSuccessCallbackWithoutExit->Cancel() : onSuccessCallback->Cancel(); - return cluster.SubscribeAttributeCurrentTvChannel(successCallback, onFailureCallback->Cancel(), mMinInterval, mMaxInterval); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); } - chip::System::Clock::Timeout GetWaitDuration() const override + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) { - return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + OnGeneralAttributeResponse(context, "TvChannel.AttributeList response", value); } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onSuccessCallbackWithoutExit = - new chip::Callback::Callback(OnDefaultSuccessResponseWithoutExit, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - chip::Callback::Callback * onReportCallback = - new chip::Callback::Callback(OnOctetStringAttributeReport, this); - uint16_t mMinInterval; - uint16_t mMaxInterval; - bool mWait; }; /* @@ -32766,6 +34316,7 @@ class ReportTvChannelClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * TargetNavigatorList | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -32827,6 +34378,36 @@ class ReadTargetNavigatorTargetNavigatorList : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadTargetNavigatorAttributeList : public ModelCommand +{ +public: + ReadTargetNavigatorAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadTargetNavigatorAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0505) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TargetNavigatorCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "TargetNavigator.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -32919,6 +34500,7 @@ class ReportTargetNavigatorClusterRevision : public ModelCommand | * MinMeasuredValue | 0x0001 | | * MaxMeasuredValue | 0x0002 | | * Tolerance | 0x0003 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -33250,6 +34832,36 @@ class ReportTemperatureMeasurementTolerance : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadTemperatureMeasurementAttributeList : public ModelCommand +{ +public: + ReadTemperatureMeasurementAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadTemperatureMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0402) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TemperatureMeasurementCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "TemperatureMeasurement.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -33433,6 +35045,7 @@ class ReportTemperatureMeasurementClusterRevision : public ModelCommand | * NullableRangeRestrictedInt8s | 0x8027 | | * NullableRangeRestrictedInt16u | 0x8028 | | * NullableRangeRestrictedInt16s | 0x8029 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -41394,6 +43007,36 @@ class ReportTestClusterNullableRangeRestrictedInt16s : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadTestClusterAttributeList : public ModelCommand +{ +public: + ReadTestClusterAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadTestClusterAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x050F) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::TestClusterCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "TestCluster.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -41504,6 +43147,7 @@ class ReportTestClusterClusterRevision : public ModelCommand | * StartOfWeek | 0x0020 | | * NumberOfWeeklyTransitions | 0x0021 | | * NumberOfDailyTransitions | 0x0022 | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -43274,6 +44918,36 @@ class ReportThermostatNumberOfDailyTransitions : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadThermostatAttributeList : public ModelCommand +{ +public: + ReadThermostatAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadThermostatAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0201) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ThermostatCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "Thermostat.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -43447,6 +45121,7 @@ class ReportThermostatClusterRevision : public ModelCommand | * TemperatureDisplayMode | 0x0000 | | * KeypadLockout | 0x0001 | | * ScheduleProgrammingVisibility | 0x0002 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -43782,6 +45457,37 @@ class ReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadThermostatUserInterfaceConfigurationAttributeList : public ModelCommand +{ +public: + ReadThermostatUserInterfaceConfigurationAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadThermostatUserInterfaceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0204) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; + cluster.Associate(device, endpointId); + return cluster + .ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ThermostatUserInterfaceConfiguration.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -43935,6 +45641,7 @@ class ReportThermostatUserInterfaceConfigurationClusterRevision : public ModelCo | * ChannelMask | 0x003C | | * OperationalDatasetComponents | 0x003D | | * ActiveNetworkFaultsList | 0x003E | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -48902,6 +50609,36 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ModelCommand } }; +/* + * Attribute AttributeList + */ +class ReadThreadNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReadThreadNetworkDiagnosticsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadThreadNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0035) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::ThreadNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "ThreadNetworkDiagnostics.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -49021,6 +50758,7 @@ class ReportThreadNetworkDiagnosticsClusterRevision : public ModelCommand |------------------------------------------------------------------------------| | Attributes: | | | * WakeOnLanMacAddress | 0x0000 | +| * AttributeList | 0xFFFB | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -49107,6 +50845,36 @@ class ReportWakeOnLanWakeOnLanMacAddress : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadWakeOnLanAttributeList : public ModelCommand +{ +public: + ReadWakeOnLanAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadWakeOnLanAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0503) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::WakeOnLanCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "WakeOnLan.AttributeList response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -49209,6 +50977,7 @@ class ReportWakeOnLanClusterRevision : public ModelCommand | * PacketUnicastTxCount | 0x000A | | * CurrentMaxRate | 0x000B | | * OverrunCount | 0x000C | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -50303,6 +52072,36 @@ class ReportWiFiNetworkDiagnosticsOverrunCount : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadWiFiNetworkDiagnosticsAttributeList : public ModelCommand +{ +public: + ReadWiFiNetworkDiagnosticsAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadWiFiNetworkDiagnosticsAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0036) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::WiFiNetworkDiagnosticsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "WiFiNetworkDiagnostics.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -50446,6 +52245,7 @@ class ReportWiFiNetworkDiagnosticsClusterRevision : public ModelCommand | * InstalledClosedLimitTilt | 0x0013 | | * Mode | 0x0017 | | * SafetyStatus | 0x001A | +| * AttributeList | 0xFFFB | | * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | \*----------------------------------------------------------------------------*/ @@ -52123,6 +53923,36 @@ class ReportWindowCoveringSafetyStatus : public ModelCommand bool mWait; }; +/* + * Attribute AttributeList + */ +class ReadWindowCoveringAttributeList : public ModelCommand +{ +public: + ReadWindowCoveringAttributeList() : ModelCommand("read") + { + AddArgument("attr-name", "attribute-list"); + ModelCommand::AddArguments(); + } + + ~ReadWindowCoveringAttributeList() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0102) command (0x00) on endpoint %" PRIu8, endpointId); + + chip::Controller::WindowCoveringCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, const chip::app::DataModel::DecodableList & value) + { + OnGeneralAttributeResponse(context, "WindowCovering.AttributeList response", value); + } +}; + /* * Attribute FeatureMap */ @@ -52297,6 +54127,7 @@ void registerClusterAccessControl(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // }; @@ -52309,6 +54140,7 @@ void registerClusterAccountLogin(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52326,6 +54158,7 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52352,6 +54185,7 @@ void registerClusterApplicationBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52369,6 +54203,7 @@ void registerClusterApplicationLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52385,6 +54220,7 @@ void registerClusterAudioOutput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52406,6 +54242,7 @@ void registerClusterBarrierControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52458,6 +54295,7 @@ void registerClusterBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52477,6 +54315,7 @@ void registerClusterBinaryInputBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52490,6 +54329,7 @@ void registerClusterBinding(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52503,6 +54343,7 @@ void registerClusterBooleanState(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52530,6 +54371,7 @@ void registerClusterBridgedActions(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52541,6 +54383,7 @@ void registerClusterBridgedDeviceBasic(Commands & commands) const char * clusterName = "BridgedDeviceBasic"; commands_list clusterCommands = { + make_unique(), // make_unique(), // make_unique(), // }; @@ -52688,6 +54531,7 @@ void registerClusterColorControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52703,6 +54547,7 @@ void registerClusterContentLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52718,6 +54563,7 @@ void registerClusterDescriptor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52730,6 +54576,7 @@ void registerClusterDiagnosticLogs(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -52764,6 +54611,7 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52797,6 +54645,7 @@ void registerClusterElectricalMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52827,6 +54676,7 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -52840,6 +54690,7 @@ void registerClusterFixedLabel(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52859,6 +54710,7 @@ void registerClusterFlowMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52879,6 +54731,7 @@ void registerClusterGeneralCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52902,6 +54755,7 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52915,6 +54769,7 @@ void registerClusterGroupKeyManagement(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52934,6 +54789,7 @@ void registerClusterGroups(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52953,6 +54809,7 @@ void registerClusterIdentify(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52974,6 +54831,7 @@ void registerClusterIlluminanceMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -52986,6 +54844,7 @@ void registerClusterKeypadInput(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53040,6 +54899,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53052,6 +54912,7 @@ void registerClusterLowPower(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53070,6 +54931,7 @@ void registerClusterMediaInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53108,6 +54970,7 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53130,6 +54993,7 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53149,6 +55013,7 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53165,6 +55030,7 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53182,6 +55048,7 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53199,6 +55066,7 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53229,6 +55097,7 @@ void registerClusterOnOff(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53247,6 +55116,7 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53275,6 +55145,7 @@ void registerClusterOperationalCredentials(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53303,6 +55174,7 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53317,6 +55189,7 @@ void registerClusterPowerSourceConfiguration(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // }; @@ -53333,6 +55206,7 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53396,6 +55270,7 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53417,6 +55292,7 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53445,6 +55321,7 @@ void registerClusterScenes(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53464,6 +55341,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53482,6 +55360,7 @@ void registerClusterSwitch(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53503,6 +55382,7 @@ void registerClusterTvChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53516,6 +55396,7 @@ void registerClusterTargetNavigator(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53535,6 +55416,7 @@ void registerClusterTemperatureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53774,6 +55656,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53833,6 +55716,7 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -53855,6 +55739,7 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -53988,6 +55873,7 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -54002,6 +55888,7 @@ void registerClusterWakeOnLan(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -54040,6 +55927,7 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -54096,6 +55984,7 @@ void registerClusterWindowCovering(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index c91a49f4c0f1d2..711df2959903d8 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -47785,6 +47785,10 @@ class TestBasicInformation : public TestCommand ChipLogProgress(chipTool, " ***** Test Step 4 : Restore initial location value\n"); err = TestRestoreInitialLocationValue_4(); break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read AttributeList value\n"); + err = TestReadAttributeListValue_5(); + break; } if (CHIP_NO_ERROR != err) @@ -47796,7 +47800,7 @@ class TestBasicInformation : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 6; static void OnFailureCallback_1(void * context, EmberAfStatus status) { @@ -47832,6 +47836,16 @@ class TestBasicInformation : public TestCommand static void OnSuccessCallback_4(void * context) { (static_cast(context))->OnSuccessResponse_4(); } + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(chip::to_underlying(status)); + } + + static void OnSuccessCallback_5(void * context, const chip::app::DataModel::DecodableList & attributeList) + { + (static_cast(context))->OnSuccessResponse_5(attributeList); + } + // // Tests methods // @@ -47915,6 +47929,68 @@ class TestBasicInformation : public TestCommand void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } void OnSuccessResponse_4() { NextTest(); } + + CHIP_ERROR TestReadAttributeListValue_5() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + chip::Controller::BasicClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + return cluster.ReadAttribute(this, OnSuccessCallback_5, + OnFailureCallback_5); + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(const chip::app::DataModel::DecodableList & attributeList) + { + auto iter = attributeList.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter.GetValue(), 4UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter.GetValue(), 5UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter.GetValue(), 6UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter.GetValue(), 7UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter.GetValue(), 8UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter.GetValue(), 9UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 10)); + VerifyOrReturn(CheckValue("attributeList[10]", iter.GetValue(), 10UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 11)); + VerifyOrReturn(CheckValue("attributeList[11]", iter.GetValue(), 11UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 12)); + VerifyOrReturn(CheckValue("attributeList[12]", iter.GetValue(), 12UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 13)); + VerifyOrReturn(CheckValue("attributeList[13]", iter.GetValue(), 13UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 14)); + VerifyOrReturn(CheckValue("attributeList[14]", iter.GetValue(), 14UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 15)); + VerifyOrReturn(CheckValue("attributeList[15]", iter.GetValue(), 15UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 16)); + VerifyOrReturn(CheckValue("attributeList[16]", iter.GetValue(), 16UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 17)); + VerifyOrReturn(CheckValue("attributeList[17]", iter.GetValue(), 17UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 18)); + VerifyOrReturn(CheckValue("attributeList[18]", iter.GetValue(), 18UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 19)); + VerifyOrReturn(CheckValue("attributeList[19]", iter.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter, 20)); + VerifyOrReturn(CheckValue("attributeList[20]", iter.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter, 21)); + + NextTest(); + } }; class TestIdentifyCluster : public TestCommand diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 2c970262d5df95..c82b88c229b4bf 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -174,11 +174,10 @@ void AccessControlClusterExtensionListAttributeFilter(TLV::TLVReader * tlvData, cb->mCall(cb->mContext, list); } -void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void AccessControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -191,15 +190,15 @@ void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::T return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void AccountLoginClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -212,15 +211,16 @@ void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvDa return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void BridgedActionsClusterActionListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void AdministratorCommissioningClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -233,15 +233,15 @@ void BridgedActionsClusterActionListListAttributeFilter(TLV::TLVReader * tlvData return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void BridgedActionsClusterEndpointListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ApplicationBasicClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -254,15 +254,16 @@ void BridgedActionsClusterEndpointListListAttributeFilter(TLV::TLVReader * tlvDa return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -275,16 +276,15 @@ void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ApplicationLauncherClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -297,15 +297,15 @@ void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVRe return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -318,15 +318,15 @@ void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Ca return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void AudioOutputClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -339,15 +339,15 @@ void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Ca return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BarrierControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -360,15 +360,15 @@ void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Ca return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BasicClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -381,15 +381,15 @@ void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Cal return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void FixedLabelClusterLabelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BinaryInputBasicClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -402,18 +402,15 @@ void FixedLabelClusterLabelListListAttributeFilter(TLV::TLVReader * tlvData, Cal return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BindingClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> - list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -426,16 +423,15 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BooleanStateClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -448,16 +444,15 @@ void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReade return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GeneralDiagnosticsClusterActiveHardwareFaultsListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BridgedActionsClusterActionListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -470,16 +465,15 @@ void GeneralDiagnosticsClusterActiveHardwareFaultsListAttributeFilter(TLV::TLVRe return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GeneralDiagnosticsClusterActiveRadioFaultsListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BridgedActionsClusterEndpointListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -492,16 +486,15 @@ void GeneralDiagnosticsClusterActiveRadioFaultsListAttributeFilter(TLV::TLVReade return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GeneralDiagnosticsClusterActiveNetworkFaultsListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BridgedActionsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -514,15 +507,15 @@ void GeneralDiagnosticsClusterActiveNetworkFaultsListAttributeFilter(TLV::TLVRea return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void BridgedDeviceBasicClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -535,15 +528,15 @@ void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ColorControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -556,15 +549,15 @@ void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvD return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -577,15 +570,16 @@ void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void ModeSelectClusterSupportedModesListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -598,15 +592,15 @@ void ModeSelectClusterSupportedModesListAttributeFilter(TLV::TLVReader * tlvData return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ContentLauncherClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -619,16 +613,15 @@ void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -641,15 +634,15 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(TLV return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -662,15 +655,15 @@ void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * t return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void PowerSourceConfigurationClusterSourcesListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -683,15 +676,15 @@ void PowerSourceConfigurationClusterSourcesListAttributeFilter(TLV::TLVReader * return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -704,15 +697,15 @@ void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(TLV::TLVReader * return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DescriptorClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -725,17 +718,15 @@ void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DiagnosticLogsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList - list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -748,15 +739,15 @@ void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void DoorLockClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -769,15 +760,16 @@ void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Ca return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void ElectricalMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -790,15 +782,16 @@ void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvDa return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TestClusterClusterListStructOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void EthernetNetworkDiagnosticsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -811,16 +804,15 @@ void TestClusterClusterListStructOctetStringListAttributeFilter(TLV::TLVReader * return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TestClusterClusterListNullablesAndOptionalsStructListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void FixedLabelClusterLabelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -833,15 +825,15 @@ void TestClusterClusterListNullablesAndOptionalsStructListAttributeFilter(TLV::T return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void TestClusterClusterListLongOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void FixedLabelClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -854,16 +846,15 @@ void TestClusterClusterListLongOctetStringListAttributeFilter(TLV::TLVReader * t return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void FlowMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -876,16 +867,1194 @@ void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(TLV::TL return; } - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); cb->mCall(cb->mContext, list); } -void ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter(TLV::TLVReader * tlvData, - Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::DataModel::DecodableList list; + chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> + list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralCommissioningClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralDiagnosticsClusterActiveHardwareFaultsListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralDiagnosticsClusterActiveRadioFaultsListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralDiagnosticsClusterActiveNetworkFaultsListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GeneralDiagnosticsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GroupKeyManagementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void GroupsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void IdentifyClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void IlluminanceMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void KeypadInputClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void LevelControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void LowPowerClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void MediaInputClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void MediaPlaybackClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ModeSelectClusterSupportedModesListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ModeSelectClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void NetworkCommissioningClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OtaSoftwareUpdateProviderClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OtaSoftwareUpdateRequestorClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OccupancySensingClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OnOffClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void OperationalCredentialsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PowerSourceClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PowerSourceConfigurationClusterSourcesListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PowerSourceConfigurationClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PressureMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void PumpConfigurationAndControlClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void RelativeHumidityMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ScenesClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void SoftwareDiagnosticsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void SwitchClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TvChannelClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList + list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TargetNavigatorClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TemperatureMeasurementClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterListStructOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterListNullablesAndOptionalsStructListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterListLongOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void TestClusterClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ThermostatClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ThermostatUserInterfaceConfigurationClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable( + onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -972,6 +2141,92 @@ void ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter(T cb->mCall(cb->mContext, list); } +void ThreadNetworkDiagnosticsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void WakeOnLanClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void WiFiNetworkDiagnosticsClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, + Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + +void WindowCoveringClusterAttributeListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + bool emberAfAccountLoginClusterGetSetupPINResponseCallback(EndpointId endpoint, app::CommandSender * commandObj, chip::CharSpan setupPIN) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 0ba9dbdc7634f9..e9d94f07b384f6 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -148,17 +148,69 @@ void AccessControlClusterExtensionListAttributeFilter(chip::TLV::TLVReader * dat typedef void (*AccessControlExtensionListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void AccessControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*AccessControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void AccountLoginClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void AdministratorCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherApplicationLauncherListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void AudioOutputClusterAudioOutputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputAudioOutputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void AudioOutputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void BarrierControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BarrierControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void BasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BasicAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void BinaryInputBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void BindingClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BindingAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void BooleanStateClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void BridgedActionsClusterActionListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsActionListListAttributeCallback)( @@ -171,6 +223,21 @@ typedef void (*BridgedActionsEndpointListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void BridgedActionsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BridgedActionsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void BridgedDeviceBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*BridgedDeviceBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ColorControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -182,6 +249,11 @@ void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(chip::TLV: typedef void (*ContentLauncherSupportedStreamingTypesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void DescriptorClusterDeviceListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorDeviceListListAttributeCallback)( @@ -199,11 +271,43 @@ void DescriptorClusterPartsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorPartsListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void DescriptorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void DiagnosticLogsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void DoorLockClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void ElectricalMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void EthernetNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void FixedLabelClusterLabelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*FixedLabelLabelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void FixedLabelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void FlowMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*FlowMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -211,6 +315,11 @@ typedef void (*GeneralCommissioningBasicCommissioningInfoListListAttributeCallba void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & data); +void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -233,6 +342,11 @@ void GeneralDiagnosticsClusterActiveNetworkFaultsListAttributeFilter(chip::TLV:: chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void GeneralDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void GroupKeyManagementClusterGroupsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementGroupsListAttributeCallback)( @@ -244,16 +358,89 @@ void GroupKeyManagementClusterGroupKeysListAttributeFilter(chip::TLV::TLVReader typedef void (*GroupKeyManagementGroupKeysListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void GroupKeyManagementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void GroupsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*GroupsAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void IdentifyClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void IlluminanceMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void LevelControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void LowPowerClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void MediaInputClusterMediaInputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputMediaInputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void MediaInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void MediaPlaybackClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*MediaPlaybackAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void ModeSelectClusterSupportedModesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void ModeSelectClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void NetworkCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*NetworkCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void OtaSoftwareUpdateProviderClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void OtaSoftwareUpdateRequestorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OtaSoftwareUpdateRequestorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void OccupancySensingClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OccupancySensingAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void OnOffClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OnOffAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void OperationalCredentialsClusterFabricsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -266,16 +453,49 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chi chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void OperationalCredentialsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceActiveBatteryFaultsListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void PowerSourceClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void PowerSourceConfigurationClusterSourcesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void PowerSourceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void PressureMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*PressureMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void PumpConfigurationAndControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void RelativeHumidityMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ScenesClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ScenesAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -283,11 +503,24 @@ typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void SoftwareDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*SwitchAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void TvChannelClusterTvChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*TvChannelTvChannelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void TvChannelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TvChannelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -295,6 +528,16 @@ typedef void (*TargetNavigatorTargetNavigatorListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & data); +void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void TemperatureMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void TestClusterClusterListInt8uListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, @@ -323,6 +566,19 @@ void TestClusterClusterListLongOctetStringListAttributeFilter(chip::TLV::TLVRead chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListLongOctetStringListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void TestClusterClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void ThermostatClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void ThermostatUserInterfaceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -356,3 +612,22 @@ void ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter(c chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void ThreadNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void WakeOnLanClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*WakeOnLanAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void WiFiNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void WindowCoveringClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*WindowCoveringAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data);