| /* |
| * |
| * Copyright (c) 2022 Project CHIP Authors |
| * All rights reserved. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| #include <controller/java/CHIPAttributeTLVValueDecoder.h> |
| |
| #include <app-common/zap-generated/cluster-objects.h> |
| #include <app-common/zap-generated/ids/Attributes.h> |
| #include <app-common/zap-generated/ids/Clusters.h> |
| #include <app/data-model/DecodableList.h> |
| #include <app/data-model/Decode.h> |
| #include <jni.h> |
| #include <lib/support/JniReferences.h> |
| #include <lib/support/JniTypeWrappers.h> |
| #include <lib/support/TypeTraits.h> |
| |
| namespace chip { |
| |
| jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) |
| { |
| JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); |
| CHIP_ERROR err = CHIP_NO_ERROR; |
| |
| switch (aPath.mClusterId) |
| { |
| case app::Clusters::Identify::Id: { |
| using namespace app::Clusters::Identify; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::IdentifyTime::Id: { |
| using TypeInfo = Attributes::IdentifyTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::IdentifyType::Id: { |
| using TypeInfo = Attributes::IdentifyType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Groups::Id: { |
| using namespace app::Clusters::Groups; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::NameSupport::Id: { |
| using TypeInfo = Attributes::NameSupport::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Scenes::Id: { |
| using namespace app::Clusters::Scenes; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SceneCount::Id: { |
| using TypeInfo = Attributes::SceneCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentScene::Id: { |
| using TypeInfo = Attributes::CurrentScene::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentGroup::Id: { |
| using TypeInfo = Attributes::CurrentGroup::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SceneValid::Id: { |
| using TypeInfo = Attributes::SceneValid::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::NameSupport::Id: { |
| using TypeInfo = Attributes::NameSupport::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LastConfiguredBy::Id: { |
| using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SceneTableSize::Id: { |
| using TypeInfo = Attributes::SceneTableSize::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RemainingCapacity::Id: { |
| using TypeInfo = Attributes::RemainingCapacity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OnOff::Id: { |
| using namespace app::Clusters::OnOff; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::OnOff::Id: { |
| using TypeInfo = Attributes::OnOff::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GlobalSceneControl::Id: { |
| using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::OnTime::Id: { |
| using TypeInfo = Attributes::OnTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OffWaitTime::Id: { |
| using TypeInfo = Attributes::OffWaitTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpOnOff::Id: { |
| using TypeInfo = Attributes::StartUpOnOff::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OnOffSwitchConfiguration::Id: { |
| using namespace app::Clusters::OnOffSwitchConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SwitchType::Id: { |
| using TypeInfo = Attributes::SwitchType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SwitchActions::Id: { |
| using TypeInfo = Attributes::SwitchActions::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::LevelControl::Id: { |
| using namespace app::Clusters::LevelControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::CurrentLevel::Id: { |
| using TypeInfo = Attributes::CurrentLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::RemainingTime::Id: { |
| using TypeInfo = Attributes::RemainingTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinLevel::Id: { |
| using TypeInfo = Attributes::MinLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxLevel::Id: { |
| using TypeInfo = Attributes::MaxLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentFrequency::Id: { |
| using TypeInfo = Attributes::CurrentFrequency::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinFrequency::Id: { |
| using TypeInfo = Attributes::MinFrequency::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxFrequency::Id: { |
| using TypeInfo = Attributes::MaxFrequency::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Options::Id: { |
| using TypeInfo = Attributes::Options::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OnOffTransitionTime::Id: { |
| using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OnLevel::Id: { |
| using TypeInfo = Attributes::OnLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OnTransitionTime::Id: { |
| using TypeInfo = Attributes::OnTransitionTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OffTransitionTime::Id: { |
| using TypeInfo = Attributes::OffTransitionTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::DefaultMoveRate::Id: { |
| using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::StartUpCurrentLevel::Id: { |
| using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BinaryInputBasic::Id: { |
| using namespace app::Clusters::BinaryInputBasic; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ActiveText::Id: { |
| using TypeInfo = Attributes::ActiveText::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::Description::Id: { |
| using TypeInfo = Attributes::Description::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::InactiveText::Id: { |
| using TypeInfo = Attributes::InactiveText::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::OutOfService::Id: { |
| using TypeInfo = Attributes::OutOfService::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Polarity::Id: { |
| using TypeInfo = Attributes::Polarity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PresentValue::Id: { |
| using TypeInfo = Attributes::PresentValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Reliability::Id: { |
| using TypeInfo = Attributes::Reliability::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StatusFlags::Id: { |
| using TypeInfo = Attributes::StatusFlags::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApplicationType::Id: { |
| using TypeInfo = Attributes::ApplicationType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::PulseWidthModulation::Id: { |
| using namespace app::Clusters::PulseWidthModulation; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Descriptor::Id: { |
| using namespace app::Clusters::Descriptor; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::DeviceTypeList::Id: { |
| using TypeInfo = Attributes::DeviceTypeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_deviceType; |
| std::string newElement_0_deviceTypeClassName = "java/lang/Long"; |
| std::string newElement_0_deviceTypeCtorSignature = "(J)V"; |
| jlong jninewElement_0_deviceType = static_cast<jlong>(entry_0.deviceType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_deviceTypeClassName.c_str(), |
| newElement_0_deviceTypeCtorSignature.c_str(), |
| jninewElement_0_deviceType, newElement_0_deviceType); |
| jobject newElement_0_revision; |
| std::string newElement_0_revisionClassName = "java/lang/Integer"; |
| std::string newElement_0_revisionCtorSignature = "(I)V"; |
| jint jninewElement_0_revision = static_cast<jint>(entry_0.revision); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_revisionClassName.c_str(), |
| newElement_0_revisionCtorSignature.c_str(), |
| jninewElement_0_revision, newElement_0_revision); |
| |
| jclass deviceTypeStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); |
| return nullptr; |
| } |
| jmethodID deviceTypeStructStructCtor_1 = |
| env->GetMethodID(deviceTypeStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); |
| if (deviceTypeStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, |
| newElement_0_revision); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ServerList::Id: { |
| using TypeInfo = Attributes::ServerList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ClientList::Id: { |
| using TypeInfo = Attributes::ClientList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::PartsList::Id: { |
| using TypeInfo = Attributes::PartsList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::TagList::Id: { |
| using TypeInfo = Attributes::TagList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_mfgCode; |
| if (entry_0.mfgCode.IsNull()) |
| { |
| newElement_0_mfgCode = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; |
| std::string newElement_0_mfgCodeCtorSignature = "(I)V"; |
| jint jninewElement_0_mfgCode = static_cast<jint>(entry_0.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_mfgCodeClassName.c_str(), |
| newElement_0_mfgCodeCtorSignature.c_str(), |
| jninewElement_0_mfgCode, newElement_0_mfgCode); |
| } |
| jobject newElement_0_namespaceID; |
| std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; |
| std::string newElement_0_namespaceIDCtorSignature = "(I)V"; |
| jint jninewElement_0_namespaceID = static_cast<jint>(entry_0.namespaceID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_namespaceIDClassName.c_str(), |
| newElement_0_namespaceIDCtorSignature.c_str(), |
| jninewElement_0_namespaceID, newElement_0_namespaceID); |
| jobject newElement_0_tag; |
| std::string newElement_0_tagClassName = "java/lang/Integer"; |
| std::string newElement_0_tagCtorSignature = "(I)V"; |
| jint jninewElement_0_tag = static_cast<jint>(entry_0.tag); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_tagClassName.c_str(), |
| newElement_0_tagCtorSignature.c_str(), |
| jninewElement_0_tag, newElement_0_tag); |
| jobject newElement_0_label; |
| if (!entry_0.label.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); |
| } |
| else |
| { |
| jobject newElement_0_labelInsideOptional; |
| if (entry_0.label.Value().IsNull()) |
| { |
| newElement_0_labelInsideOptional = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value().Value(), |
| newElement_0_labelInsideOptional)); |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); |
| } |
| |
| jclass semanticTagStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); |
| return nullptr; |
| } |
| jmethodID semanticTagStructStructCtor_1 = |
| env->GetMethodID(semanticTagStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V"); |
| if (semanticTagStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, |
| newElement_0_namespaceID, newElement_0_tag, newElement_0_label); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Binding::Id: { |
| using namespace app::Clusters::Binding; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Binding::Id: { |
| using TypeInfo = Attributes::Binding::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_node; |
| if (!entry_0.node.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_node); |
| } |
| else |
| { |
| jobject newElement_0_nodeInsideOptional; |
| std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; |
| std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; |
| jlong jninewElement_0_nodeInsideOptional = static_cast<jlong>(entry_0.node.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); |
| } |
| jobject newElement_0_group; |
| if (!entry_0.group.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_group); |
| } |
| else |
| { |
| jobject newElement_0_groupInsideOptional; |
| std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_groupInsideOptional = static_cast<jint>(entry_0.group.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); |
| } |
| jobject newElement_0_endpoint; |
| if (!entry_0.endpoint.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endpoint); |
| } |
| else |
| { |
| jobject newElement_0_endpointInsideOptional; |
| std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_endpointInsideOptional = static_cast<jint>(entry_0.endpoint.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_endpointInsideOptionalClassName.c_str(), |
| newElement_0_endpointInsideOptionalCtorSignature.c_str(), jninewElement_0_endpointInsideOptional, |
| newElement_0_endpointInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); |
| } |
| jobject newElement_0_cluster; |
| if (!entry_0.cluster.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_cluster); |
| } |
| else |
| { |
| jobject newElement_0_clusterInsideOptional; |
| std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; |
| std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; |
| jlong jninewElement_0_clusterInsideOptional = static_cast<jlong>(entry_0.cluster.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_clusterInsideOptionalClassName.c_str(), |
| newElement_0_clusterInsideOptionalCtorSignature.c_str(), jninewElement_0_clusterInsideOptional, |
| newElement_0_clusterInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); |
| } |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass targetStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", targetStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); |
| return nullptr; |
| } |
| jmethodID targetStructStructCtor_1 = env->GetMethodID( |
| targetStructStructClass_1, "<init>", |
| "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (targetStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = |
| env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, |
| newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::AccessControl::Id: { |
| using namespace app::Clusters::AccessControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Acl::Id: { |
| using TypeInfo = Attributes::Acl::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_privilege; |
| std::string newElement_0_privilegeClassName = "java/lang/Integer"; |
| std::string newElement_0_privilegeCtorSignature = "(I)V"; |
| jint jninewElement_0_privilege = static_cast<jint>(entry_0.privilege); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_privilegeClassName.c_str(), |
| newElement_0_privilegeCtorSignature.c_str(), |
| jninewElement_0_privilege, newElement_0_privilege); |
| jobject newElement_0_authMode; |
| std::string newElement_0_authModeClassName = "java/lang/Integer"; |
| std::string newElement_0_authModeCtorSignature = "(I)V"; |
| jint jninewElement_0_authMode = static_cast<jint>(entry_0.authMode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_authModeClassName.c_str(), |
| newElement_0_authModeCtorSignature.c_str(), |
| jninewElement_0_authMode, newElement_0_authMode); |
| jobject newElement_0_subjects; |
| if (entry_0.subjects.IsNull()) |
| { |
| newElement_0_subjects = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_subjects); |
| |
| auto iter_newElement_0_subjects_3 = entry_0.subjects.Value().begin(); |
| while (iter_newElement_0_subjects_3.Next()) |
| { |
| auto & entry_3 = iter_newElement_0_subjects_3.GetValue(); |
| jobject newElement_3; |
| std::string newElement_3ClassName = "java/lang/Long"; |
| std::string newElement_3CtorSignature = "(J)V"; |
| jlong jninewElement_3 = static_cast<jlong>(entry_3); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); |
| } |
| } |
| jobject newElement_0_targets; |
| if (entry_0.targets.IsNull()) |
| { |
| newElement_0_targets = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); |
| |
| auto iter_newElement_0_targets_3 = entry_0.targets.Value().begin(); |
| while (iter_newElement_0_targets_3.Next()) |
| { |
| auto & entry_3 = iter_newElement_0_targets_3.GetValue(); |
| jobject newElement_3; |
| jobject newElement_3_cluster; |
| if (entry_3.cluster.IsNull()) |
| { |
| newElement_3_cluster = nullptr; |
| } |
| else |
| { |
| std::string newElement_3_clusterClassName = "java/lang/Long"; |
| std::string newElement_3_clusterCtorSignature = "(J)V"; |
| jlong jninewElement_3_cluster = static_cast<jlong>(entry_3.cluster.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_3_clusterClassName.c_str(), newElement_3_clusterCtorSignature.c_str(), |
| jninewElement_3_cluster, newElement_3_cluster); |
| } |
| jobject newElement_3_endpoint; |
| if (entry_3.endpoint.IsNull()) |
| { |
| newElement_3_endpoint = nullptr; |
| } |
| else |
| { |
| std::string newElement_3_endpointClassName = "java/lang/Integer"; |
| std::string newElement_3_endpointCtorSignature = "(I)V"; |
| jint jninewElement_3_endpoint = static_cast<jint>(entry_3.endpoint.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_3_endpointClassName.c_str(), newElement_3_endpointCtorSignature.c_str(), |
| jninewElement_3_endpoint, newElement_3_endpoint); |
| } |
| jobject newElement_3_deviceType; |
| if (entry_3.deviceType.IsNull()) |
| { |
| newElement_3_deviceType = nullptr; |
| } |
| else |
| { |
| std::string newElement_3_deviceTypeClassName = "java/lang/Long"; |
| std::string newElement_3_deviceTypeCtorSignature = "(J)V"; |
| jlong jninewElement_3_deviceType = static_cast<jlong>(entry_3.deviceType.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), |
| jninewElement_3_deviceType, newElement_3_deviceType); |
| } |
| |
| jclass accessControlTargetStructStructClass_4; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", |
| accessControlTargetStructStructClass_4); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); |
| return nullptr; |
| } |
| jmethodID accessControlTargetStructStructCtor_4 = |
| env->GetMethodID(accessControlTargetStructStructClass_4, "<init>", |
| "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V"); |
| if (accessControlTargetStructStructCtor_4 == nullptr) |
| { |
| ChipLogError(Zcl, |
| "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, |
| newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); |
| } |
| } |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass accessControlEntryStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", |
| accessControlEntryStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); |
| return nullptr; |
| } |
| jmethodID accessControlEntryStructStructCtor_1 = env->GetMethodID( |
| accessControlEntryStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); |
| if (accessControlEntryStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, |
| newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, |
| newElement_0_targets, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::Extension::Id: { |
| using TypeInfo = Attributes::Extension::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_data; |
| jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast<jsize>(entry_0.data.size())); |
| env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast<jsize>(entry_0.data.size()), |
| reinterpret_cast<const jbyte *>(entry_0.data.data())); |
| newElement_0_data = newElement_0_dataByteArray; |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass accessControlExtensionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", |
| accessControlExtensionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); |
| return nullptr; |
| } |
| jmethodID accessControlExtensionStructStructCtor_1 = |
| env->GetMethodID(accessControlExtensionStructStructClass_1, "<init>", "([BLjava/lang/Integer;)V"); |
| if (accessControlExtensionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, |
| newElement_0_data, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SubjectsPerAccessControlEntry::Id: { |
| using TypeInfo = Attributes::SubjectsPerAccessControlEntry::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TargetsPerAccessControlEntry::Id: { |
| using TypeInfo = Attributes::TargetsPerAccessControlEntry::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AccessControlEntriesPerFabric::Id: { |
| using TypeInfo = Attributes::AccessControlEntriesPerFabric::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Actions::Id: { |
| using namespace app::Clusters::Actions; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ActionList::Id: { |
| using TypeInfo = Attributes::ActionList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_actionID; |
| std::string newElement_0_actionIDClassName = "java/lang/Integer"; |
| std::string newElement_0_actionIDCtorSignature = "(I)V"; |
| jint jninewElement_0_actionID = static_cast<jint>(entry_0.actionID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_actionIDClassName.c_str(), |
| newElement_0_actionIDCtorSignature.c_str(), |
| jninewElement_0_actionID, newElement_0_actionID); |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| jobject newElement_0_type; |
| std::string newElement_0_typeClassName = "java/lang/Integer"; |
| std::string newElement_0_typeCtorSignature = "(I)V"; |
| jint jninewElement_0_type = static_cast<jint>(entry_0.type); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_typeClassName.c_str(), |
| newElement_0_typeCtorSignature.c_str(), |
| jninewElement_0_type, newElement_0_type); |
| jobject newElement_0_endpointListID; |
| std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; |
| std::string newElement_0_endpointListIDCtorSignature = "(I)V"; |
| jint jninewElement_0_endpointListID = static_cast<jint>(entry_0.endpointListID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), |
| jninewElement_0_endpointListID, newElement_0_endpointListID); |
| jobject newElement_0_supportedCommands; |
| std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; |
| std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; |
| jint jninewElement_0_supportedCommands = static_cast<jint>(entry_0.supportedCommands.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), |
| jninewElement_0_supportedCommands, newElement_0_supportedCommands); |
| jobject newElement_0_state; |
| std::string newElement_0_stateClassName = "java/lang/Integer"; |
| std::string newElement_0_stateCtorSignature = "(I)V"; |
| jint jninewElement_0_state = static_cast<jint>(entry_0.state); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_stateClassName.c_str(), |
| newElement_0_stateCtorSignature.c_str(), |
| jninewElement_0_state, newElement_0_state); |
| |
| jclass actionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", actionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); |
| return nullptr; |
| } |
| jmethodID actionStructStructCtor_1 = |
| env->GetMethodID(actionStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" |
| "Integer;Ljava/lang/Integer;)V"); |
| if (actionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, |
| newElement_0_name, newElement_0_type, newElement_0_endpointListID, |
| newElement_0_supportedCommands, newElement_0_state); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EndpointLists::Id: { |
| using TypeInfo = Attributes::EndpointLists::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_endpointListID; |
| std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; |
| std::string newElement_0_endpointListIDCtorSignature = "(I)V"; |
| jint jninewElement_0_endpointListID = static_cast<jint>(entry_0.endpointListID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_endpointListIDClassName.c_str(), newElement_0_endpointListIDCtorSignature.c_str(), |
| jninewElement_0_endpointListID, newElement_0_endpointListID); |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| jobject newElement_0_type; |
| std::string newElement_0_typeClassName = "java/lang/Integer"; |
| std::string newElement_0_typeCtorSignature = "(I)V"; |
| jint jninewElement_0_type = static_cast<jint>(entry_0.type); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_typeClassName.c_str(), |
| newElement_0_typeCtorSignature.c_str(), |
| jninewElement_0_type, newElement_0_type); |
| jobject newElement_0_endpoints; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); |
| |
| auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); |
| while (iter_newElement_0_endpoints_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); |
| jobject newElement_2; |
| std::string newElement_2ClassName = "java/lang/Integer"; |
| std::string newElement_2CtorSignature = "(I)V"; |
| jint jninewElement_2 = static_cast<jint>(entry_2); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); |
| } |
| |
| jclass endpointListStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); |
| return nullptr; |
| } |
| jmethodID endpointListStructStructCtor_1 = |
| env->GetMethodID(endpointListStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (endpointListStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = |
| env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, |
| newElement_0_name, newElement_0_type, newElement_0_endpoints); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SetupURL::Id: { |
| using TypeInfo = Attributes::SetupURL::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BasicInformation::Id: { |
| using namespace app::Clusters::BasicInformation; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::DataModelRevision::Id: { |
| using TypeInfo = Attributes::DataModelRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::VendorName::Id: { |
| using TypeInfo = Attributes::VendorName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::VendorID::Id: { |
| using TypeInfo = Attributes::VendorID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ProductName::Id: { |
| using TypeInfo = Attributes::ProductName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductID::Id: { |
| using TypeInfo = Attributes::ProductID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NodeLabel::Id: { |
| using TypeInfo = Attributes::NodeLabel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::Location::Id: { |
| using TypeInfo = Attributes::Location::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::HardwareVersion::Id: { |
| using TypeInfo = Attributes::HardwareVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::HardwareVersionString::Id: { |
| using TypeInfo = Attributes::HardwareVersionString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::SoftwareVersion::Id: { |
| using TypeInfo = Attributes::SoftwareVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::SoftwareVersionString::Id: { |
| using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ManufacturingDate::Id: { |
| using TypeInfo = Attributes::ManufacturingDate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::PartNumber::Id: { |
| using TypeInfo = Attributes::PartNumber::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductURL::Id: { |
| using TypeInfo = Attributes::ProductURL::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductLabel::Id: { |
| using TypeInfo = Attributes::ProductLabel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::SerialNumber::Id: { |
| using TypeInfo = Attributes::SerialNumber::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::LocalConfigDisabled::Id: { |
| using TypeInfo = Attributes::LocalConfigDisabled::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Reachable::Id: { |
| using TypeInfo = Attributes::Reachable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::UniqueID::Id: { |
| using TypeInfo = Attributes::UniqueID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::CapabilityMinima::Id: { |
| using TypeInfo = Attributes::CapabilityMinima::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_caseSessionsPerFabric; |
| std::string value_caseSessionsPerFabricClassName = "java/lang/Integer"; |
| std::string value_caseSessionsPerFabricCtorSignature = "(I)V"; |
| jint jnivalue_caseSessionsPerFabric = static_cast<jint>(cppValue.caseSessionsPerFabric); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_caseSessionsPerFabricClassName.c_str(), |
| value_caseSessionsPerFabricCtorSignature.c_str(), |
| jnivalue_caseSessionsPerFabric, value_caseSessionsPerFabric); |
| jobject value_subscriptionsPerFabric; |
| std::string value_subscriptionsPerFabricClassName = "java/lang/Integer"; |
| std::string value_subscriptionsPerFabricCtorSignature = "(I)V"; |
| jint jnivalue_subscriptionsPerFabric = static_cast<jint>(cppValue.subscriptionsPerFabric); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_subscriptionsPerFabricClassName.c_str(), value_subscriptionsPerFabricCtorSignature.c_str(), |
| jnivalue_subscriptionsPerFabric, value_subscriptionsPerFabric); |
| |
| jclass capabilityMinimaStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$BasicInformationClusterCapabilityMinimaStruct", |
| capabilityMinimaStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterCapabilityMinimaStruct"); |
| return nullptr; |
| } |
| jmethodID capabilityMinimaStructStructCtor_0 = |
| env->GetMethodID(capabilityMinimaStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (capabilityMinimaStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterCapabilityMinimaStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(capabilityMinimaStructStructClass_0, capabilityMinimaStructStructCtor_0, |
| value_caseSessionsPerFabric, value_subscriptionsPerFabric); |
| return value; |
| } |
| case Attributes::ProductAppearance::Id: { |
| using TypeInfo = Attributes::ProductAppearance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_finish; |
| std::string value_finishClassName = "java/lang/Integer"; |
| std::string value_finishCtorSignature = "(I)V"; |
| jint jnivalue_finish = static_cast<jint>(cppValue.finish); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); |
| jobject value_primaryColor; |
| if (cppValue.primaryColor.IsNull()) |
| { |
| value_primaryColor = nullptr; |
| } |
| else |
| { |
| std::string value_primaryColorClassName = "java/lang/Integer"; |
| std::string value_primaryColorCtorSignature = "(I)V"; |
| jint jnivalue_primaryColor = static_cast<jint>(cppValue.primaryColor.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_primaryColorClassName.c_str(), |
| value_primaryColorCtorSignature.c_str(), |
| jnivalue_primaryColor, value_primaryColor); |
| } |
| |
| jclass productAppearanceStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$BasicInformationClusterProductAppearanceStruct", |
| productAppearanceStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterProductAppearanceStruct"); |
| return nullptr; |
| } |
| jmethodID productAppearanceStructStructCtor_0 = |
| env->GetMethodID(productAppearanceStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (productAppearanceStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterProductAppearanceStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, |
| value_primaryColor); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OtaSoftwareUpdateProvider::Id: { |
| using namespace app::Clusters::OtaSoftwareUpdateProvider; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OtaSoftwareUpdateRequestor::Id: { |
| using namespace app::Clusters::OtaSoftwareUpdateRequestor; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::DefaultOTAProviders::Id: { |
| using TypeInfo = Attributes::DefaultOTAProviders::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_providerNodeID; |
| std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; |
| std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; |
| jlong jninewElement_0_providerNodeID = static_cast<jlong>(entry_0.providerNodeID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_providerNodeIDClassName.c_str(), newElement_0_providerNodeIDCtorSignature.c_str(), |
| jninewElement_0_providerNodeID, newElement_0_providerNodeID); |
| jobject newElement_0_endpoint; |
| std::string newElement_0_endpointClassName = "java/lang/Integer"; |
| std::string newElement_0_endpointCtorSignature = "(I)V"; |
| jint jninewElement_0_endpoint = static_cast<jint>(entry_0.endpoint); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_endpointClassName.c_str(), |
| newElement_0_endpointCtorSignature.c_str(), |
| jninewElement_0_endpoint, newElement_0_endpoint); |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass providerLocationStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", |
| providerLocationStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); |
| return nullptr; |
| } |
| jmethodID providerLocationStructCtor_1 = env->GetMethodID( |
| providerLocationStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (providerLocationStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, |
| newElement_0_providerNodeID, newElement_0_endpoint, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::UpdatePossible::Id: { |
| using TypeInfo = Attributes::UpdatePossible::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::UpdateState::Id: { |
| using TypeInfo = Attributes::UpdateState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UpdateStateProgress::Id: { |
| using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::LocalizationConfiguration::Id: { |
| using namespace app::Clusters::LocalizationConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ActiveLocale::Id: { |
| using TypeInfo = Attributes::ActiveLocale::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::SupportedLocales::Id: { |
| using TypeInfo = Attributes::SupportedLocales::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TimeFormatLocalization::Id: { |
| using namespace app::Clusters::TimeFormatLocalization; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::HourFormat::Id: { |
| using TypeInfo = Attributes::HourFormat::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActiveCalendarType::Id: { |
| using TypeInfo = Attributes::ActiveCalendarType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportedCalendarTypes::Id: { |
| using TypeInfo = Attributes::SupportedCalendarTypes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::UnitLocalization::Id: { |
| using namespace app::Clusters::UnitLocalization; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::TemperatureUnit::Id: { |
| using TypeInfo = Attributes::TemperatureUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::PowerSourceConfiguration::Id: { |
| using namespace app::Clusters::PowerSourceConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Sources::Id: { |
| using TypeInfo = Attributes::Sources::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::PowerSource::Id: { |
| using namespace app::Clusters::PowerSource; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Status::Id: { |
| using TypeInfo = Attributes::Status::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Order::Id: { |
| using TypeInfo = Attributes::Order::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Description::Id: { |
| using TypeInfo = Attributes::Description::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::WiredAssessedInputVoltage::Id: { |
| using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WiredAssessedInputFrequency::Id: { |
| using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WiredCurrentType::Id: { |
| using TypeInfo = Attributes::WiredCurrentType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::WiredAssessedCurrent::Id: { |
| using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WiredNominalVoltage::Id: { |
| using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::WiredMaximumCurrent::Id: { |
| using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::WiredPresent::Id: { |
| using TypeInfo = Attributes::WiredPresent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ActiveWiredFaults::Id: { |
| using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::BatVoltage::Id: { |
| using TypeInfo = Attributes::BatVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BatPercentRemaining::Id: { |
| using TypeInfo = Attributes::BatPercentRemaining::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BatTimeRemaining::Id: { |
| using TypeInfo = Attributes::BatTimeRemaining::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BatChargeLevel::Id: { |
| using TypeInfo = Attributes::BatChargeLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatReplacementNeeded::Id: { |
| using TypeInfo = Attributes::BatReplacementNeeded::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::BatReplaceability::Id: { |
| using TypeInfo = Attributes::BatReplaceability::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatPresent::Id: { |
| using TypeInfo = Attributes::BatPresent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ActiveBatFaults::Id: { |
| using TypeInfo = Attributes::ActiveBatFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::BatReplacementDescription::Id: { |
| using TypeInfo = Attributes::BatReplacementDescription::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::BatCommonDesignation::Id: { |
| using TypeInfo = Attributes::BatCommonDesignation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatANSIDesignation::Id: { |
| using TypeInfo = Attributes::BatANSIDesignation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::BatIECDesignation::Id: { |
| using TypeInfo = Attributes::BatIECDesignation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::BatApprovedChemistry::Id: { |
| using TypeInfo = Attributes::BatApprovedChemistry::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatCapacity::Id: { |
| using TypeInfo = Attributes::BatCapacity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::BatQuantity::Id: { |
| using TypeInfo = Attributes::BatQuantity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatChargeState::Id: { |
| using TypeInfo = Attributes::BatChargeState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatTimeToFullCharge::Id: { |
| using TypeInfo = Attributes::BatTimeToFullCharge::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BatFunctionalWhileCharging::Id: { |
| using TypeInfo = Attributes::BatFunctionalWhileCharging::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::BatChargingCurrent::Id: { |
| using TypeInfo = Attributes::BatChargingCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ActiveBatChargeFaults::Id: { |
| using TypeInfo = Attributes::ActiveBatChargeFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EndpointList::Id: { |
| using TypeInfo = Attributes::EndpointList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::GeneralCommissioning::Id: { |
| using namespace app::Clusters::GeneralCommissioning; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Breadcrumb::Id: { |
| using TypeInfo = Attributes::Breadcrumb::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::BasicCommissioningInfo::Id: { |
| using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_failSafeExpiryLengthSeconds; |
| std::string value_failSafeExpiryLengthSecondsClassName = "java/lang/Integer"; |
| std::string value_failSafeExpiryLengthSecondsCtorSignature = "(I)V"; |
| jint jnivalue_failSafeExpiryLengthSeconds = static_cast<jint>(cppValue.failSafeExpiryLengthSeconds); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_failSafeExpiryLengthSecondsClassName.c_str(), value_failSafeExpiryLengthSecondsCtorSignature.c_str(), |
| jnivalue_failSafeExpiryLengthSeconds, value_failSafeExpiryLengthSeconds); |
| jobject value_maxCumulativeFailsafeSeconds; |
| std::string value_maxCumulativeFailsafeSecondsClassName = "java/lang/Integer"; |
| std::string value_maxCumulativeFailsafeSecondsCtorSignature = "(I)V"; |
| jint jnivalue_maxCumulativeFailsafeSeconds = static_cast<jint>(cppValue.maxCumulativeFailsafeSeconds); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_maxCumulativeFailsafeSecondsClassName.c_str(), value_maxCumulativeFailsafeSecondsCtorSignature.c_str(), |
| jnivalue_maxCumulativeFailsafeSeconds, value_maxCumulativeFailsafeSeconds); |
| |
| jclass basicCommissioningInfoStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo", |
| basicCommissioningInfoStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo"); |
| return nullptr; |
| } |
| jmethodID basicCommissioningInfoStructCtor_0 = |
| env->GetMethodID(basicCommissioningInfoStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (basicCommissioningInfoStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(basicCommissioningInfoStructClass_0, basicCommissioningInfoStructCtor_0, |
| value_failSafeExpiryLengthSeconds, value_maxCumulativeFailsafeSeconds); |
| return value; |
| } |
| case Attributes::RegulatoryConfig::Id: { |
| using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LocationCapability::Id: { |
| using TypeInfo = Attributes::LocationCapability::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportsConcurrentConnection::Id: { |
| using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::NetworkCommissioning::Id: { |
| using namespace app::Clusters::NetworkCommissioning; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MaxNetworks::Id: { |
| using TypeInfo = Attributes::MaxNetworks::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Networks::Id: { |
| using TypeInfo = Attributes::Networks::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_networkID; |
| jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast<jsize>(entry_0.networkID.size())); |
| env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast<jsize>(entry_0.networkID.size()), |
| reinterpret_cast<const jbyte *>(entry_0.networkID.data())); |
| newElement_0_networkID = newElement_0_networkIDByteArray; |
| jobject newElement_0_connected; |
| std::string newElement_0_connectedClassName = "java/lang/Boolean"; |
| std::string newElement_0_connectedCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_connected = static_cast<jboolean>(entry_0.connected); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(newElement_0_connectedClassName.c_str(), |
| newElement_0_connectedCtorSignature.c_str(), |
| jninewElement_0_connected, newElement_0_connected); |
| |
| jclass networkInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", |
| networkInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); |
| return nullptr; |
| } |
| jmethodID networkInfoStructStructCtor_1 = |
| env->GetMethodID(networkInfoStructStructClass_1, "<init>", "([BLjava/lang/Boolean;)V"); |
| if (networkInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, |
| newElement_0_connected); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ScanMaxTimeSeconds::Id: { |
| using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ConnectMaxTimeSeconds::Id: { |
| using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InterfaceEnabled::Id: { |
| using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::LastNetworkingStatus::Id: { |
| using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LastNetworkID::Id: { |
| using TypeInfo = Attributes::LastNetworkID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.Value().size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().data())); |
| value = valueByteArray; |
| } |
| return value; |
| } |
| case Attributes::LastConnectErrorValue::Id: { |
| using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SupportedWiFiBands::Id: { |
| using TypeInfo = Attributes::SupportedWiFiBands::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SupportedThreadFeatures::Id: { |
| using TypeInfo = Attributes::SupportedThreadFeatures::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ThreadVersion::Id: { |
| using TypeInfo = Attributes::ThreadVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::DiagnosticLogs::Id: { |
| using namespace app::Clusters::DiagnosticLogs; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::GeneralDiagnostics::Id: { |
| using namespace app::Clusters::GeneralDiagnostics; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::NetworkInterfaces::Id: { |
| using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| jobject newElement_0_isOperational; |
| std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; |
| std::string newElement_0_isOperationalCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_isOperational = static_cast<jboolean>(entry_0.isOperational); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_isOperationalClassName.c_str(), newElement_0_isOperationalCtorSignature.c_str(), |
| jninewElement_0_isOperational, newElement_0_isOperational); |
| jobject newElement_0_offPremiseServicesReachableIPv4; |
| if (entry_0.offPremiseServicesReachableIPv4.IsNull()) |
| { |
| newElement_0_offPremiseServicesReachableIPv4 = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; |
| std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; |
| jboolean jninewElement_0_offPremiseServicesReachableIPv4 = |
| static_cast<jboolean>(entry_0.offPremiseServicesReachableIPv4.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), |
| newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), |
| jninewElement_0_offPremiseServicesReachableIPv4, newElement_0_offPremiseServicesReachableIPv4); |
| } |
| jobject newElement_0_offPremiseServicesReachableIPv6; |
| if (entry_0.offPremiseServicesReachableIPv6.IsNull()) |
| { |
| newElement_0_offPremiseServicesReachableIPv6 = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; |
| std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; |
| jboolean jninewElement_0_offPremiseServicesReachableIPv6 = |
| static_cast<jboolean>(entry_0.offPremiseServicesReachableIPv6.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), |
| newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), |
| jninewElement_0_offPremiseServicesReachableIPv6, newElement_0_offPremiseServicesReachableIPv6); |
| } |
| jobject newElement_0_hardwareAddress; |
| jbyteArray newElement_0_hardwareAddressByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.hardwareAddress.size())); |
| env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, |
| static_cast<jsize>(entry_0.hardwareAddress.size()), |
| reinterpret_cast<const jbyte *>(entry_0.hardwareAddress.data())); |
| newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; |
| jobject newElement_0_IPv4Addresses; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv4Addresses); |
| |
| auto iter_newElement_0_IPv4Addresses_2 = entry_0.IPv4Addresses.begin(); |
| while (iter_newElement_0_IPv4Addresses_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_IPv4Addresses_2.GetValue(); |
| jobject newElement_2; |
| jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast<jsize>(entry_2.size())); |
| env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast<jsize>(entry_2.size()), |
| reinterpret_cast<const jbyte *>(entry_2.data())); |
| newElement_2 = newElement_2ByteArray; |
| chip::JniReferences::GetInstance().AddToList(newElement_0_IPv4Addresses, newElement_2); |
| } |
| jobject newElement_0_IPv6Addresses; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv6Addresses); |
| |
| auto iter_newElement_0_IPv6Addresses_2 = entry_0.IPv6Addresses.begin(); |
| while (iter_newElement_0_IPv6Addresses_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_IPv6Addresses_2.GetValue(); |
| jobject newElement_2; |
| jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast<jsize>(entry_2.size())); |
| env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast<jsize>(entry_2.size()), |
| reinterpret_cast<const jbyte *>(entry_2.data())); |
| newElement_2 = newElement_2ByteArray; |
| chip::JniReferences::GetInstance().AddToList(newElement_0_IPv6Addresses, newElement_2); |
| } |
| jobject newElement_0_type; |
| std::string newElement_0_typeClassName = "java/lang/Integer"; |
| std::string newElement_0_typeCtorSignature = "(I)V"; |
| jint jninewElement_0_type = static_cast<jint>(entry_0.type); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_typeClassName.c_str(), |
| newElement_0_typeCtorSignature.c_str(), |
| jninewElement_0_type, newElement_0_type); |
| |
| jclass networkInterfaceStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", |
| networkInterfaceStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); |
| return nullptr; |
| } |
| jmethodID networkInterfaceStructCtor_1 = |
| env->GetMethodID(networkInterfaceStructClass_1, "<init>", |
| "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/" |
| "ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); |
| if (networkInterfaceStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, |
| newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, |
| newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, |
| newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::RebootCount::Id: { |
| using TypeInfo = Attributes::RebootCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UpTime::Id: { |
| using TypeInfo = Attributes::UpTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TotalOperationalHours::Id: { |
| using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::BootReason::Id: { |
| using TypeInfo = Attributes::BootReason::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActiveHardwareFaults::Id: { |
| using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ActiveRadioFaults::Id: { |
| using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ActiveNetworkFaults::Id: { |
| using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::TestEventTriggersEnabled::Id: { |
| using TypeInfo = Attributes::TestEventTriggersEnabled::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::SoftwareDiagnostics::Id: { |
| using namespace app::Clusters::SoftwareDiagnostics; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ThreadMetrics::Id: { |
| using TypeInfo = Attributes::ThreadMetrics::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_id; |
| std::string newElement_0_idClassName = "java/lang/Long"; |
| std::string newElement_0_idCtorSignature = "(J)V"; |
| jlong jninewElement_0_id = static_cast<jlong>(entry_0.id); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); |
| jobject newElement_0_name; |
| if (!entry_0.name.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); |
| } |
| else |
| { |
| jobject newElement_0_nameInsideOptional; |
| LogErrorOnFailure( |
| chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); |
| } |
| jobject newElement_0_stackFreeCurrent; |
| if (!entry_0.stackFreeCurrent.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeCurrent); |
| } |
| else |
| { |
| jobject newElement_0_stackFreeCurrentInsideOptional; |
| std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; |
| std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; |
| jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast<jlong>(entry_0.stackFreeCurrent.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), |
| newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_stackFreeCurrentInsideOptional, newElement_0_stackFreeCurrentInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, |
| newElement_0_stackFreeCurrent); |
| } |
| jobject newElement_0_stackFreeMinimum; |
| if (!entry_0.stackFreeMinimum.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeMinimum); |
| } |
| else |
| { |
| jobject newElement_0_stackFreeMinimumInsideOptional; |
| std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; |
| std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; |
| jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast<jlong>(entry_0.stackFreeMinimum.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), |
| newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_stackFreeMinimumInsideOptional, newElement_0_stackFreeMinimumInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, |
| newElement_0_stackFreeMinimum); |
| } |
| jobject newElement_0_stackSize; |
| if (!entry_0.stackSize.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackSize); |
| } |
| else |
| { |
| jobject newElement_0_stackSizeInsideOptional; |
| std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; |
| std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; |
| jlong jninewElement_0_stackSizeInsideOptional = static_cast<jlong>(entry_0.stackSize.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_stackSizeInsideOptionalClassName.c_str(), |
| newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), jninewElement_0_stackSizeInsideOptional, |
| newElement_0_stackSizeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); |
| } |
| |
| jclass threadMetricsStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", |
| threadMetricsStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); |
| return nullptr; |
| } |
| jmethodID threadMetricsStructStructCtor_1 = env->GetMethodID( |
| threadMetricsStructStructClass_1, "<init>", |
| "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (threadMetricsStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, |
| newElement_0_name, newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, |
| newElement_0_stackSize); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentHeapFree::Id: { |
| using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::CurrentHeapUsed::Id: { |
| using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::CurrentHeapHighWatermark::Id: { |
| using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ThreadNetworkDiagnostics::Id: { |
| using namespace app::Clusters::ThreadNetworkDiagnostics; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Channel::Id: { |
| using TypeInfo = Attributes::Channel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::RoutingRole::Id: { |
| using TypeInfo = Attributes::RoutingRole::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NetworkName::Id: { |
| using TypeInfo = Attributes::NetworkName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); |
| } |
| return value; |
| } |
| case Attributes::PanId::Id: { |
| using TypeInfo = Attributes::PanId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ExtendedPanId::Id: { |
| using TypeInfo = Attributes::ExtendedPanId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MeshLocalPrefix::Id: { |
| using TypeInfo = Attributes::MeshLocalPrefix::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.Value().size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().data())); |
| value = valueByteArray; |
| } |
| return value; |
| } |
| case Attributes::OverrunCount::Id: { |
| using TypeInfo = Attributes::OverrunCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::NeighborTable::Id: { |
| using TypeInfo = Attributes::NeighborTable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_extAddress; |
| std::string newElement_0_extAddressClassName = "java/lang/Long"; |
| std::string newElement_0_extAddressCtorSignature = "(J)V"; |
| jlong jninewElement_0_extAddress = static_cast<jlong>(entry_0.extAddress); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_extAddressClassName.c_str(), |
| newElement_0_extAddressCtorSignature.c_str(), |
| jninewElement_0_extAddress, newElement_0_extAddress); |
| jobject newElement_0_age; |
| std::string newElement_0_ageClassName = "java/lang/Long"; |
| std::string newElement_0_ageCtorSignature = "(J)V"; |
| jlong jninewElement_0_age = static_cast<jlong>(entry_0.age); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_ageClassName.c_str(), |
| newElement_0_ageCtorSignature.c_str(), |
| jninewElement_0_age, newElement_0_age); |
| jobject newElement_0_rloc16; |
| std::string newElement_0_rloc16ClassName = "java/lang/Integer"; |
| std::string newElement_0_rloc16CtorSignature = "(I)V"; |
| jint jninewElement_0_rloc16 = static_cast<jint>(entry_0.rloc16); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_rloc16ClassName.c_str(), |
| newElement_0_rloc16CtorSignature.c_str(), |
| jninewElement_0_rloc16, newElement_0_rloc16); |
| jobject newElement_0_linkFrameCounter; |
| std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; |
| std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; |
| jlong jninewElement_0_linkFrameCounter = static_cast<jlong>(entry_0.linkFrameCounter); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), |
| jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); |
| jobject newElement_0_mleFrameCounter; |
| std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; |
| std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; |
| jlong jninewElement_0_mleFrameCounter = static_cast<jlong>(entry_0.mleFrameCounter); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_mleFrameCounterClassName.c_str(), newElement_0_mleFrameCounterCtorSignature.c_str(), |
| jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); |
| jobject newElement_0_lqi; |
| std::string newElement_0_lqiClassName = "java/lang/Integer"; |
| std::string newElement_0_lqiCtorSignature = "(I)V"; |
| jint jninewElement_0_lqi = static_cast<jint>(entry_0.lqi); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_lqiClassName.c_str(), |
| newElement_0_lqiCtorSignature.c_str(), |
| jninewElement_0_lqi, newElement_0_lqi); |
| jobject newElement_0_averageRssi; |
| if (entry_0.averageRssi.IsNull()) |
| { |
| newElement_0_averageRssi = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_averageRssiClassName = "java/lang/Integer"; |
| std::string newElement_0_averageRssiCtorSignature = "(I)V"; |
| jint jninewElement_0_averageRssi = static_cast<jint>(entry_0.averageRssi.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_averageRssiClassName.c_str(), newElement_0_averageRssiCtorSignature.c_str(), |
| jninewElement_0_averageRssi, newElement_0_averageRssi); |
| } |
| jobject newElement_0_lastRssi; |
| if (entry_0.lastRssi.IsNull()) |
| { |
| newElement_0_lastRssi = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_lastRssiClassName = "java/lang/Integer"; |
| std::string newElement_0_lastRssiCtorSignature = "(I)V"; |
| jint jninewElement_0_lastRssi = static_cast<jint>(entry_0.lastRssi.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_lastRssiClassName.c_str(), |
| newElement_0_lastRssiCtorSignature.c_str(), |
| jninewElement_0_lastRssi, newElement_0_lastRssi); |
| } |
| jobject newElement_0_frameErrorRate; |
| std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; |
| std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; |
| jint jninewElement_0_frameErrorRate = static_cast<jint>(entry_0.frameErrorRate); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_frameErrorRateClassName.c_str(), newElement_0_frameErrorRateCtorSignature.c_str(), |
| jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); |
| jobject newElement_0_messageErrorRate; |
| std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; |
| std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; |
| jint jninewElement_0_messageErrorRate = static_cast<jint>(entry_0.messageErrorRate); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_messageErrorRateClassName.c_str(), newElement_0_messageErrorRateCtorSignature.c_str(), |
| jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); |
| jobject newElement_0_rxOnWhenIdle; |
| std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; |
| std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_rxOnWhenIdle = static_cast<jboolean>(entry_0.rxOnWhenIdle); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_rxOnWhenIdleClassName.c_str(), newElement_0_rxOnWhenIdleCtorSignature.c_str(), |
| jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); |
| jobject newElement_0_fullThreadDevice; |
| std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; |
| std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_fullThreadDevice = static_cast<jboolean>(entry_0.fullThreadDevice); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), |
| jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); |
| jobject newElement_0_fullNetworkData; |
| std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; |
| std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_fullNetworkData = static_cast<jboolean>(entry_0.fullNetworkData); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), |
| jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); |
| jobject newElement_0_isChild; |
| std::string newElement_0_isChildClassName = "java/lang/Boolean"; |
| std::string newElement_0_isChildCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_isChild = static_cast<jboolean>(entry_0.isChild); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(newElement_0_isChildClassName.c_str(), |
| newElement_0_isChildCtorSignature.c_str(), |
| jninewElement_0_isChild, newElement_0_isChild); |
| |
| jclass neighborTableStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", |
| neighborTableStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); |
| return nullptr; |
| } |
| jmethodID neighborTableStructStructCtor_1 = |
| env->GetMethodID(neighborTableStructStructClass_1, "<init>", |
| "(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"); |
| if (neighborTableStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject( |
| neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, |
| newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, |
| newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, |
| newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::RouteTable::Id: { |
| using TypeInfo = Attributes::RouteTable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_extAddress; |
| std::string newElement_0_extAddressClassName = "java/lang/Long"; |
| std::string newElement_0_extAddressCtorSignature = "(J)V"; |
| jlong jninewElement_0_extAddress = static_cast<jlong>(entry_0.extAddress); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_extAddressClassName.c_str(), |
| newElement_0_extAddressCtorSignature.c_str(), |
| jninewElement_0_extAddress, newElement_0_extAddress); |
| jobject newElement_0_rloc16; |
| std::string newElement_0_rloc16ClassName = "java/lang/Integer"; |
| std::string newElement_0_rloc16CtorSignature = "(I)V"; |
| jint jninewElement_0_rloc16 = static_cast<jint>(entry_0.rloc16); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_rloc16ClassName.c_str(), |
| newElement_0_rloc16CtorSignature.c_str(), |
| jninewElement_0_rloc16, newElement_0_rloc16); |
| jobject newElement_0_routerId; |
| std::string newElement_0_routerIdClassName = "java/lang/Integer"; |
| std::string newElement_0_routerIdCtorSignature = "(I)V"; |
| jint jninewElement_0_routerId = static_cast<jint>(entry_0.routerId); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_routerIdClassName.c_str(), |
| newElement_0_routerIdCtorSignature.c_str(), |
| jninewElement_0_routerId, newElement_0_routerId); |
| jobject newElement_0_nextHop; |
| std::string newElement_0_nextHopClassName = "java/lang/Integer"; |
| std::string newElement_0_nextHopCtorSignature = "(I)V"; |
| jint jninewElement_0_nextHop = static_cast<jint>(entry_0.nextHop); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_nextHopClassName.c_str(), |
| newElement_0_nextHopCtorSignature.c_str(), |
| jninewElement_0_nextHop, newElement_0_nextHop); |
| jobject newElement_0_pathCost; |
| std::string newElement_0_pathCostClassName = "java/lang/Integer"; |
| std::string newElement_0_pathCostCtorSignature = "(I)V"; |
| jint jninewElement_0_pathCost = static_cast<jint>(entry_0.pathCost); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_pathCostClassName.c_str(), |
| newElement_0_pathCostCtorSignature.c_str(), |
| jninewElement_0_pathCost, newElement_0_pathCost); |
| jobject newElement_0_LQIIn; |
| std::string newElement_0_LQIInClassName = "java/lang/Integer"; |
| std::string newElement_0_LQIInCtorSignature = "(I)V"; |
| jint jninewElement_0_LQIIn = static_cast<jint>(entry_0.LQIIn); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_LQIInClassName.c_str(), |
| newElement_0_LQIInCtorSignature.c_str(), |
| jninewElement_0_LQIIn, newElement_0_LQIIn); |
| jobject newElement_0_LQIOut; |
| std::string newElement_0_LQIOutClassName = "java/lang/Integer"; |
| std::string newElement_0_LQIOutCtorSignature = "(I)V"; |
| jint jninewElement_0_LQIOut = static_cast<jint>(entry_0.LQIOut); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_LQIOutClassName.c_str(), |
| newElement_0_LQIOutCtorSignature.c_str(), |
| jninewElement_0_LQIOut, newElement_0_LQIOut); |
| jobject newElement_0_age; |
| std::string newElement_0_ageClassName = "java/lang/Integer"; |
| std::string newElement_0_ageCtorSignature = "(I)V"; |
| jint jninewElement_0_age = static_cast<jint>(entry_0.age); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_ageClassName.c_str(), |
| newElement_0_ageCtorSignature.c_str(), |
| jninewElement_0_age, newElement_0_age); |
| jobject newElement_0_allocated; |
| std::string newElement_0_allocatedClassName = "java/lang/Boolean"; |
| std::string newElement_0_allocatedCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_allocated = static_cast<jboolean>(entry_0.allocated); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(newElement_0_allocatedClassName.c_str(), |
| newElement_0_allocatedCtorSignature.c_str(), |
| jninewElement_0_allocated, newElement_0_allocated); |
| jobject newElement_0_linkEstablished; |
| std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; |
| std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_linkEstablished = static_cast<jboolean>(entry_0.linkEstablished); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), |
| jninewElement_0_linkEstablished, newElement_0_linkEstablished); |
| |
| jclass routeTableStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", |
| routeTableStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); |
| return nullptr; |
| } |
| jmethodID routeTableStructStructCtor_1 = env->GetMethodID( |
| routeTableStructStructClass_1, "<init>", |
| "(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"); |
| if (routeTableStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, |
| newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, |
| newElement_0_pathCost, newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, |
| newElement_0_allocated, newElement_0_linkEstablished); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::PartitionId::Id: { |
| using TypeInfo = Attributes::PartitionId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Weighting::Id: { |
| using TypeInfo = Attributes::Weighting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::DataVersion::Id: { |
| using TypeInfo = Attributes::DataVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::StableDataVersion::Id: { |
| using TypeInfo = Attributes::StableDataVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LeaderRouterId::Id: { |
| using TypeInfo = Attributes::LeaderRouterId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::DetachedRoleCount::Id: { |
| using TypeInfo = Attributes::DetachedRoleCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ChildRoleCount::Id: { |
| using TypeInfo = Attributes::ChildRoleCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RouterRoleCount::Id: { |
| using TypeInfo = Attributes::RouterRoleCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LeaderRoleCount::Id: { |
| using TypeInfo = Attributes::LeaderRoleCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AttachAttemptCount::Id: { |
| using TypeInfo = Attributes::AttachAttemptCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PartitionIdChangeCount::Id: { |
| using TypeInfo = Attributes::PartitionIdChangeCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BetterPartitionAttachAttemptCount::Id: { |
| using TypeInfo = Attributes::BetterPartitionAttachAttemptCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ParentChangeCount::Id: { |
| using TypeInfo = Attributes::ParentChangeCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TxTotalCount::Id: { |
| using TypeInfo = Attributes::TxTotalCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxUnicastCount::Id: { |
| using TypeInfo = Attributes::TxUnicastCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxBroadcastCount::Id: { |
| using TypeInfo = Attributes::TxBroadcastCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxAckRequestedCount::Id: { |
| using TypeInfo = Attributes::TxAckRequestedCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxAckedCount::Id: { |
| using TypeInfo = Attributes::TxAckedCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxNoAckRequestedCount::Id: { |
| using TypeInfo = Attributes::TxNoAckRequestedCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxDataCount::Id: { |
| using TypeInfo = Attributes::TxDataCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxDataPollCount::Id: { |
| using TypeInfo = Attributes::TxDataPollCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxBeaconCount::Id: { |
| using TypeInfo = Attributes::TxBeaconCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxBeaconRequestCount::Id: { |
| using TypeInfo = Attributes::TxBeaconRequestCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxOtherCount::Id: { |
| using TypeInfo = Attributes::TxOtherCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxRetryCount::Id: { |
| using TypeInfo = Attributes::TxRetryCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxDirectMaxRetryExpiryCount::Id: { |
| using TypeInfo = Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxIndirectMaxRetryExpiryCount::Id: { |
| using TypeInfo = Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxErrCcaCount::Id: { |
| using TypeInfo = Attributes::TxErrCcaCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxErrAbortCount::Id: { |
| using TypeInfo = Attributes::TxErrAbortCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxErrBusyChannelCount::Id: { |
| using TypeInfo = Attributes::TxErrBusyChannelCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxTotalCount::Id: { |
| using TypeInfo = Attributes::RxTotalCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxUnicastCount::Id: { |
| using TypeInfo = Attributes::RxUnicastCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxBroadcastCount::Id: { |
| using TypeInfo = Attributes::RxBroadcastCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxDataCount::Id: { |
| using TypeInfo = Attributes::RxDataCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxDataPollCount::Id: { |
| using TypeInfo = Attributes::RxDataPollCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxBeaconCount::Id: { |
| using TypeInfo = Attributes::RxBeaconCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxBeaconRequestCount::Id: { |
| using TypeInfo = Attributes::RxBeaconRequestCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxOtherCount::Id: { |
| using TypeInfo = Attributes::RxOtherCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxAddressFilteredCount::Id: { |
| using TypeInfo = Attributes::RxAddressFilteredCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxDestAddrFilteredCount::Id: { |
| using TypeInfo = Attributes::RxDestAddrFilteredCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxDuplicatedCount::Id: { |
| using TypeInfo = Attributes::RxDuplicatedCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrNoFrameCount::Id: { |
| using TypeInfo = Attributes::RxErrNoFrameCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrUnknownNeighborCount::Id: { |
| using TypeInfo = Attributes::RxErrUnknownNeighborCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrInvalidSrcAddrCount::Id: { |
| using TypeInfo = Attributes::RxErrInvalidSrcAddrCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrSecCount::Id: { |
| using TypeInfo = Attributes::RxErrSecCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrFcsCount::Id: { |
| using TypeInfo = Attributes::RxErrFcsCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RxErrOtherCount::Id: { |
| using TypeInfo = Attributes::RxErrOtherCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ActiveTimestamp::Id: { |
| using TypeInfo = Attributes::ActiveTimestamp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PendingTimestamp::Id: { |
| using TypeInfo = Attributes::PendingTimestamp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Delay::Id: { |
| using TypeInfo = Attributes::Delay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SecurityPolicy::Id: { |
| using TypeInfo = Attributes::SecurityPolicy::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_rotationTime; |
| std::string value_rotationTimeClassName = "java/lang/Integer"; |
| std::string value_rotationTimeCtorSignature = "(I)V"; |
| jint jnivalue_rotationTime = static_cast<jint>(cppValue.Value().rotationTime); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_rotationTimeClassName.c_str(), |
| value_rotationTimeCtorSignature.c_str(), |
| jnivalue_rotationTime, value_rotationTime); |
| jobject value_flags; |
| std::string value_flagsClassName = "java/lang/Integer"; |
| std::string value_flagsCtorSignature = "(I)V"; |
| jint jnivalue_flags = static_cast<jint>(cppValue.Value().flags); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_flagsClassName.c_str(), value_flagsCtorSignature.c_str(), jnivalue_flags, value_flags); |
| |
| jclass securityPolicyStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy", |
| securityPolicyStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy"); |
| return nullptr; |
| } |
| jmethodID securityPolicyStructCtor_1 = |
| env->GetMethodID(securityPolicyStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (securityPolicyStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(securityPolicyStructClass_1, securityPolicyStructCtor_1, value_rotationTime, value_flags); |
| } |
| return value; |
| } |
| case Attributes::ChannelPage0Mask::Id: { |
| using TypeInfo = Attributes::ChannelPage0Mask::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.Value().size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().data())); |
| value = valueByteArray; |
| } |
| return value; |
| } |
| case Attributes::OperationalDatasetComponents::Id: { |
| using TypeInfo = Attributes::OperationalDatasetComponents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_activeTimestampPresent; |
| std::string value_activeTimestampPresentClassName = "java/lang/Boolean"; |
| std::string value_activeTimestampPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_activeTimestampPresent = static_cast<jboolean>(cppValue.Value().activeTimestampPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_activeTimestampPresentClassName.c_str(), value_activeTimestampPresentCtorSignature.c_str(), |
| jnivalue_activeTimestampPresent, value_activeTimestampPresent); |
| jobject value_pendingTimestampPresent; |
| std::string value_pendingTimestampPresentClassName = "java/lang/Boolean"; |
| std::string value_pendingTimestampPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_pendingTimestampPresent = static_cast<jboolean>(cppValue.Value().pendingTimestampPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_pendingTimestampPresentClassName.c_str(), value_pendingTimestampPresentCtorSignature.c_str(), |
| jnivalue_pendingTimestampPresent, value_pendingTimestampPresent); |
| jobject value_masterKeyPresent; |
| std::string value_masterKeyPresentClassName = "java/lang/Boolean"; |
| std::string value_masterKeyPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_masterKeyPresent = static_cast<jboolean>(cppValue.Value().masterKeyPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_masterKeyPresentClassName.c_str(), |
| value_masterKeyPresentCtorSignature.c_str(), |
| jnivalue_masterKeyPresent, value_masterKeyPresent); |
| jobject value_networkNamePresent; |
| std::string value_networkNamePresentClassName = "java/lang/Boolean"; |
| std::string value_networkNamePresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_networkNamePresent = static_cast<jboolean>(cppValue.Value().networkNamePresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_networkNamePresentClassName.c_str(), value_networkNamePresentCtorSignature.c_str(), |
| jnivalue_networkNamePresent, value_networkNamePresent); |
| jobject value_extendedPanIdPresent; |
| std::string value_extendedPanIdPresentClassName = "java/lang/Boolean"; |
| std::string value_extendedPanIdPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_extendedPanIdPresent = static_cast<jboolean>(cppValue.Value().extendedPanIdPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_extendedPanIdPresentClassName.c_str(), value_extendedPanIdPresentCtorSignature.c_str(), |
| jnivalue_extendedPanIdPresent, value_extendedPanIdPresent); |
| jobject value_meshLocalPrefixPresent; |
| std::string value_meshLocalPrefixPresentClassName = "java/lang/Boolean"; |
| std::string value_meshLocalPrefixPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_meshLocalPrefixPresent = static_cast<jboolean>(cppValue.Value().meshLocalPrefixPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_meshLocalPrefixPresentClassName.c_str(), value_meshLocalPrefixPresentCtorSignature.c_str(), |
| jnivalue_meshLocalPrefixPresent, value_meshLocalPrefixPresent); |
| jobject value_delayPresent; |
| std::string value_delayPresentClassName = "java/lang/Boolean"; |
| std::string value_delayPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_delayPresent = static_cast<jboolean>(cppValue.Value().delayPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_delayPresentClassName.c_str(), |
| value_delayPresentCtorSignature.c_str(), |
| jnivalue_delayPresent, value_delayPresent); |
| jobject value_panIdPresent; |
| std::string value_panIdPresentClassName = "java/lang/Boolean"; |
| std::string value_panIdPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_panIdPresent = static_cast<jboolean>(cppValue.Value().panIdPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_panIdPresentClassName.c_str(), |
| value_panIdPresentCtorSignature.c_str(), |
| jnivalue_panIdPresent, value_panIdPresent); |
| jobject value_channelPresent; |
| std::string value_channelPresentClassName = "java/lang/Boolean"; |
| std::string value_channelPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_channelPresent = static_cast<jboolean>(cppValue.Value().channelPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_channelPresentClassName.c_str(), |
| value_channelPresentCtorSignature.c_str(), |
| jnivalue_channelPresent, value_channelPresent); |
| jobject value_pskcPresent; |
| std::string value_pskcPresentClassName = "java/lang/Boolean"; |
| std::string value_pskcPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_pskcPresent = static_cast<jboolean>(cppValue.Value().pskcPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_pskcPresentClassName.c_str(), |
| value_pskcPresentCtorSignature.c_str(), |
| jnivalue_pskcPresent, value_pskcPresent); |
| jobject value_securityPolicyPresent; |
| std::string value_securityPolicyPresentClassName = "java/lang/Boolean"; |
| std::string value_securityPolicyPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_securityPolicyPresent = static_cast<jboolean>(cppValue.Value().securityPolicyPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_securityPolicyPresentClassName.c_str(), value_securityPolicyPresentCtorSignature.c_str(), |
| jnivalue_securityPolicyPresent, value_securityPolicyPresent); |
| jobject value_channelMaskPresent; |
| std::string value_channelMaskPresentClassName = "java/lang/Boolean"; |
| std::string value_channelMaskPresentCtorSignature = "(Z)V"; |
| jboolean jnivalue_channelMaskPresent = static_cast<jboolean>(cppValue.Value().channelMaskPresent); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| value_channelMaskPresentClassName.c_str(), value_channelMaskPresentCtorSignature.c_str(), |
| jnivalue_channelMaskPresent, value_channelMaskPresent); |
| |
| jclass operationalDatasetComponentsStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents", |
| operationalDatasetComponentsStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, |
| "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents"); |
| return nullptr; |
| } |
| jmethodID operationalDatasetComponentsStructCtor_1 = |
| env->GetMethodID(operationalDatasetComponentsStructClass_1, "<init>", |
| "(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"); |
| if (operationalDatasetComponentsStructCtor_1 == nullptr) |
| { |
| ChipLogError( |
| Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(operationalDatasetComponentsStructClass_1, operationalDatasetComponentsStructCtor_1, |
| value_activeTimestampPresent, value_pendingTimestampPresent, value_masterKeyPresent, |
| value_networkNamePresent, value_extendedPanIdPresent, value_meshLocalPrefixPresent, |
| value_delayPresent, value_panIdPresent, value_channelPresent, value_pskcPresent, |
| value_securityPolicyPresent, value_channelMaskPresent); |
| } |
| return value; |
| } |
| case Attributes::ActiveNetworkFaultsList::Id: { |
| using TypeInfo = Attributes::ActiveNetworkFaultsList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::WiFiNetworkDiagnostics::Id: { |
| using namespace app::Clusters::WiFiNetworkDiagnostics; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Bssid::Id: { |
| using TypeInfo = Attributes::Bssid::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.Value().size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().data())); |
| value = valueByteArray; |
| } |
| return value; |
| } |
| case Attributes::SecurityType::Id: { |
| using TypeInfo = Attributes::SecurityType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WiFiVersion::Id: { |
| using TypeInfo = Attributes::WiFiVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ChannelNumber::Id: { |
| using TypeInfo = Attributes::ChannelNumber::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Rssi::Id: { |
| using TypeInfo = Attributes::Rssi::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BeaconLostCount::Id: { |
| using TypeInfo = Attributes::BeaconLostCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BeaconRxCount::Id: { |
| using TypeInfo = Attributes::BeaconRxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PacketMulticastRxCount::Id: { |
| using TypeInfo = Attributes::PacketMulticastRxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PacketMulticastTxCount::Id: { |
| using TypeInfo = Attributes::PacketMulticastTxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PacketUnicastRxCount::Id: { |
| using TypeInfo = Attributes::PacketUnicastRxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PacketUnicastTxCount::Id: { |
| using TypeInfo = Attributes::PacketUnicastTxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CurrentMaxRate::Id: { |
| using TypeInfo = Attributes::CurrentMaxRate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OverrunCount::Id: { |
| using TypeInfo = Attributes::OverrunCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::EthernetNetworkDiagnostics::Id: { |
| using namespace app::Clusters::EthernetNetworkDiagnostics; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::PHYRate::Id: { |
| using TypeInfo = Attributes::PHYRate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::FullDuplex::Id: { |
| using TypeInfo = Attributes::FullDuplex::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PacketRxCount::Id: { |
| using TypeInfo = Attributes::PacketRxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::PacketTxCount::Id: { |
| using TypeInfo = Attributes::PacketTxCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TxErrCount::Id: { |
| using TypeInfo = Attributes::TxErrCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::CollisionCount::Id: { |
| using TypeInfo = Attributes::CollisionCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::OverrunCount::Id: { |
| using TypeInfo = Attributes::OverrunCount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::CarrierDetect::Id: { |
| using TypeInfo = Attributes::CarrierDetect::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::TimeSinceReset::Id: { |
| using TypeInfo = Attributes::TimeSinceReset::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TimeSynchronization::Id: { |
| using namespace app::Clusters::TimeSynchronization; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::UTCTime::Id: { |
| using TypeInfo = Attributes::UTCTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Granularity::Id: { |
| using TypeInfo = Attributes::Granularity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TimeSource::Id: { |
| using TypeInfo = Attributes::TimeSource::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TrustedTimeSource::Id: { |
| using TypeInfo = Attributes::TrustedTimeSource::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_fabricIndex; |
| std::string value_fabricIndexClassName = "java/lang/Integer"; |
| std::string value_fabricIndexCtorSignature = "(I)V"; |
| jint jnivalue_fabricIndex = static_cast<jint>(cppValue.Value().fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_fabricIndexClassName.c_str(), |
| value_fabricIndexCtorSignature.c_str(), |
| jnivalue_fabricIndex, value_fabricIndex); |
| jobject value_nodeID; |
| std::string value_nodeIDClassName = "java/lang/Long"; |
| std::string value_nodeIDCtorSignature = "(J)V"; |
| jlong jnivalue_nodeID = static_cast<jlong>(cppValue.Value().nodeID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| value_nodeIDClassName.c_str(), value_nodeIDCtorSignature.c_str(), jnivalue_nodeID, value_nodeID); |
| jobject value_endpoint; |
| std::string value_endpointClassName = "java/lang/Integer"; |
| std::string value_endpointCtorSignature = "(I)V"; |
| jint jnivalue_endpoint = static_cast<jint>(cppValue.Value().endpoint); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_endpointClassName.c_str(), value_endpointCtorSignature.c_str(), jnivalue_endpoint, value_endpoint); |
| |
| jclass trustedTimeSourceStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct", |
| trustedTimeSourceStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct"); |
| return nullptr; |
| } |
| jmethodID trustedTimeSourceStructStructCtor_1 = env->GetMethodID( |
| trustedTimeSourceStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V"); |
| if (trustedTimeSourceStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(trustedTimeSourceStructStructClass_1, trustedTimeSourceStructStructCtor_1, value_fabricIndex, |
| value_nodeID, value_endpoint); |
| } |
| return value; |
| } |
| case Attributes::DefaultNTP::Id: { |
| using TypeInfo = Attributes::DefaultNTP::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); |
| } |
| return value; |
| } |
| case Attributes::TimeZone::Id: { |
| using TypeInfo = Attributes::TimeZone::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_offset; |
| std::string newElement_0_offsetClassName = "java/lang/Long"; |
| std::string newElement_0_offsetCtorSignature = "(J)V"; |
| jlong jninewElement_0_offset = static_cast<jlong>(entry_0.offset); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_offsetClassName.c_str(), |
| newElement_0_offsetCtorSignature.c_str(), |
| jninewElement_0_offset, newElement_0_offset); |
| jobject newElement_0_validAt; |
| std::string newElement_0_validAtClassName = "java/lang/Long"; |
| std::string newElement_0_validAtCtorSignature = "(J)V"; |
| jlong jninewElement_0_validAt = static_cast<jlong>(entry_0.validAt); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_validAtClassName.c_str(), |
| newElement_0_validAtCtorSignature.c_str(), |
| jninewElement_0_validAt, newElement_0_validAt); |
| jobject newElement_0_name; |
| if (!entry_0.name.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); |
| } |
| else |
| { |
| jobject newElement_0_nameInsideOptional; |
| LogErrorOnFailure( |
| chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); |
| } |
| |
| jclass timeZoneStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); |
| return nullptr; |
| } |
| jmethodID timeZoneStructStructCtor_1 = env->GetMethodID(timeZoneStructStructClass_1, "<init>", |
| "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V"); |
| if (timeZoneStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, |
| newElement_0_validAt, newElement_0_name); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::DSTOffset::Id: { |
| using TypeInfo = Attributes::DSTOffset::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_offset; |
| std::string newElement_0_offsetClassName = "java/lang/Long"; |
| std::string newElement_0_offsetCtorSignature = "(J)V"; |
| jlong jninewElement_0_offset = static_cast<jlong>(entry_0.offset); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_offsetClassName.c_str(), |
| newElement_0_offsetCtorSignature.c_str(), |
| jninewElement_0_offset, newElement_0_offset); |
| jobject newElement_0_validStarting; |
| std::string newElement_0_validStartingClassName = "java/lang/Long"; |
| std::string newElement_0_validStartingCtorSignature = "(J)V"; |
| jlong jninewElement_0_validStarting = static_cast<jlong>(entry_0.validStarting); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_validStartingClassName.c_str(), newElement_0_validStartingCtorSignature.c_str(), |
| jninewElement_0_validStarting, newElement_0_validStarting); |
| jobject newElement_0_validUntil; |
| if (entry_0.validUntil.IsNull()) |
| { |
| newElement_0_validUntil = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_validUntilClassName = "java/lang/Long"; |
| std::string newElement_0_validUntilCtorSignature = "(J)V"; |
| jlong jninewElement_0_validUntil = static_cast<jlong>(entry_0.validUntil.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_validUntilClassName.c_str(), newElement_0_validUntilCtorSignature.c_str(), |
| jninewElement_0_validUntil, newElement_0_validUntil); |
| } |
| |
| jclass DSTOffsetStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", |
| DSTOffsetStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); |
| return nullptr; |
| } |
| jmethodID DSTOffsetStructStructCtor_1 = |
| env->GetMethodID(DSTOffsetStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); |
| if (DSTOffsetStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, |
| newElement_0_validStarting, newElement_0_validUntil); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::LocalTime::Id: { |
| using TypeInfo = Attributes::LocalTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::TimeZoneDatabase::Id: { |
| using TypeInfo = Attributes::TimeZoneDatabase::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NTPServerAvailable::Id: { |
| using TypeInfo = Attributes::NTPServerAvailable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TimeZoneListMaxSize::Id: { |
| using TypeInfo = Attributes::TimeZoneListMaxSize::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DSTOffsetListMaxSize::Id: { |
| using TypeInfo = Attributes::DSTOffsetListMaxSize::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportsDNSResolve::Id: { |
| using TypeInfo = Attributes::SupportsDNSResolve::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BridgedDeviceBasicInformation::Id: { |
| using namespace app::Clusters::BridgedDeviceBasicInformation; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::VendorName::Id: { |
| using TypeInfo = Attributes::VendorName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::VendorID::Id: { |
| using TypeInfo = Attributes::VendorID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ProductName::Id: { |
| using TypeInfo = Attributes::ProductName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::NodeLabel::Id: { |
| using TypeInfo = Attributes::NodeLabel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::HardwareVersion::Id: { |
| using TypeInfo = Attributes::HardwareVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::HardwareVersionString::Id: { |
| using TypeInfo = Attributes::HardwareVersionString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::SoftwareVersion::Id: { |
| using TypeInfo = Attributes::SoftwareVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::SoftwareVersionString::Id: { |
| using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ManufacturingDate::Id: { |
| using TypeInfo = Attributes::ManufacturingDate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::PartNumber::Id: { |
| using TypeInfo = Attributes::PartNumber::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductURL::Id: { |
| using TypeInfo = Attributes::ProductURL::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductLabel::Id: { |
| using TypeInfo = Attributes::ProductLabel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::SerialNumber::Id: { |
| using TypeInfo = Attributes::SerialNumber::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::Reachable::Id: { |
| using TypeInfo = Attributes::Reachable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::UniqueID::Id: { |
| using TypeInfo = Attributes::UniqueID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductAppearance::Id: { |
| using TypeInfo = Attributes::ProductAppearance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_finish; |
| std::string value_finishClassName = "java/lang/Integer"; |
| std::string value_finishCtorSignature = "(I)V"; |
| jint jnivalue_finish = static_cast<jint>(cppValue.finish); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_finishClassName.c_str(), value_finishCtorSignature.c_str(), jnivalue_finish, value_finish); |
| jobject value_primaryColor; |
| if (cppValue.primaryColor.IsNull()) |
| { |
| value_primaryColor = nullptr; |
| } |
| else |
| { |
| std::string value_primaryColorClassName = "java/lang/Integer"; |
| std::string value_primaryColorCtorSignature = "(I)V"; |
| jint jnivalue_primaryColor = static_cast<jint>(cppValue.primaryColor.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_primaryColorClassName.c_str(), |
| value_primaryColorCtorSignature.c_str(), |
| jnivalue_primaryColor, value_primaryColor); |
| } |
| |
| jclass productAppearanceStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct", |
| productAppearanceStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct"); |
| return nullptr; |
| } |
| jmethodID productAppearanceStructStructCtor_0 = |
| env->GetMethodID(productAppearanceStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (productAppearanceStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, |
| "Could not find ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, |
| value_primaryColor); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Switch::Id: { |
| using namespace app::Clusters::Switch; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::NumberOfPositions::Id: { |
| using TypeInfo = Attributes::NumberOfPositions::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentPosition::Id: { |
| using TypeInfo = Attributes::CurrentPosition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MultiPressMax::Id: { |
| using TypeInfo = Attributes::MultiPressMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::AdministratorCommissioning::Id: { |
| using namespace app::Clusters::AdministratorCommissioning; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::WindowStatus::Id: { |
| using TypeInfo = Attributes::WindowStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AdminFabricIndex::Id: { |
| using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AdminVendorId::Id: { |
| using TypeInfo = Attributes::AdminVendorId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OperationalCredentials::Id: { |
| using namespace app::Clusters::OperationalCredentials; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::NOCs::Id: { |
| using TypeInfo = Attributes::NOCs::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_noc; |
| jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast<jsize>(entry_0.noc.size())); |
| env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast<jsize>(entry_0.noc.size()), |
| reinterpret_cast<const jbyte *>(entry_0.noc.data())); |
| newElement_0_noc = newElement_0_nocByteArray; |
| jobject newElement_0_icac; |
| if (entry_0.icac.IsNull()) |
| { |
| newElement_0_icac = nullptr; |
| } |
| else |
| { |
| jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast<jsize>(entry_0.icac.Value().size())); |
| env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast<jsize>(entry_0.icac.Value().size()), |
| reinterpret_cast<const jbyte *>(entry_0.icac.Value().data())); |
| newElement_0_icac = newElement_0_icacByteArray; |
| } |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass NOCStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); |
| return nullptr; |
| } |
| jmethodID NOCStructStructCtor_1 = env->GetMethodID(NOCStructStructClass_1, "<init>", "([B[BLjava/lang/Integer;)V"); |
| if (NOCStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, |
| newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::Fabrics::Id: { |
| using TypeInfo = Attributes::Fabrics::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_rootPublicKey; |
| jbyteArray newElement_0_rootPublicKeyByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.rootPublicKey.size())); |
| env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast<jsize>(entry_0.rootPublicKey.size()), |
| reinterpret_cast<const jbyte *>(entry_0.rootPublicKey.data())); |
| newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; |
| jobject newElement_0_vendorID; |
| std::string newElement_0_vendorIDClassName = "java/lang/Integer"; |
| std::string newElement_0_vendorIDCtorSignature = "(I)V"; |
| jint jninewElement_0_vendorID = static_cast<jint>(entry_0.vendorID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_vendorIDClassName.c_str(), |
| newElement_0_vendorIDCtorSignature.c_str(), |
| jninewElement_0_vendorID, newElement_0_vendorID); |
| jobject newElement_0_fabricID; |
| std::string newElement_0_fabricIDClassName = "java/lang/Long"; |
| std::string newElement_0_fabricIDCtorSignature = "(J)V"; |
| jlong jninewElement_0_fabricID = static_cast<jlong>(entry_0.fabricID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_fabricIDClassName.c_str(), |
| newElement_0_fabricIDCtorSignature.c_str(), |
| jninewElement_0_fabricID, newElement_0_fabricID); |
| jobject newElement_0_nodeID; |
| std::string newElement_0_nodeIDClassName = "java/lang/Long"; |
| std::string newElement_0_nodeIDCtorSignature = "(J)V"; |
| jlong jninewElement_0_nodeID = static_cast<jlong>(entry_0.nodeID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_nodeIDClassName.c_str(), |
| newElement_0_nodeIDCtorSignature.c_str(), |
| jninewElement_0_nodeID, newElement_0_nodeID); |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass fabricDescriptorStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", |
| fabricDescriptorStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); |
| return nullptr; |
| } |
| jmethodID fabricDescriptorStructStructCtor_1 = env->GetMethodID( |
| fabricDescriptorStructStructClass_1, "<init>", |
| "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V"); |
| if (fabricDescriptorStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, |
| newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, |
| newElement_0_nodeID, newElement_0_label, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SupportedFabrics::Id: { |
| using TypeInfo = Attributes::SupportedFabrics::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CommissionedFabrics::Id: { |
| using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TrustedRootCertificates::Id: { |
| using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast<jsize>(entry_0.size())); |
| env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast<jsize>(entry_0.size()), |
| reinterpret_cast<const jbyte *>(entry_0.data())); |
| newElement_0 = newElement_0ByteArray; |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentFabricIndex::Id: { |
| using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::GroupKeyManagement::Id: { |
| using namespace app::Clusters::GroupKeyManagement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GroupKeyMap::Id: { |
| using TypeInfo = Attributes::GroupKeyMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_groupId; |
| std::string newElement_0_groupIdClassName = "java/lang/Integer"; |
| std::string newElement_0_groupIdCtorSignature = "(I)V"; |
| jint jninewElement_0_groupId = static_cast<jint>(entry_0.groupId); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_groupIdClassName.c_str(), |
| newElement_0_groupIdCtorSignature.c_str(), |
| jninewElement_0_groupId, newElement_0_groupId); |
| jobject newElement_0_groupKeySetID; |
| std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; |
| std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; |
| jint jninewElement_0_groupKeySetID = static_cast<jint>(entry_0.groupKeySetID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_groupKeySetIDClassName.c_str(), newElement_0_groupKeySetIDCtorSignature.c_str(), |
| jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass groupKeyMapStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", |
| groupKeyMapStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); |
| return nullptr; |
| } |
| jmethodID groupKeyMapStructStructCtor_1 = env->GetMethodID( |
| groupKeyMapStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (groupKeyMapStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, |
| newElement_0_groupKeySetID, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GroupTable::Id: { |
| using TypeInfo = Attributes::GroupTable::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_groupId; |
| std::string newElement_0_groupIdClassName = "java/lang/Integer"; |
| std::string newElement_0_groupIdCtorSignature = "(I)V"; |
| jint jninewElement_0_groupId = static_cast<jint>(entry_0.groupId); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_groupIdClassName.c_str(), |
| newElement_0_groupIdCtorSignature.c_str(), |
| jninewElement_0_groupId, newElement_0_groupId); |
| jobject newElement_0_endpoints; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); |
| |
| auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); |
| while (iter_newElement_0_endpoints_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); |
| jobject newElement_2; |
| std::string newElement_2ClassName = "java/lang/Integer"; |
| std::string newElement_2CtorSignature = "(I)V"; |
| jint jninewElement_2 = static_cast<jint>(entry_2); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); |
| } |
| jobject newElement_0_groupName; |
| if (!entry_0.groupName.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); |
| } |
| else |
| { |
| jobject newElement_0_groupNameInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), |
| newElement_0_groupNameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); |
| } |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass groupInfoMapStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", |
| groupInfoMapStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); |
| return nullptr; |
| } |
| jmethodID groupInfoMapStructStructCtor_1 = |
| env->GetMethodID(groupInfoMapStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (groupInfoMapStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, |
| newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::MaxGroupsPerFabric::Id: { |
| using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxGroupKeysPerFabric::Id: { |
| using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::FixedLabel::Id: { |
| using namespace app::Clusters::FixedLabel; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::LabelList::Id: { |
| using TypeInfo = Attributes::LabelList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); |
| |
| jclass labelStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", labelStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); |
| return nullptr; |
| } |
| jmethodID labelStructStructCtor_1 = |
| env->GetMethodID(labelStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/String;)V"); |
| if (labelStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = |
| env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::UserLabel::Id: { |
| using namespace app::Clusters::UserLabel; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::LabelList::Id: { |
| using TypeInfo = Attributes::LabelList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); |
| |
| jclass labelStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", labelStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); |
| return nullptr; |
| } |
| jmethodID labelStructStructCtor_1 = |
| env->GetMethodID(labelStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/String;)V"); |
| if (labelStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = |
| env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ProxyConfiguration::Id: { |
| using namespace app::Clusters::ProxyConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ProxyDiscovery::Id: { |
| using namespace app::Clusters::ProxyDiscovery; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ProxyValid::Id: { |
| using namespace app::Clusters::ProxyValid; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BooleanState::Id: { |
| using namespace app::Clusters::BooleanState; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::StateValue::Id: { |
| using TypeInfo = Attributes::StateValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::IcdManagement::Id: { |
| using namespace app::Clusters::IcdManagement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::IdleModeDuration::Id: { |
| using TypeInfo = Attributes::IdleModeDuration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ActiveModeDuration::Id: { |
| using TypeInfo = Attributes::ActiveModeDuration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ActiveModeThreshold::Id: { |
| using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RegisteredClients::Id: { |
| using TypeInfo = Attributes::RegisteredClients::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_checkInNodeID; |
| std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; |
| std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; |
| jlong jninewElement_0_checkInNodeID = static_cast<jlong>(entry_0.checkInNodeID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_checkInNodeIDClassName.c_str(), newElement_0_checkInNodeIDCtorSignature.c_str(), |
| jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); |
| jobject newElement_0_monitoredSubject; |
| std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; |
| std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; |
| jlong jninewElement_0_monitoredSubject = static_cast<jlong>(entry_0.monitoredSubject); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), |
| jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass monitoringRegistrationStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", |
| monitoringRegistrationStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); |
| return nullptr; |
| } |
| jmethodID monitoringRegistrationStructStructCtor_1 = env->GetMethodID( |
| monitoringRegistrationStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V"); |
| if (monitoringRegistrationStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, |
| newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ICDCounter::Id: { |
| using TypeInfo = Attributes::ICDCounter::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClientsSupportedPerFabric::Id: { |
| using TypeInfo = Attributes::ClientsSupportedPerFabric::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UserActiveModeTriggerHint::Id: { |
| using TypeInfo = Attributes::UserActiveModeTriggerHint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::UserActiveModeTriggerInstruction::Id: { |
| using TypeInfo = Attributes::UserActiveModeTriggerInstruction::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ModeSelect::Id: { |
| using namespace app::Clusters::ModeSelect; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Description::Id: { |
| using TypeInfo = Attributes::Description::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::StandardNamespace::Id: { |
| using TypeInfo = Attributes::StandardNamespace::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_semanticTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); |
| |
| auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); |
| while (iter_newElement_0_semanticTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCode = static_cast<jint>(entry_2.mfgCode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_mfgCodeClassName.c_str(), |
| newElement_2_mfgCodeCtorSignature.c_str(), |
| jninewElement_2_mfgCode, newElement_2_mfgCode); |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass semanticTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", |
| semanticTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); |
| return nullptr; |
| } |
| jmethodID semanticTagStructStructCtor_3 = |
| env->GetMethodID(semanticTagStructStructClass_3, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); |
| if (semanticTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, |
| newElement_2_mfgCode, newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_semanticTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpMode::Id: { |
| using TypeInfo = Attributes::StartUpMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::LaundryWasherMode::Id: { |
| using namespace app::Clusters::LaundryWasherMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", |
| modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpMode::Id: { |
| using TypeInfo = Attributes::StartUpMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { |
| using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, |
| "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", |
| modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError( |
| Zcl, |
| "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, |
| "Could not find " |
| "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", |
| modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError( |
| Zcl, |
| "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, |
| "Could not find " |
| "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpMode::Id: { |
| using TypeInfo = Attributes::StartUpMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::LaundryWasherControls::Id: { |
| using namespace app::Clusters::LaundryWasherControls; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SpinSpeeds::Id: { |
| using TypeInfo = Attributes::SpinSpeeds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SpinSpeedCurrent::Id: { |
| using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NumberOfRinses::Id: { |
| using TypeInfo = Attributes::NumberOfRinses::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportedRinses::Id: { |
| using TypeInfo = Attributes::SupportedRinses::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RvcRunMode::Id: { |
| using namespace app::Clusters::RvcRunMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RvcCleanMode::Id: { |
| using namespace app::Clusters::RvcCleanMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TemperatureControl::Id: { |
| using namespace app::Clusters::TemperatureControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::TemperatureSetpoint::Id: { |
| using TypeInfo = Attributes::TemperatureSetpoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinTemperature::Id: { |
| using TypeInfo = Attributes::MinTemperature::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxTemperature::Id: { |
| using TypeInfo = Attributes::MaxTemperature::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Step::Id: { |
| using TypeInfo = Attributes::Step::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SelectedTemperatureLevel::Id: { |
| using TypeInfo = Attributes::SelectedTemperatureLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportedTemperatureLevels::Id: { |
| using TypeInfo = Attributes::SupportedTemperatureLevels::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RefrigeratorAlarm::Id: { |
| using namespace app::Clusters::RefrigeratorAlarm; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Mask::Id: { |
| using TypeInfo = Attributes::Mask::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::State::Id: { |
| using TypeInfo = Attributes::State::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Supported::Id: { |
| using TypeInfo = Attributes::Supported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::DishwasherMode::Id: { |
| using namespace app::Clusters::DishwasherMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpMode::Id: { |
| using TypeInfo = Attributes::StartUpMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OnMode::Id: { |
| using TypeInfo = Attributes::OnMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::AirQuality::Id: { |
| using namespace app::Clusters::AirQuality; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::AirQuality::Id: { |
| using TypeInfo = Attributes::AirQuality::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::SmokeCoAlarm::Id: { |
| using namespace app::Clusters::SmokeCoAlarm; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ExpressedState::Id: { |
| using TypeInfo = Attributes::ExpressedState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SmokeState::Id: { |
| using TypeInfo = Attributes::SmokeState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::COState::Id: { |
| using TypeInfo = Attributes::COState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BatteryAlert::Id: { |
| using TypeInfo = Attributes::BatteryAlert::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DeviceMuted::Id: { |
| using TypeInfo = Attributes::DeviceMuted::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TestInProgress::Id: { |
| using TypeInfo = Attributes::TestInProgress::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::HardwareFaultAlert::Id: { |
| using TypeInfo = Attributes::HardwareFaultAlert::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::EndOfServiceAlert::Id: { |
| using TypeInfo = Attributes::EndOfServiceAlert::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InterconnectSmokeAlarm::Id: { |
| using TypeInfo = Attributes::InterconnectSmokeAlarm::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InterconnectCOAlarm::Id: { |
| using TypeInfo = Attributes::InterconnectCOAlarm::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ContaminationState::Id: { |
| using TypeInfo = Attributes::ContaminationState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SmokeSensitivityLevel::Id: { |
| using TypeInfo = Attributes::SmokeSensitivityLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ExpiryDate::Id: { |
| using TypeInfo = Attributes::ExpiryDate::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::DishwasherAlarm::Id: { |
| using namespace app::Clusters::DishwasherAlarm; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Mask::Id: { |
| using TypeInfo = Attributes::Mask::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Latch::Id: { |
| using TypeInfo = Attributes::Latch::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::State::Id: { |
| using TypeInfo = Attributes::State::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Supported::Id: { |
| using TypeInfo = Attributes::Supported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::MicrowaveOvenMode::Id: { |
| using namespace app::Clusters::MicrowaveOvenMode; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::SupportedModes::Id: { |
| using TypeInfo = Attributes::SupportedModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_label; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); |
| jobject newElement_0_mode; |
| std::string newElement_0_modeClassName = "java/lang/Integer"; |
| std::string newElement_0_modeCtorSignature = "(I)V"; |
| jint jninewElement_0_mode = static_cast<jint>(entry_0.mode); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_modeClassName.c_str(), |
| newElement_0_modeCtorSignature.c_str(), |
| jninewElement_0_mode, newElement_0_mode); |
| jobject newElement_0_modeTags; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); |
| |
| auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); |
| while (iter_newElement_0_modeTags_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); |
| jobject newElement_2; |
| jobject newElement_2_mfgCode; |
| if (!entry_2.mfgCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); |
| } |
| else |
| { |
| jobject newElement_2_mfgCodeInsideOptional; |
| std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_2_mfgCodeInsideOptional = static_cast<jint>(entry_2.mfgCode.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2_mfgCodeInsideOptionalClassName.c_str(), |
| newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, |
| newElement_2_mfgCodeInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); |
| } |
| jobject newElement_2_value; |
| std::string newElement_2_valueClassName = "java/lang/Integer"; |
| std::string newElement_2_valueCtorSignature = "(I)V"; |
| jint jninewElement_2_value = static_cast<jint>(entry_2.value); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_valueClassName.c_str(), |
| newElement_2_valueCtorSignature.c_str(), |
| jninewElement_2_value, newElement_2_value); |
| |
| jclass modeTagStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); |
| return nullptr; |
| } |
| jmethodID modeTagStructStructCtor_3 = |
| env->GetMethodID(modeTagStructStructClass_3, "<init>", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (modeTagStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, |
| newElement_2_value); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); |
| } |
| |
| jclass modeOptionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", |
| modeOptionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); |
| return nullptr; |
| } |
| jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( |
| modeOptionStructStructClass_1, "<init>", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); |
| if (modeOptionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, |
| newElement_0_mode, newElement_0_modeTags); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentMode::Id: { |
| using TypeInfo = Attributes::CurrentMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::MicrowaveOvenControl::Id: { |
| using namespace app::Clusters::MicrowaveOvenControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::CookTime::Id: { |
| using TypeInfo = Attributes::CookTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::PowerSetting::Id: { |
| using TypeInfo = Attributes::PowerSetting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinPower::Id: { |
| using TypeInfo = Attributes::MinPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxPower::Id: { |
| using TypeInfo = Attributes::MaxPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PowerStep::Id: { |
| using TypeInfo = Attributes::PowerStep::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OperationalState::Id: { |
| using namespace app::Clusters::OperationalState; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::PhaseList::Id: { |
| using TypeInfo = Attributes::PhaseList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_1 = cppValue.Value().begin(); |
| while (iter_value_1.Next()) |
| { |
| auto & entry_1 = iter_value_1.GetValue(); |
| jobject newElement_1; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_1); |
| } |
| } |
| return value; |
| } |
| case Attributes::CurrentPhase::Id: { |
| using TypeInfo = Attributes::CurrentPhase::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CountdownTime::Id: { |
| using TypeInfo = Attributes::CountdownTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OperationalStateList::Id: { |
| using TypeInfo = Attributes::OperationalStateList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_operationalStateID; |
| std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; |
| std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; |
| jint jninewElement_0_operationalStateID = static_cast<jint>(entry_0.operationalStateID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), |
| jninewElement_0_operationalStateID, newElement_0_operationalStateID); |
| jobject newElement_0_operationalStateLabel; |
| if (!entry_0.operationalStateLabel.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); |
| } |
| else |
| { |
| jobject newElement_0_operationalStateLabelInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, |
| newElement_0_operationalStateLabel); |
| } |
| |
| jclass operationalStateStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", |
| operationalStateStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); |
| return nullptr; |
| } |
| jmethodID operationalStateStructStructCtor_1 = |
| env->GetMethodID(operationalStateStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); |
| if (operationalStateStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, |
| newElement_0_operationalStateID, newElement_0_operationalStateLabel); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::OperationalState::Id: { |
| using TypeInfo = Attributes::OperationalState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OperationalError::Id: { |
| using TypeInfo = Attributes::OperationalError::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_errorStateID; |
| std::string value_errorStateIDClassName = "java/lang/Integer"; |
| std::string value_errorStateIDCtorSignature = "(I)V"; |
| jint jnivalue_errorStateID = static_cast<jint>(cppValue.errorStateID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_errorStateIDClassName.c_str(), |
| value_errorStateIDCtorSignature.c_str(), |
| jnivalue_errorStateID, value_errorStateID); |
| jobject value_errorStateLabel; |
| if (!cppValue.errorStateLabel.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); |
| } |
| else |
| { |
| jobject value_errorStateLabelInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), |
| value_errorStateLabelInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); |
| } |
| jobject value_errorStateDetails; |
| if (!cppValue.errorStateDetails.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); |
| } |
| else |
| { |
| jobject value_errorStateDetailsInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), |
| value_errorStateDetailsInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); |
| } |
| |
| jclass errorStateStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); |
| return nullptr; |
| } |
| jmethodID errorStateStructStructCtor_0 = env->GetMethodID( |
| errorStateStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (errorStateStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, |
| value_errorStateLabel, value_errorStateDetails); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RvcOperationalState::Id: { |
| using namespace app::Clusters::RvcOperationalState; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::PhaseList::Id: { |
| using TypeInfo = Attributes::PhaseList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_1 = cppValue.Value().begin(); |
| while (iter_value_1.Next()) |
| { |
| auto & entry_1 = iter_value_1.GetValue(); |
| jobject newElement_1; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_1); |
| } |
| } |
| return value; |
| } |
| case Attributes::CurrentPhase::Id: { |
| using TypeInfo = Attributes::CurrentPhase::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CountdownTime::Id: { |
| using TypeInfo = Attributes::CountdownTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OperationalStateList::Id: { |
| using TypeInfo = Attributes::OperationalStateList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_operationalStateID; |
| std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; |
| std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; |
| jint jninewElement_0_operationalStateID = static_cast<jint>(entry_0.operationalStateID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), |
| jninewElement_0_operationalStateID, newElement_0_operationalStateID); |
| jobject newElement_0_operationalStateLabel; |
| if (!entry_0.operationalStateLabel.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); |
| } |
| else |
| { |
| jobject newElement_0_operationalStateLabelInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.operationalStateLabel.Value(), newElement_0_operationalStateLabelInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, |
| newElement_0_operationalStateLabel); |
| } |
| |
| jclass operationalStateStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", |
| operationalStateStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); |
| return nullptr; |
| } |
| jmethodID operationalStateStructStructCtor_1 = |
| env->GetMethodID(operationalStateStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); |
| if (operationalStateStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, |
| newElement_0_operationalStateID, newElement_0_operationalStateLabel); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::OperationalState::Id: { |
| using TypeInfo = Attributes::OperationalState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OperationalError::Id: { |
| using TypeInfo = Attributes::OperationalError::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_errorStateID; |
| std::string value_errorStateIDClassName = "java/lang/Integer"; |
| std::string value_errorStateIDCtorSignature = "(I)V"; |
| jint jnivalue_errorStateID = static_cast<jint>(cppValue.errorStateID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_errorStateIDClassName.c_str(), |
| value_errorStateIDCtorSignature.c_str(), |
| jnivalue_errorStateID, value_errorStateID); |
| jobject value_errorStateLabel; |
| if (!cppValue.errorStateLabel.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateLabel); |
| } |
| else |
| { |
| jobject value_errorStateLabelInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateLabel.Value(), |
| value_errorStateLabelInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_errorStateLabelInsideOptional, value_errorStateLabel); |
| } |
| jobject value_errorStateDetails; |
| if (!cppValue.errorStateDetails.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_errorStateDetails); |
| } |
| else |
| { |
| jobject value_errorStateDetailsInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.errorStateDetails.Value(), |
| value_errorStateDetailsInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); |
| } |
| |
| jclass errorStateStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); |
| return nullptr; |
| } |
| jmethodID errorStateStructStructCtor_0 = env->GetMethodID( |
| errorStateStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (errorStateStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, |
| value_errorStateLabel, value_errorStateDetails); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::HepaFilterMonitoring::Id: { |
| using namespace app::Clusters::HepaFilterMonitoring; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Condition::Id: { |
| using TypeInfo = Attributes::Condition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DegradationDirection::Id: { |
| using TypeInfo = Attributes::DegradationDirection::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ChangeIndication::Id: { |
| using TypeInfo = Attributes::ChangeIndication::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InPlaceIndicator::Id: { |
| using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::LastChangedTime::Id: { |
| using TypeInfo = Attributes::LastChangedTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ReplacementProductList::Id: { |
| using TypeInfo = Attributes::ReplacementProductList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_productIdentifierType; |
| std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; |
| std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; |
| jint jninewElement_0_productIdentifierType = static_cast<jint>(entry_0.productIdentifierType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), |
| jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); |
| jobject newElement_0_productIdentifierValue; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, |
| newElement_0_productIdentifierValue)); |
| |
| jclass replacementProductStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", |
| replacementProductStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); |
| return nullptr; |
| } |
| jmethodID replacementProductStructStructCtor_1 = |
| env->GetMethodID(replacementProductStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (replacementProductStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, |
| newElement_0_productIdentifierType, newElement_0_productIdentifierValue); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { |
| using namespace app::Clusters::ActivatedCarbonFilterMonitoring; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Condition::Id: { |
| using TypeInfo = Attributes::Condition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DegradationDirection::Id: { |
| using TypeInfo = Attributes::DegradationDirection::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ChangeIndication::Id: { |
| using TypeInfo = Attributes::ChangeIndication::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InPlaceIndicator::Id: { |
| using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::LastChangedTime::Id: { |
| using TypeInfo = Attributes::LastChangedTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ReplacementProductList::Id: { |
| using TypeInfo = Attributes::ReplacementProductList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_productIdentifierType; |
| std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; |
| std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; |
| jint jninewElement_0_productIdentifierType = static_cast<jint>(entry_0.productIdentifierType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), |
| jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); |
| jobject newElement_0_productIdentifierValue; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, |
| newElement_0_productIdentifierValue)); |
| |
| jclass replacementProductStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", |
| replacementProductStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, |
| "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); |
| return nullptr; |
| } |
| jmethodID replacementProductStructStructCtor_1 = |
| env->GetMethodID(replacementProductStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (replacementProductStructStructCtor_1 == nullptr) |
| { |
| ChipLogError( |
| Zcl, |
| "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, |
| newElement_0_productIdentifierType, newElement_0_productIdentifierValue); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::DoorLock::Id: { |
| using namespace app::Clusters::DoorLock; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::LockState::Id: { |
| using TypeInfo = Attributes::LockState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LockType::Id: { |
| using TypeInfo = Attributes::LockType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActuatorEnabled::Id: { |
| using TypeInfo = Attributes::ActuatorEnabled::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::DoorState::Id: { |
| using TypeInfo = Attributes::DoorState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::DoorOpenEvents::Id: { |
| using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::DoorClosedEvents::Id: { |
| using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::OpenPeriod::Id: { |
| using TypeInfo = Attributes::OpenPeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfTotalUsersSupported::Id: { |
| using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfPINUsersSupported::Id: { |
| using TypeInfo = Attributes::NumberOfPINUsersSupported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfRFIDUsersSupported::Id: { |
| using TypeInfo = Attributes::NumberOfRFIDUsersSupported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { |
| using TypeInfo = Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { |
| using TypeInfo = Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfHolidaySchedulesSupported::Id: { |
| using TypeInfo = Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxPINCodeLength::Id: { |
| using TypeInfo = Attributes::MaxPINCodeLength::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinPINCodeLength::Id: { |
| using TypeInfo = Attributes::MinPINCodeLength::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxRFIDCodeLength::Id: { |
| using TypeInfo = Attributes::MaxRFIDCodeLength::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinRFIDCodeLength::Id: { |
| using TypeInfo = Attributes::MinRFIDCodeLength::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CredentialRulesSupport::Id: { |
| using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfCredentialsSupportedPerUser::Id: { |
| using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Language::Id: { |
| using TypeInfo = Attributes::Language::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::LEDSettings::Id: { |
| using TypeInfo = Attributes::LEDSettings::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AutoRelockTime::Id: { |
| using TypeInfo = Attributes::AutoRelockTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::SoundVolume::Id: { |
| using TypeInfo = Attributes::SoundVolume::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OperatingMode::Id: { |
| using TypeInfo = Attributes::OperatingMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SupportedOperatingModes::Id: { |
| using TypeInfo = Attributes::SupportedOperatingModes::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DefaultConfigurationRegister::Id: { |
| using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::EnableLocalProgramming::Id: { |
| using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::EnableOneTouchLocking::Id: { |
| using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::EnableInsideStatusLED::Id: { |
| using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::EnablePrivacyModeButton::Id: { |
| using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::LocalProgrammingFeatures::Id: { |
| using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::WrongCodeEntryLimit::Id: { |
| using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UserCodeTemporaryDisableTime::Id: { |
| using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SendPINOverTheAir::Id: { |
| using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::RequirePINforRemoteOperation::Id: { |
| using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ExpiringUserTimeout::Id: { |
| using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::WindowCovering::Id: { |
| using namespace app::Clusters::WindowCovering; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Type::Id: { |
| using TypeInfo = Attributes::Type::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalClosedLimitLift::Id: { |
| using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalClosedLimitTilt::Id: { |
| using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentPositionLift::Id: { |
| using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CurrentPositionTilt::Id: { |
| using TypeInfo = Attributes::CurrentPositionTilt::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NumberOfActuationsLift::Id: { |
| using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfActuationsTilt::Id: { |
| using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ConfigStatus::Id: { |
| using TypeInfo = Attributes::ConfigStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentPositionLiftPercentage::Id: { |
| using TypeInfo = Attributes::CurrentPositionLiftPercentage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CurrentPositionTiltPercentage::Id: { |
| using TypeInfo = Attributes::CurrentPositionTiltPercentage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OperationalStatus::Id: { |
| using TypeInfo = Attributes::OperationalStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TargetPositionLiftPercent100ths::Id: { |
| using TypeInfo = Attributes::TargetPositionLiftPercent100ths::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::TargetPositionTiltPercent100ths::Id: { |
| using TypeInfo = Attributes::TargetPositionTiltPercent100ths::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::EndProductType::Id: { |
| using TypeInfo = Attributes::EndProductType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentPositionLiftPercent100ths::Id: { |
| using TypeInfo = Attributes::CurrentPositionLiftPercent100ths::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::CurrentPositionTiltPercent100ths::Id: { |
| using TypeInfo = Attributes::CurrentPositionTiltPercent100ths::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::InstalledOpenLimitLift::Id: { |
| using TypeInfo = Attributes::InstalledOpenLimitLift::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstalledClosedLimitLift::Id: { |
| using TypeInfo = Attributes::InstalledClosedLimitLift::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstalledOpenLimitTilt::Id: { |
| using TypeInfo = Attributes::InstalledOpenLimitTilt::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstalledClosedLimitTilt::Id: { |
| using TypeInfo = Attributes::InstalledClosedLimitTilt::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Mode::Id: { |
| using TypeInfo = Attributes::Mode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SafetyStatus::Id: { |
| using TypeInfo = Attributes::SafetyStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BarrierControl::Id: { |
| using namespace app::Clusters::BarrierControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::BarrierMovingState::Id: { |
| using TypeInfo = Attributes::BarrierMovingState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierSafetyStatus::Id: { |
| using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierCapabilities::Id: { |
| using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierOpenEvents::Id: { |
| using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierCloseEvents::Id: { |
| using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierCommandOpenEvents::Id: { |
| using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierCommandCloseEvents::Id: { |
| using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierOpenPeriod::Id: { |
| using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierClosePeriod::Id: { |
| using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BarrierPosition::Id: { |
| using TypeInfo = Attributes::BarrierPosition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::PumpConfigurationAndControl::Id: { |
| using namespace app::Clusters::PumpConfigurationAndControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MaxPressure::Id: { |
| using TypeInfo = Attributes::MaxPressure::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxSpeed::Id: { |
| using TypeInfo = Attributes::MaxSpeed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxFlow::Id: { |
| using TypeInfo = Attributes::MaxFlow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinConstPressure::Id: { |
| using TypeInfo = Attributes::MinConstPressure::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxConstPressure::Id: { |
| using TypeInfo = Attributes::MaxConstPressure::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinCompPressure::Id: { |
| using TypeInfo = Attributes::MinCompPressure::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxCompPressure::Id: { |
| using TypeInfo = Attributes::MaxCompPressure::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinConstSpeed::Id: { |
| using TypeInfo = Attributes::MinConstSpeed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxConstSpeed::Id: { |
| using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinConstFlow::Id: { |
| using TypeInfo = Attributes::MinConstFlow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxConstFlow::Id: { |
| using TypeInfo = Attributes::MaxConstFlow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinConstTemp::Id: { |
| using TypeInfo = Attributes::MinConstTemp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxConstTemp::Id: { |
| using TypeInfo = Attributes::MaxConstTemp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PumpStatus::Id: { |
| using TypeInfo = Attributes::PumpStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::EffectiveOperationMode::Id: { |
| using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::EffectiveControlMode::Id: { |
| using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Capacity::Id: { |
| using TypeInfo = Attributes::Capacity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Speed::Id: { |
| using TypeInfo = Attributes::Speed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LifetimeRunningHours::Id: { |
| using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Power::Id: { |
| using TypeInfo = Attributes::Power::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LifetimeEnergyConsumed::Id: { |
| using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OperationMode::Id: { |
| using TypeInfo = Attributes::OperationMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ControlMode::Id: { |
| using TypeInfo = Attributes::ControlMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Thermostat::Id: { |
| using namespace app::Clusters::Thermostat; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::LocalTemperature::Id: { |
| using TypeInfo = Attributes::LocalTemperature::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OutdoorTemperature::Id: { |
| using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Occupancy::Id: { |
| using TypeInfo = Attributes::Occupancy::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AbsMinHeatSetpointLimit::Id: { |
| using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AbsMaxHeatSetpointLimit::Id: { |
| using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AbsMinCoolSetpointLimit::Id: { |
| using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AbsMaxCoolSetpointLimit::Id: { |
| using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PICoolingDemand::Id: { |
| using TypeInfo = Attributes::PICoolingDemand::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PIHeatingDemand::Id: { |
| using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::HVACSystemTypeConfiguration::Id: { |
| using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LocalTemperatureCalibration::Id: { |
| using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OccupiedCoolingSetpoint::Id: { |
| using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OccupiedHeatingSetpoint::Id: { |
| using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UnoccupiedCoolingSetpoint::Id: { |
| using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UnoccupiedHeatingSetpoint::Id: { |
| using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinHeatSetpointLimit::Id: { |
| using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxHeatSetpointLimit::Id: { |
| using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinCoolSetpointLimit::Id: { |
| using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxCoolSetpointLimit::Id: { |
| using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinSetpointDeadBand::Id: { |
| using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RemoteSensing::Id: { |
| using TypeInfo = Attributes::RemoteSensing::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ControlSequenceOfOperation::Id: { |
| using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SystemMode::Id: { |
| using TypeInfo = Attributes::SystemMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ThermostatRunningMode::Id: { |
| using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartOfWeek::Id: { |
| using TypeInfo = Attributes::StartOfWeek::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfWeeklyTransitions::Id: { |
| using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfDailyTransitions::Id: { |
| using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TemperatureSetpointHold::Id: { |
| using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TemperatureSetpointHoldDuration::Id: { |
| using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ThermostatProgrammingOperationMode::Id: { |
| using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ThermostatRunningState::Id: { |
| using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SetpointChangeSource::Id: { |
| using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SetpointChangeAmount::Id: { |
| using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SetpointChangeSourceTimestamp::Id: { |
| using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::OccupiedSetback::Id: { |
| using TypeInfo = Attributes::OccupiedSetback::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OccupiedSetbackMin::Id: { |
| using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::OccupiedSetbackMax::Id: { |
| using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::UnoccupiedSetback::Id: { |
| using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::UnoccupiedSetbackMin::Id: { |
| using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::UnoccupiedSetbackMax::Id: { |
| using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::EmergencyHeatDelta::Id: { |
| using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACType::Id: { |
| using TypeInfo = Attributes::ACType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACCapacity::Id: { |
| using TypeInfo = Attributes::ACCapacity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACRefrigerantType::Id: { |
| using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACCompressorType::Id: { |
| using TypeInfo = Attributes::ACCompressorType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACErrorCode::Id: { |
| using TypeInfo = Attributes::ACErrorCode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ACLouverPosition::Id: { |
| using TypeInfo = Attributes::ACLouverPosition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ACCoilTemperature::Id: { |
| using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ACCapacityformat::Id: { |
| using TypeInfo = Attributes::ACCapacityformat::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::FanControl::Id: { |
| using namespace app::Clusters::FanControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::FanMode::Id: { |
| using TypeInfo = Attributes::FanMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::FanModeSequence::Id: { |
| using TypeInfo = Attributes::FanModeSequence::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PercentSetting::Id: { |
| using TypeInfo = Attributes::PercentSetting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PercentCurrent::Id: { |
| using TypeInfo = Attributes::PercentCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SpeedMax::Id: { |
| using TypeInfo = Attributes::SpeedMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::SpeedSetting::Id: { |
| using TypeInfo = Attributes::SpeedSetting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SpeedCurrent::Id: { |
| using TypeInfo = Attributes::SpeedCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RockSupport::Id: { |
| using TypeInfo = Attributes::RockSupport::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RockSetting::Id: { |
| using TypeInfo = Attributes::RockSetting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::WindSupport::Id: { |
| using TypeInfo = Attributes::WindSupport::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::WindSetting::Id: { |
| using TypeInfo = Attributes::WindSetting::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AirflowDirection::Id: { |
| using TypeInfo = Attributes::AirflowDirection::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ThermostatUserInterfaceConfiguration::Id: { |
| using namespace app::Clusters::ThermostatUserInterfaceConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::TemperatureDisplayMode::Id: { |
| using TypeInfo = Attributes::TemperatureDisplayMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::KeypadLockout::Id: { |
| using TypeInfo = Attributes::KeypadLockout::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ScheduleProgrammingVisibility::Id: { |
| using TypeInfo = Attributes::ScheduleProgrammingVisibility::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ColorControl::Id: { |
| using namespace app::Clusters::ColorControl; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::CurrentHue::Id: { |
| using TypeInfo = Attributes::CurrentHue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentSaturation::Id: { |
| using TypeInfo = Attributes::CurrentSaturation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RemainingTime::Id: { |
| using TypeInfo = Attributes::RemainingTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentX::Id: { |
| using TypeInfo = Attributes::CurrentX::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentY::Id: { |
| using TypeInfo = Attributes::CurrentY::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DriftCompensation::Id: { |
| using TypeInfo = Attributes::DriftCompensation::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CompensationText::Id: { |
| using TypeInfo = Attributes::CompensationText::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ColorTemperatureMireds::Id: { |
| using TypeInfo = Attributes::ColorTemperatureMireds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorMode::Id: { |
| using TypeInfo = Attributes::ColorMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Options::Id: { |
| using TypeInfo = Attributes::Options::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NumberOfPrimaries::Id: { |
| using TypeInfo = Attributes::NumberOfPrimaries::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary1X::Id: { |
| using TypeInfo = Attributes::Primary1X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary1Y::Id: { |
| using TypeInfo = Attributes::Primary1Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary1Intensity::Id: { |
| using TypeInfo = Attributes::Primary1Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary2X::Id: { |
| using TypeInfo = Attributes::Primary2X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary2Y::Id: { |
| using TypeInfo = Attributes::Primary2Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary2Intensity::Id: { |
| using TypeInfo = Attributes::Primary2Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary3X::Id: { |
| using TypeInfo = Attributes::Primary3X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary3Y::Id: { |
| using TypeInfo = Attributes::Primary3Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary3Intensity::Id: { |
| using TypeInfo = Attributes::Primary3Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary4X::Id: { |
| using TypeInfo = Attributes::Primary4X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary4Y::Id: { |
| using TypeInfo = Attributes::Primary4Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary4Intensity::Id: { |
| using TypeInfo = Attributes::Primary4Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary5X::Id: { |
| using TypeInfo = Attributes::Primary5X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary5Y::Id: { |
| using TypeInfo = Attributes::Primary5Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary5Intensity::Id: { |
| using TypeInfo = Attributes::Primary5Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Primary6X::Id: { |
| using TypeInfo = Attributes::Primary6X::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary6Y::Id: { |
| using TypeInfo = Attributes::Primary6Y::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Primary6Intensity::Id: { |
| using TypeInfo = Attributes::Primary6Intensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WhitePointX::Id: { |
| using TypeInfo = Attributes::WhitePointX::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::WhitePointY::Id: { |
| using TypeInfo = Attributes::WhitePointY::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointRX::Id: { |
| using TypeInfo = Attributes::ColorPointRX::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointRY::Id: { |
| using TypeInfo = Attributes::ColorPointRY::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointRIntensity::Id: { |
| using TypeInfo = Attributes::ColorPointRIntensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ColorPointGX::Id: { |
| using TypeInfo = Attributes::ColorPointGX::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointGY::Id: { |
| using TypeInfo = Attributes::ColorPointGY::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointGIntensity::Id: { |
| using TypeInfo = Attributes::ColorPointGIntensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ColorPointBX::Id: { |
| using TypeInfo = Attributes::ColorPointBX::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointBY::Id: { |
| using TypeInfo = Attributes::ColorPointBY::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorPointBIntensity::Id: { |
| using TypeInfo = Attributes::ColorPointBIntensity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::EnhancedCurrentHue::Id: { |
| using TypeInfo = Attributes::EnhancedCurrentHue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::EnhancedColorMode::Id: { |
| using TypeInfo = Attributes::EnhancedColorMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorLoopActive::Id: { |
| using TypeInfo = Attributes::ColorLoopActive::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorLoopDirection::Id: { |
| using TypeInfo = Attributes::ColorLoopDirection::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorLoopTime::Id: { |
| using TypeInfo = Attributes::ColorLoopTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorLoopStartEnhancedHue::Id: { |
| using TypeInfo = Attributes::ColorLoopStartEnhancedHue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorLoopStoredEnhancedHue::Id: { |
| using TypeInfo = Attributes::ColorLoopStoredEnhancedHue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorCapabilities::Id: { |
| using TypeInfo = Attributes::ColorCapabilities::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorTempPhysicalMinMireds::Id: { |
| using TypeInfo = Attributes::ColorTempPhysicalMinMireds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ColorTempPhysicalMaxMireds::Id: { |
| using TypeInfo = Attributes::ColorTempPhysicalMaxMireds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CoupleColorTempToLevelMinMireds::Id: { |
| using TypeInfo = Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartUpColorTemperatureMireds::Id: { |
| using TypeInfo = Attributes::StartUpColorTemperatureMireds::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::BallastConfiguration::Id: { |
| using namespace app::Clusters::BallastConfiguration; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::PhysicalMinLevel::Id: { |
| using TypeInfo = Attributes::PhysicalMinLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalMaxLevel::Id: { |
| using TypeInfo = Attributes::PhysicalMaxLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::BallastStatus::Id: { |
| using TypeInfo = Attributes::BallastStatus::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MinLevel::Id: { |
| using TypeInfo = Attributes::MinLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MaxLevel::Id: { |
| using TypeInfo = Attributes::MaxLevel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::IntrinsicBallastFactor::Id: { |
| using TypeInfo = Attributes::IntrinsicBallastFactor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::BallastFactorAdjustment::Id: { |
| using TypeInfo = Attributes::BallastFactorAdjustment::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LampQuantity::Id: { |
| using TypeInfo = Attributes::LampQuantity::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LampType::Id: { |
| using TypeInfo = Attributes::LampType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::LampManufacturer::Id: { |
| using TypeInfo = Attributes::LampManufacturer::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::LampRatedHours::Id: { |
| using TypeInfo = Attributes::LampRatedHours::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LampBurnHours::Id: { |
| using TypeInfo = Attributes::LampBurnHours::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::LampAlarmMode::Id: { |
| using TypeInfo = Attributes::LampAlarmMode::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LampBurnHoursTripPoint::Id: { |
| using TypeInfo = Attributes::LampBurnHoursTripPoint::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::IlluminanceMeasurement::Id: { |
| using namespace app::Clusters::IlluminanceMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Tolerance::Id: { |
| using TypeInfo = Attributes::Tolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LightSensorType::Id: { |
| using TypeInfo = Attributes::LightSensorType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TemperatureMeasurement::Id: { |
| using namespace app::Clusters::TemperatureMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Tolerance::Id: { |
| using TypeInfo = Attributes::Tolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::PressureMeasurement::Id: { |
| using namespace app::Clusters::PressureMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Tolerance::Id: { |
| using TypeInfo = Attributes::Tolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ScaledValue::Id: { |
| using TypeInfo = Attributes::ScaledValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinScaledValue::Id: { |
| using TypeInfo = Attributes::MinScaledValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxScaledValue::Id: { |
| using TypeInfo = Attributes::MaxScaledValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::ScaledTolerance::Id: { |
| using TypeInfo = Attributes::ScaledTolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Scale::Id: { |
| using TypeInfo = Attributes::Scale::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::FlowMeasurement::Id: { |
| using namespace app::Clusters::FlowMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Tolerance::Id: { |
| using TypeInfo = Attributes::Tolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RelativeHumidityMeasurement::Id: { |
| using namespace app::Clusters::RelativeHumidityMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Tolerance::Id: { |
| using TypeInfo = Attributes::Tolerance::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OccupancySensing::Id: { |
| using namespace app::Clusters::OccupancySensing; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Occupancy::Id: { |
| using TypeInfo = Attributes::Occupancy::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OccupancySensorType::Id: { |
| using TypeInfo = Attributes::OccupancySensorType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OccupancySensorTypeBitmap::Id: { |
| using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PIROccupiedToUnoccupiedDelay::Id: { |
| using TypeInfo = Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PIRUnoccupiedToOccupiedDelay::Id: { |
| using TypeInfo = Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PIRUnoccupiedToOccupiedThreshold::Id: { |
| using TypeInfo = Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { |
| using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { |
| using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { |
| using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { |
| using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { |
| using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { |
| using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::CarbonMonoxideConcentrationMeasurement::Id: { |
| using namespace app::Clusters::CarbonMonoxideConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::CarbonDioxideConcentrationMeasurement::Id: { |
| using namespace app::Clusters::CarbonDioxideConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::NitrogenDioxideConcentrationMeasurement::Id: { |
| using namespace app::Clusters::NitrogenDioxideConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::OzoneConcentrationMeasurement::Id: { |
| using namespace app::Clusters::OzoneConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Pm25ConcentrationMeasurement::Id: { |
| using namespace app::Clusters::Pm25ConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::FormaldehydeConcentrationMeasurement::Id: { |
| using namespace app::Clusters::FormaldehydeConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Pm1ConcentrationMeasurement::Id: { |
| using namespace app::Clusters::Pm1ConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Pm10ConcentrationMeasurement::Id: { |
| using namespace app::Clusters::Pm10ConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id: { |
| using namespace app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::RadonConcentrationMeasurement::Id: { |
| using namespace app::Clusters::RadonConcentrationMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasuredValue::Id: { |
| using TypeInfo = Attributes::MeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MinMeasuredValue::Id: { |
| using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::MaxMeasuredValue::Id: { |
| using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValue::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::PeakMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::PeakMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::AverageMeasuredValue::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::AverageMeasuredValueWindow::Id: { |
| using TypeInfo = Attributes::AverageMeasuredValueWindow::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Uncertainty::Id: { |
| using TypeInfo = Attributes::Uncertainty::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::MeasurementUnit::Id: { |
| using TypeInfo = Attributes::MeasurementUnit::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasurementMedium::Id: { |
| using TypeInfo = Attributes::MeasurementMedium::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LevelValue::Id: { |
| using TypeInfo = Attributes::LevelValue::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::WakeOnLan::Id: { |
| using namespace app::Clusters::WakeOnLan; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MACAddress::Id: { |
| using TypeInfo = Attributes::MACAddress::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::Channel::Id: { |
| using namespace app::Clusters::Channel; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::ChannelList::Id: { |
| using TypeInfo = Attributes::ChannelList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_majorNumber; |
| std::string newElement_0_majorNumberClassName = "java/lang/Integer"; |
| std::string newElement_0_majorNumberCtorSignature = "(I)V"; |
| jint jninewElement_0_majorNumber = static_cast<jint>(entry_0.majorNumber); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_majorNumberClassName.c_str(), |
| newElement_0_majorNumberCtorSignature.c_str(), |
| jninewElement_0_majorNumber, newElement_0_majorNumber); |
| jobject newElement_0_minorNumber; |
| std::string newElement_0_minorNumberClassName = "java/lang/Integer"; |
| std::string newElement_0_minorNumberCtorSignature = "(I)V"; |
| jint jninewElement_0_minorNumber = static_cast<jint>(entry_0.minorNumber); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_minorNumberClassName.c_str(), |
| newElement_0_minorNumberCtorSignature.c_str(), |
| jninewElement_0_minorNumber, newElement_0_minorNumber); |
| jobject newElement_0_name; |
| if (!entry_0.name.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); |
| } |
| else |
| { |
| jobject newElement_0_nameInsideOptional; |
| LogErrorOnFailure( |
| chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); |
| } |
| jobject newElement_0_callSign; |
| if (!entry_0.callSign.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_callSign); |
| } |
| else |
| { |
| jobject newElement_0_callSignInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.callSign.Value(), |
| newElement_0_callSignInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_callSignInsideOptional, newElement_0_callSign); |
| } |
| jobject newElement_0_affiliateCallSign; |
| if (!entry_0.affiliateCallSign.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_affiliateCallSign); |
| } |
| else |
| { |
| jobject newElement_0_affiliateCallSignInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.affiliateCallSign.Value(), newElement_0_affiliateCallSignInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_affiliateCallSignInsideOptional, |
| newElement_0_affiliateCallSign); |
| } |
| |
| jclass channelInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); |
| return nullptr; |
| } |
| jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( |
| channelInfoStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (channelInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, |
| newElement_0_majorNumber, newElement_0_minorNumber, newElement_0_name, |
| newElement_0_callSign, newElement_0_affiliateCallSign); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::Lineup::Id: { |
| using TypeInfo = Attributes::Lineup::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_operatorName; |
| LogErrorOnFailure( |
| chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().operatorName, value_operatorName)); |
| jobject value_lineupName; |
| if (!cppValue.Value().lineupName.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_lineupName); |
| } |
| else |
| { |
| jobject value_lineupNameInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().lineupName.Value(), |
| value_lineupNameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_lineupNameInsideOptional, value_lineupName); |
| } |
| jobject value_postalCode; |
| if (!cppValue.Value().postalCode.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_postalCode); |
| } |
| else |
| { |
| jobject value_postalCodeInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().postalCode.Value(), |
| value_postalCodeInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_postalCodeInsideOptional, value_postalCode); |
| } |
| jobject value_lineupInfoType; |
| std::string value_lineupInfoTypeClassName = "java/lang/Integer"; |
| std::string value_lineupInfoTypeCtorSignature = "(I)V"; |
| jint jnivalue_lineupInfoType = static_cast<jint>(cppValue.Value().lineupInfoType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_lineupInfoTypeClassName.c_str(), |
| value_lineupInfoTypeCtorSignature.c_str(), |
| jnivalue_lineupInfoType, value_lineupInfoType); |
| |
| jclass lineupInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfoStruct", lineupInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfoStruct"); |
| return nullptr; |
| } |
| jmethodID lineupInfoStructStructCtor_1 = |
| env->GetMethodID(lineupInfoStructStructClass_1, "<init>", |
| "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V"); |
| if (lineupInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(lineupInfoStructStructClass_1, lineupInfoStructStructCtor_1, value_operatorName, |
| value_lineupName, value_postalCode, value_lineupInfoType); |
| } |
| return value; |
| } |
| case Attributes::CurrentChannel::Id: { |
| using TypeInfo = Attributes::CurrentChannel::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_majorNumber; |
| std::string value_majorNumberClassName = "java/lang/Integer"; |
| std::string value_majorNumberCtorSignature = "(I)V"; |
| jint jnivalue_majorNumber = static_cast<jint>(cppValue.Value().majorNumber); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_majorNumberClassName.c_str(), |
| value_majorNumberCtorSignature.c_str(), |
| jnivalue_majorNumber, value_majorNumber); |
| jobject value_minorNumber; |
| std::string value_minorNumberClassName = "java/lang/Integer"; |
| std::string value_minorNumberCtorSignature = "(I)V"; |
| jint jnivalue_minorNumber = static_cast<jint>(cppValue.Value().minorNumber); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_minorNumberClassName.c_str(), |
| value_minorNumberCtorSignature.c_str(), |
| jnivalue_minorNumber, value_minorNumber); |
| jobject value_name; |
| if (!cppValue.Value().name.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_name); |
| } |
| else |
| { |
| jobject value_nameInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().name.Value(), |
| value_nameInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_nameInsideOptional, value_name); |
| } |
| jobject value_callSign; |
| if (!cppValue.Value().callSign.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_callSign); |
| } |
| else |
| { |
| jobject value_callSignInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().callSign.Value(), |
| value_callSignInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_callSignInsideOptional, value_callSign); |
| } |
| jobject value_affiliateCallSign; |
| if (!cppValue.Value().affiliateCallSign.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_affiliateCallSign); |
| } |
| else |
| { |
| jobject value_affiliateCallSignInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().affiliateCallSign.Value(), |
| value_affiliateCallSignInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(value_affiliateCallSignInsideOptional, |
| value_affiliateCallSign); |
| } |
| |
| jclass channelInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); |
| return nullptr; |
| } |
| jmethodID channelInfoStructStructCtor_1 = env->GetMethodID( |
| channelInfoStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (channelInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, value_majorNumber, |
| value_minorNumber, value_name, value_callSign, value_affiliateCallSign); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::TargetNavigator::Id: { |
| using namespace app::Clusters::TargetNavigator; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::TargetList::Id: { |
| using TypeInfo = Attributes::TargetList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_identifier; |
| std::string newElement_0_identifierClassName = "java/lang/Integer"; |
| std::string newElement_0_identifierCtorSignature = "(I)V"; |
| jint jninewElement_0_identifier = static_cast<jint>(entry_0.identifier); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_identifierClassName.c_str(), |
| newElement_0_identifierCtorSignature.c_str(), |
| jninewElement_0_identifier, newElement_0_identifier); |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| |
| jclass targetInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); |
| return nullptr; |
| } |
| jmethodID targetInfoStructStructCtor_1 = |
| env->GetMethodID(targetInfoStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (targetInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, |
| newElement_0_name); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentTarget::Id: { |
| using TypeInfo = Attributes::CurrentTarget::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::MediaPlayback::Id: { |
| using namespace app::Clusters::MediaPlayback; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::CurrentState::Id: { |
| using TypeInfo = Attributes::CurrentState::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StartTime::Id: { |
| using TypeInfo = Attributes::StartTime::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::Duration::Id: { |
| using TypeInfo = Attributes::Duration::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SampledPosition::Id: { |
| using TypeInfo = Attributes::SampledPosition::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_updatedAt; |
| std::string value_updatedAtClassName = "java/lang/Long"; |
| std::string value_updatedAtCtorSignature = "(J)V"; |
| jlong jnivalue_updatedAt = static_cast<jlong>(cppValue.Value().updatedAt); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| value_updatedAtClassName.c_str(), value_updatedAtCtorSignature.c_str(), jnivalue_updatedAt, value_updatedAt); |
| jobject value_position; |
| if (cppValue.Value().position.IsNull()) |
| { |
| value_position = nullptr; |
| } |
| else |
| { |
| std::string value_positionClassName = "java/lang/Long"; |
| std::string value_positionCtorSignature = "(J)V"; |
| jlong jnivalue_position = static_cast<jlong>(cppValue.Value().position.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| value_positionClassName.c_str(), value_positionCtorSignature.c_str(), jnivalue_position, value_position); |
| } |
| |
| jclass playbackPositionStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", |
| playbackPositionStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); |
| return nullptr; |
| } |
| jmethodID playbackPositionStructStructCtor_1 = |
| env->GetMethodID(playbackPositionStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Long;)V"); |
| if (playbackPositionStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, value_updatedAt, |
| value_position); |
| } |
| return value; |
| } |
| case Attributes::PlaybackSpeed::Id: { |
| using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::SeekRangeEnd::Id: { |
| using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::SeekRangeStart::Id: { |
| using TypeInfo = Attributes::SeekRangeStart::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::MediaInput::Id: { |
| using namespace app::Clusters::MediaInput; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::InputList::Id: { |
| using TypeInfo = Attributes::InputList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_index; |
| std::string newElement_0_indexClassName = "java/lang/Integer"; |
| std::string newElement_0_indexCtorSignature = "(I)V"; |
| jint jninewElement_0_index = static_cast<jint>(entry_0.index); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_indexClassName.c_str(), |
| newElement_0_indexCtorSignature.c_str(), |
| jninewElement_0_index, newElement_0_index); |
| jobject newElement_0_inputType; |
| std::string newElement_0_inputTypeClassName = "java/lang/Integer"; |
| std::string newElement_0_inputTypeCtorSignature = "(I)V"; |
| jint jninewElement_0_inputType = static_cast<jint>(entry_0.inputType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_inputTypeClassName.c_str(), |
| newElement_0_inputTypeCtorSignature.c_str(), |
| jninewElement_0_inputType, newElement_0_inputType); |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| jobject newElement_0_description; |
| LogErrorOnFailure( |
| chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); |
| |
| jclass inputInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); |
| return nullptr; |
| } |
| jmethodID inputInfoStructStructCtor_1 = |
| env->GetMethodID(inputInfoStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); |
| if (inputInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, |
| newElement_0_inputType, newElement_0_name, newElement_0_description); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentInput::Id: { |
| using TypeInfo = Attributes::CurrentInput::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::LowPower::Id: { |
| using namespace app::Clusters::LowPower; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::KeypadInput::Id: { |
| using namespace app::Clusters::KeypadInput; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ContentLauncher::Id: { |
| using namespace app::Clusters::ContentLauncher; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::AcceptHeader::Id: { |
| using TypeInfo = Attributes::AcceptHeader::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::SupportedStreamingProtocols::Id: { |
| using TypeInfo = Attributes::SupportedStreamingProtocols::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::AudioOutput::Id: { |
| using namespace app::Clusters::AudioOutput; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::OutputList::Id: { |
| using TypeInfo = Attributes::OutputList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_index; |
| std::string newElement_0_indexClassName = "java/lang/Integer"; |
| std::string newElement_0_indexCtorSignature = "(I)V"; |
| jint jninewElement_0_index = static_cast<jint>(entry_0.index); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_indexClassName.c_str(), |
| newElement_0_indexCtorSignature.c_str(), |
| jninewElement_0_index, newElement_0_index); |
| jobject newElement_0_outputType; |
| std::string newElement_0_outputTypeClassName = "java/lang/Integer"; |
| std::string newElement_0_outputTypeCtorSignature = "(I)V"; |
| jint jninewElement_0_outputType = static_cast<jint>(entry_0.outputType); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_outputTypeClassName.c_str(), |
| newElement_0_outputTypeCtorSignature.c_str(), |
| jninewElement_0_outputType, newElement_0_outputType); |
| jobject newElement_0_name; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); |
| |
| jclass outputInfoStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); |
| return nullptr; |
| } |
| jmethodID outputInfoStructStructCtor_1 = env->GetMethodID( |
| outputInfoStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (outputInfoStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, |
| newElement_0_outputType, newElement_0_name); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentOutput::Id: { |
| using TypeInfo = Attributes::CurrentOutput::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ApplicationLauncher::Id: { |
| using namespace app::Clusters::ApplicationLauncher; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::CatalogList::Id: { |
| using TypeInfo = Attributes::CatalogList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::CurrentApp::Id: { |
| using TypeInfo = Attributes::CurrentApp::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_application; |
| jobject value_application_catalogVendorID; |
| std::string value_application_catalogVendorIDClassName = "java/lang/Integer"; |
| std::string value_application_catalogVendorIDCtorSignature = "(I)V"; |
| jint jnivalue_application_catalogVendorID = static_cast<jint>(cppValue.Value().application.catalogVendorID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_application_catalogVendorIDClassName.c_str(), value_application_catalogVendorIDCtorSignature.c_str(), |
| jnivalue_application_catalogVendorID, value_application_catalogVendorID); |
| jobject value_application_applicationID; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, |
| value_application_applicationID)); |
| |
| jclass applicationStructStructClass_2; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", |
| applicationStructStructClass_2); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); |
| return nullptr; |
| } |
| jmethodID applicationStructStructCtor_2 = |
| env->GetMethodID(applicationStructStructClass_2, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (applicationStructStructCtor_2 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); |
| return nullptr; |
| } |
| |
| value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, |
| value_application_catalogVendorID, value_application_applicationID); |
| jobject value_endpoint; |
| if (!cppValue.Value().endpoint.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, value_endpoint); |
| } |
| else |
| { |
| jobject value_endpointInsideOptional; |
| std::string value_endpointInsideOptionalClassName = "java/lang/Integer"; |
| std::string value_endpointInsideOptionalCtorSignature = "(I)V"; |
| jint jnivalue_endpointInsideOptional = static_cast<jint>(cppValue.Value().endpoint.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| value_endpointInsideOptionalClassName.c_str(), value_endpointInsideOptionalCtorSignature.c_str(), |
| jnivalue_endpointInsideOptional, value_endpointInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); |
| } |
| |
| jclass applicationEPStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", |
| applicationEPStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); |
| return nullptr; |
| } |
| jmethodID applicationEPStructStructCtor_1 = env->GetMethodID( |
| applicationEPStructStructClass_1, "<init>", |
| "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V"); |
| if (applicationEPStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, |
| value_endpoint); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ApplicationBasic::Id: { |
| using namespace app::Clusters::ApplicationBasic; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::VendorName::Id: { |
| using TypeInfo = Attributes::VendorName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::VendorID::Id: { |
| using TypeInfo = Attributes::VendorID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApplicationName::Id: { |
| using TypeInfo = Attributes::ApplicationName::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::ProductID::Id: { |
| using TypeInfo = Attributes::ProductID::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Application::Id: { |
| using TypeInfo = Attributes::Application::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_catalogVendorID; |
| std::string value_catalogVendorIDClassName = "java/lang/Integer"; |
| std::string value_catalogVendorIDCtorSignature = "(I)V"; |
| jint jnivalue_catalogVendorID = static_cast<jint>(cppValue.catalogVendorID); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_catalogVendorIDClassName.c_str(), |
| value_catalogVendorIDCtorSignature.c_str(), |
| jnivalue_catalogVendorID, value_catalogVendorID); |
| jobject value_applicationID; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); |
| |
| jclass applicationStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); |
| return nullptr; |
| } |
| jmethodID applicationStructStructCtor_0 = |
| env->GetMethodID(applicationStructStructClass_0, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V"); |
| if (applicationStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, |
| value_applicationID); |
| return value; |
| } |
| case Attributes::Status::Id: { |
| using TypeInfo = Attributes::Status::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApplicationVersion::Id: { |
| using TypeInfo = Attributes::ApplicationVersion::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::AllowedVendorList::Id: { |
| using TypeInfo = Attributes::AllowedVendorList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::AccountLogin::Id: { |
| using namespace app::Clusters::AccountLogin; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::ElectricalMeasurement::Id: { |
| using namespace app::Clusters::ElectricalMeasurement; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::MeasurementType::Id: { |
| using TypeInfo = Attributes::MeasurementType::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::DcVoltage::Id: { |
| using TypeInfo = Attributes::DcVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcVoltageMin::Id: { |
| using TypeInfo = Attributes::DcVoltageMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcVoltageMax::Id: { |
| using TypeInfo = Attributes::DcVoltageMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcCurrent::Id: { |
| using TypeInfo = Attributes::DcCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcCurrentMin::Id: { |
| using TypeInfo = Attributes::DcCurrentMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcCurrentMax::Id: { |
| using TypeInfo = Attributes::DcCurrentMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcPower::Id: { |
| using TypeInfo = Attributes::DcPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcPowerMin::Id: { |
| using TypeInfo = Attributes::DcPowerMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcPowerMax::Id: { |
| using TypeInfo = Attributes::DcPowerMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcVoltageMultiplier::Id: { |
| using TypeInfo = Attributes::DcVoltageMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcVoltageDivisor::Id: { |
| using TypeInfo = Attributes::DcVoltageDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcCurrentMultiplier::Id: { |
| using TypeInfo = Attributes::DcCurrentMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcCurrentDivisor::Id: { |
| using TypeInfo = Attributes::DcCurrentDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcPowerMultiplier::Id: { |
| using TypeInfo = Attributes::DcPowerMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::DcPowerDivisor::Id: { |
| using TypeInfo = Attributes::DcPowerDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcFrequency::Id: { |
| using TypeInfo = Attributes::AcFrequency::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcFrequencyMin::Id: { |
| using TypeInfo = Attributes::AcFrequencyMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcFrequencyMax::Id: { |
| using TypeInfo = Attributes::AcFrequencyMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::NeutralCurrent::Id: { |
| using TypeInfo = Attributes::NeutralCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::TotalActivePower::Id: { |
| using TypeInfo = Attributes::TotalActivePower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TotalReactivePower::Id: { |
| using TypeInfo = Attributes::TotalReactivePower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::TotalApparentPower::Id: { |
| using TypeInfo = Attributes::TotalApparentPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Measured1stHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured1stHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Measured3rdHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured3rdHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Measured5thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured5thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Measured7thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured7thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Measured9thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured9thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Measured11thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::Measured11thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { |
| using TypeInfo = Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcFrequencyMultiplier::Id: { |
| using TypeInfo = Attributes::AcFrequencyMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcFrequencyDivisor::Id: { |
| using TypeInfo = Attributes::AcFrequencyDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PowerMultiplier::Id: { |
| using TypeInfo = Attributes::PowerMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::PowerDivisor::Id: { |
| using TypeInfo = Attributes::PowerDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::HarmonicCurrentMultiplier::Id: { |
| using TypeInfo = Attributes::HarmonicCurrentMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PhaseHarmonicCurrentMultiplier::Id: { |
| using TypeInfo = Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstantaneousVoltage::Id: { |
| using TypeInfo = Attributes::InstantaneousVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstantaneousLineCurrent::Id: { |
| using TypeInfo = Attributes::InstantaneousLineCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstantaneousActiveCurrent::Id: { |
| using TypeInfo = Attributes::InstantaneousActiveCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstantaneousReactiveCurrent::Id: { |
| using TypeInfo = Attributes::InstantaneousReactiveCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::InstantaneousPower::Id: { |
| using TypeInfo = Attributes::InstantaneousPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltage::Id: { |
| using TypeInfo = Attributes::RmsVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMin::Id: { |
| using TypeInfo = Attributes::RmsVoltageMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMax::Id: { |
| using TypeInfo = Attributes::RmsVoltageMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrent::Id: { |
| using TypeInfo = Attributes::RmsCurrent::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMin::Id: { |
| using TypeInfo = Attributes::RmsCurrentMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMax::Id: { |
| using TypeInfo = Attributes::RmsCurrentMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePower::Id: { |
| using TypeInfo = Attributes::ActivePower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMin::Id: { |
| using TypeInfo = Attributes::ActivePowerMin::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMax::Id: { |
| using TypeInfo = Attributes::ActivePowerMax::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ReactivePower::Id: { |
| using TypeInfo = Attributes::ReactivePower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApparentPower::Id: { |
| using TypeInfo = Attributes::ApparentPower::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PowerFactor::Id: { |
| using TypeInfo = Attributes::PowerFactor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { |
| using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsUnderVoltageCounter::Id: { |
| using TypeInfo = Attributes::AverageRmsUnderVoltageCounter::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeOverVoltagePeriod::Id: { |
| using TypeInfo = Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeUnderVoltagePeriod::Id: { |
| using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSagPeriod::Id: { |
| using TypeInfo = Attributes::RmsVoltageSagPeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSwellPeriod::Id: { |
| using TypeInfo = Attributes::RmsVoltageSwellPeriod::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcVoltageMultiplier::Id: { |
| using TypeInfo = Attributes::AcVoltageMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcVoltageDivisor::Id: { |
| using TypeInfo = Attributes::AcVoltageDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcCurrentMultiplier::Id: { |
| using TypeInfo = Attributes::AcCurrentMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcCurrentDivisor::Id: { |
| using TypeInfo = Attributes::AcCurrentDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcPowerMultiplier::Id: { |
| using TypeInfo = Attributes::AcPowerMultiplier::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcPowerDivisor::Id: { |
| using TypeInfo = Attributes::AcPowerDivisor::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::OverloadAlarmsMask::Id: { |
| using TypeInfo = Attributes::OverloadAlarmsMask::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::VoltageOverload::Id: { |
| using TypeInfo = Attributes::VoltageOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::CurrentOverload::Id: { |
| using TypeInfo = Attributes::CurrentOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcOverloadAlarmsMask::Id: { |
| using TypeInfo = Attributes::AcOverloadAlarmsMask::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcVoltageOverload::Id: { |
| using TypeInfo = Attributes::AcVoltageOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcCurrentOverload::Id: { |
| using TypeInfo = Attributes::AcCurrentOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcActivePowerOverload::Id: { |
| using TypeInfo = Attributes::AcActivePowerOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AcReactivePowerOverload::Id: { |
| using TypeInfo = Attributes::AcReactivePowerOverload::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsOverVoltage::Id: { |
| using TypeInfo = Attributes::AverageRmsOverVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsUnderVoltage::Id: { |
| using TypeInfo = Attributes::AverageRmsUnderVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeOverVoltage::Id: { |
| using TypeInfo = Attributes::RmsExtremeOverVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeUnderVoltage::Id: { |
| using TypeInfo = Attributes::RmsExtremeUnderVoltage::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSag::Id: { |
| using TypeInfo = Attributes::RmsVoltageSag::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSwell::Id: { |
| using TypeInfo = Attributes::RmsVoltageSwell::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LineCurrentPhaseB::Id: { |
| using TypeInfo = Attributes::LineCurrentPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActiveCurrentPhaseB::Id: { |
| using TypeInfo = Attributes::ActiveCurrentPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ReactiveCurrentPhaseB::Id: { |
| using TypeInfo = Attributes::ReactiveCurrentPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltagePhaseB::Id: { |
| using TypeInfo = Attributes::RmsVoltagePhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMinPhaseB::Id: { |
| using TypeInfo = Attributes::RmsVoltageMinPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMaxPhaseB::Id: { |
| using TypeInfo = Attributes::RmsVoltageMaxPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentPhaseB::Id: { |
| using TypeInfo = Attributes::RmsCurrentPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMinPhaseB::Id: { |
| using TypeInfo = Attributes::RmsCurrentMinPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMaxPhaseB::Id: { |
| using TypeInfo = Attributes::RmsCurrentMaxPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerPhaseB::Id: { |
| using TypeInfo = Attributes::ActivePowerPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMinPhaseB::Id: { |
| using TypeInfo = Attributes::ActivePowerMinPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMaxPhaseB::Id: { |
| using TypeInfo = Attributes::ActivePowerMaxPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ReactivePowerPhaseB::Id: { |
| using TypeInfo = Attributes::ReactivePowerPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApparentPowerPhaseB::Id: { |
| using TypeInfo = Attributes::ApparentPowerPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PowerFactorPhaseB::Id: { |
| using TypeInfo = Attributes::PowerFactorPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { |
| using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { |
| using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { |
| using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { |
| using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { |
| using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSagPeriodPhaseB::Id: { |
| using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { |
| using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::LineCurrentPhaseC::Id: { |
| using TypeInfo = Attributes::LineCurrentPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActiveCurrentPhaseC::Id: { |
| using TypeInfo = Attributes::ActiveCurrentPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ReactiveCurrentPhaseC::Id: { |
| using TypeInfo = Attributes::ReactiveCurrentPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltagePhaseC::Id: { |
| using TypeInfo = Attributes::RmsVoltagePhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMinPhaseC::Id: { |
| using TypeInfo = Attributes::RmsVoltageMinPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageMaxPhaseC::Id: { |
| using TypeInfo = Attributes::RmsVoltageMaxPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentPhaseC::Id: { |
| using TypeInfo = Attributes::RmsCurrentPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMinPhaseC::Id: { |
| using TypeInfo = Attributes::RmsCurrentMinPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsCurrentMaxPhaseC::Id: { |
| using TypeInfo = Attributes::RmsCurrentMaxPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerPhaseC::Id: { |
| using TypeInfo = Attributes::ActivePowerPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMinPhaseC::Id: { |
| using TypeInfo = Attributes::ActivePowerMinPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ActivePowerMaxPhaseC::Id: { |
| using TypeInfo = Attributes::ActivePowerMaxPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ReactivePowerPhaseC::Id: { |
| using TypeInfo = Attributes::ReactivePowerPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ApparentPowerPhaseC::Id: { |
| using TypeInfo = Attributes::ApparentPowerPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::PowerFactorPhaseC::Id: { |
| using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { |
| using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { |
| using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { |
| using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { |
| using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { |
| using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSagPeriodPhaseC::Id: { |
| using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { |
| using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::UnitTesting::Id: { |
| using namespace app::Clusters::UnitTesting; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::Boolean::Id: { |
| using TypeInfo = Attributes::Boolean::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Bitmap8::Id: { |
| using TypeInfo = Attributes::Bitmap8::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Bitmap16::Id: { |
| using TypeInfo = Attributes::Bitmap16::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Bitmap32::Id: { |
| using TypeInfo = Attributes::Bitmap32::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Bitmap64::Id: { |
| using TypeInfo = Attributes::Bitmap64::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int8u::Id: { |
| using TypeInfo = Attributes::Int8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Int16u::Id: { |
| using TypeInfo = Attributes::Int16u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Int24u::Id: { |
| using TypeInfo = Attributes::Int24u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int32u::Id: { |
| using TypeInfo = Attributes::Int32u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int40u::Id: { |
| using TypeInfo = Attributes::Int40u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int48u::Id: { |
| using TypeInfo = Attributes::Int48u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int56u::Id: { |
| using TypeInfo = Attributes::Int56u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int64u::Id: { |
| using TypeInfo = Attributes::Int64u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int8s::Id: { |
| using TypeInfo = Attributes::Int8s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Int16s::Id: { |
| using TypeInfo = Attributes::Int16s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Int24s::Id: { |
| using TypeInfo = Attributes::Int24s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int32s::Id: { |
| using TypeInfo = Attributes::Int32s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int40s::Id: { |
| using TypeInfo = Attributes::Int40s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int48s::Id: { |
| using TypeInfo = Attributes::Int48s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int56s::Id: { |
| using TypeInfo = Attributes::Int56s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Int64s::Id: { |
| using TypeInfo = Attributes::Int64s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Enum8::Id: { |
| using TypeInfo = Attributes::Enum8::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::Enum16::Id: { |
| using TypeInfo = Attributes::Enum16::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::FloatSingle::Id: { |
| using TypeInfo = Attributes::FloatSingle::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::FloatDouble::Id: { |
| using TypeInfo = Attributes::FloatDouble::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Double"; |
| std::string valueCtorSignature = "(D)V"; |
| jdouble jnivalue = static_cast<jdouble>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::OctetString::Id: { |
| using TypeInfo = Attributes::OctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.size()), |
| reinterpret_cast<const jbyte *>(cppValue.data())); |
| value = valueByteArray; |
| return value; |
| } |
| case Attributes::ListInt8u::Id: { |
| using TypeInfo = Attributes::ListInt8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Integer"; |
| std::string newElement_0CtorSignature = "(I)V"; |
| jint jninewElement_0 = static_cast<jint>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ListOctetString::Id: { |
| using TypeInfo = Attributes::ListOctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast<jsize>(entry_0.size())); |
| env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast<jsize>(entry_0.size()), |
| reinterpret_cast<const jbyte *>(entry_0.data())); |
| newElement_0 = newElement_0ByteArray; |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ListStructOctetString::Id: { |
| using TypeInfo = Attributes::ListStructOctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_member1; |
| std::string newElement_0_member1ClassName = "java/lang/Long"; |
| std::string newElement_0_member1CtorSignature = "(J)V"; |
| jlong jninewElement_0_member1 = static_cast<jlong>(entry_0.member1); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_member1ClassName.c_str(), |
| newElement_0_member1CtorSignature.c_str(), |
| jninewElement_0_member1, newElement_0_member1); |
| jobject newElement_0_member2; |
| jbyteArray newElement_0_member2ByteArray = env->NewByteArray(static_cast<jsize>(entry_0.member2.size())); |
| env->SetByteArrayRegion(newElement_0_member2ByteArray, 0, static_cast<jsize>(entry_0.member2.size()), |
| reinterpret_cast<const jbyte *>(entry_0.member2.data())); |
| newElement_0_member2 = newElement_0_member2ByteArray; |
| |
| jclass testListStructOctetStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", |
| testListStructOctetStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet"); |
| return nullptr; |
| } |
| jmethodID testListStructOctetStructCtor_1 = |
| env->GetMethodID(testListStructOctetStructClass_1, "<init>", "(Ljava/lang/Long;[B)V"); |
| if (testListStructOctetStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject(testListStructOctetStructClass_1, testListStructOctetStructCtor_1, |
| newElement_0_member1, newElement_0_member2); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::LongOctetString::Id: { |
| using TypeInfo = Attributes::LongOctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.size()), |
| reinterpret_cast<const jbyte *>(cppValue.data())); |
| value = valueByteArray; |
| return value; |
| } |
| case Attributes::CharString::Id: { |
| using TypeInfo = Attributes::CharString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::LongCharString::Id: { |
| using TypeInfo = Attributes::LongCharString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); |
| return value; |
| } |
| case Attributes::EpochUs::Id: { |
| using TypeInfo = Attributes::EpochUs::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::EpochS::Id: { |
| using TypeInfo = Attributes::EpochS::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::VendorId::Id: { |
| using TypeInfo = Attributes::VendorId::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ListNullablesAndOptionalsStruct::Id: { |
| using TypeInfo = Attributes::ListNullablesAndOptionalsStruct::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_nullableInt; |
| if (entry_0.nullableInt.IsNull()) |
| { |
| newElement_0_nullableInt = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_nullableIntClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableIntCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableInt = static_cast<jint>(entry_0.nullableInt.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableIntClassName.c_str(), newElement_0_nullableIntCtorSignature.c_str(), |
| jninewElement_0_nullableInt, newElement_0_nullableInt); |
| } |
| jobject newElement_0_optionalInt; |
| if (!entry_0.optionalInt.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalInt); |
| } |
| else |
| { |
| jobject newElement_0_optionalIntInsideOptional; |
| std::string newElement_0_optionalIntInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_optionalIntInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_optionalIntInsideOptional = static_cast<jint>(entry_0.optionalInt.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_optionalIntInsideOptionalClassName.c_str(), |
| newElement_0_optionalIntInsideOptionalCtorSignature.c_str(), jninewElement_0_optionalIntInsideOptional, |
| newElement_0_optionalIntInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalIntInsideOptional, |
| newElement_0_optionalInt); |
| } |
| jobject newElement_0_nullableOptionalInt; |
| if (!entry_0.nullableOptionalInt.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalInt); |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalIntInsideOptional; |
| if (entry_0.nullableOptionalInt.Value().IsNull()) |
| { |
| newElement_0_nullableOptionalIntInsideOptional = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_nullableOptionalIntInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableOptionalIntInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableOptionalIntInsideOptional = |
| static_cast<jint>(entry_0.nullableOptionalInt.Value().Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableOptionalIntInsideOptionalClassName.c_str(), |
| newElement_0_nullableOptionalIntInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalIntInsideOptional, newElement_0_nullableOptionalIntInsideOptional); |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalIntInsideOptional, |
| newElement_0_nullableOptionalInt); |
| } |
| jobject newElement_0_nullableString; |
| if (entry_0.nullableString.IsNull()) |
| { |
| newElement_0_nullableString = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableString.Value(), |
| newElement_0_nullableString)); |
| } |
| jobject newElement_0_optionalString; |
| if (!entry_0.optionalString.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalString); |
| } |
| else |
| { |
| jobject newElement_0_optionalStringInsideOptional; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.optionalString.Value(), newElement_0_optionalStringInsideOptional)); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStringInsideOptional, |
| newElement_0_optionalString); |
| } |
| jobject newElement_0_nullableOptionalString; |
| if (!entry_0.nullableOptionalString.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalString); |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalStringInsideOptional; |
| if (entry_0.nullableOptionalString.Value().IsNull()) |
| { |
| newElement_0_nullableOptionalStringInsideOptional = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.nullableOptionalString.Value().Value(), newElement_0_nullableOptionalStringInsideOptional)); |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStringInsideOptional, |
| newElement_0_nullableOptionalString); |
| } |
| jobject newElement_0_nullableStruct; |
| if (entry_0.nullableStruct.IsNull()) |
| { |
| newElement_0_nullableStruct = nullptr; |
| } |
| else |
| { |
| jobject newElement_0_nullableStruct_a; |
| std::string newElement_0_nullableStruct_aClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableStruct_aCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableStruct_a = static_cast<jint>(entry_0.nullableStruct.Value().a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_a, newElement_0_nullableStruct_a); |
| jobject newElement_0_nullableStruct_b; |
| std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; |
| std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_nullableStruct_b = static_cast<jboolean>(entry_0.nullableStruct.Value().b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_b, newElement_0_nullableStruct_b); |
| jobject newElement_0_nullableStruct_c; |
| std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableStruct_c = static_cast<jint>(entry_0.nullableStruct.Value().c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_c, newElement_0_nullableStruct_c); |
| jobject newElement_0_nullableStruct_d; |
| jbyteArray newElement_0_nullableStruct_dByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.nullableStruct.Value().d.size())); |
| env->SetByteArrayRegion(newElement_0_nullableStruct_dByteArray, 0, |
| static_cast<jsize>(entry_0.nullableStruct.Value().d.size()), |
| reinterpret_cast<const jbyte *>(entry_0.nullableStruct.Value().d.data())); |
| newElement_0_nullableStruct_d = newElement_0_nullableStruct_dByteArray; |
| jobject newElement_0_nullableStruct_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.nullableStruct.Value().e, |
| newElement_0_nullableStruct_e)); |
| jobject newElement_0_nullableStruct_f; |
| std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableStruct_f = static_cast<jint>(entry_0.nullableStruct.Value().f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_f, newElement_0_nullableStruct_f); |
| jobject newElement_0_nullableStruct_g; |
| std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; |
| std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; |
| jfloat jninewElement_0_nullableStruct_g = static_cast<jfloat>(entry_0.nullableStruct.Value().g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>( |
| newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_g, newElement_0_nullableStruct_g); |
| jobject newElement_0_nullableStruct_h; |
| std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; |
| std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; |
| jdouble jninewElement_0_nullableStruct_h = static_cast<jdouble>(entry_0.nullableStruct.Value().h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>( |
| newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), |
| jninewElement_0_nullableStruct_h, newElement_0_nullableStruct_h); |
| |
| jclass simpleStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_3 = |
| env->GetMethodID(simpleStructStructClass_3, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" |
| "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0_nullableStruct = |
| env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_nullableStruct_a, |
| newElement_0_nullableStruct_b, newElement_0_nullableStruct_c, newElement_0_nullableStruct_d, |
| newElement_0_nullableStruct_e, newElement_0_nullableStruct_f, newElement_0_nullableStruct_g, |
| newElement_0_nullableStruct_h); |
| } |
| jobject newElement_0_optionalStruct; |
| if (!entry_0.optionalStruct.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalStruct); |
| } |
| else |
| { |
| jobject newElement_0_optionalStructInsideOptional; |
| jobject newElement_0_optionalStructInsideOptional_a; |
| std::string newElement_0_optionalStructInsideOptional_aClassName = "java/lang/Integer"; |
| std::string newElement_0_optionalStructInsideOptional_aCtorSignature = "(I)V"; |
| jint jninewElement_0_optionalStructInsideOptional_a = static_cast<jint>(entry_0.optionalStruct.Value().a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_optionalStructInsideOptional_aClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_aCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_a); |
| jobject newElement_0_optionalStructInsideOptional_b; |
| std::string newElement_0_optionalStructInsideOptional_bClassName = "java/lang/Boolean"; |
| std::string newElement_0_optionalStructInsideOptional_bCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_optionalStructInsideOptional_b = |
| static_cast<jboolean>(entry_0.optionalStruct.Value().b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_optionalStructInsideOptional_bClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_bCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_b); |
| jobject newElement_0_optionalStructInsideOptional_c; |
| std::string newElement_0_optionalStructInsideOptional_cClassName = "java/lang/Integer"; |
| std::string newElement_0_optionalStructInsideOptional_cCtorSignature = "(I)V"; |
| jint jninewElement_0_optionalStructInsideOptional_c = static_cast<jint>(entry_0.optionalStruct.Value().c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_optionalStructInsideOptional_cClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_cCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_c, newElement_0_optionalStructInsideOptional_c); |
| jobject newElement_0_optionalStructInsideOptional_d; |
| jbyteArray newElement_0_optionalStructInsideOptional_dByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.optionalStruct.Value().d.size())); |
| env->SetByteArrayRegion(newElement_0_optionalStructInsideOptional_dByteArray, 0, |
| static_cast<jsize>(entry_0.optionalStruct.Value().d.size()), |
| reinterpret_cast<const jbyte *>(entry_0.optionalStruct.Value().d.data())); |
| newElement_0_optionalStructInsideOptional_d = newElement_0_optionalStructInsideOptional_dByteArray; |
| jobject newElement_0_optionalStructInsideOptional_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.optionalStruct.Value().e, newElement_0_optionalStructInsideOptional_e)); |
| jobject newElement_0_optionalStructInsideOptional_f; |
| std::string newElement_0_optionalStructInsideOptional_fClassName = "java/lang/Integer"; |
| std::string newElement_0_optionalStructInsideOptional_fCtorSignature = "(I)V"; |
| jint jninewElement_0_optionalStructInsideOptional_f = static_cast<jint>(entry_0.optionalStruct.Value().f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_optionalStructInsideOptional_fClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_fCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_f); |
| jobject newElement_0_optionalStructInsideOptional_g; |
| std::string newElement_0_optionalStructInsideOptional_gClassName = "java/lang/Float"; |
| std::string newElement_0_optionalStructInsideOptional_gCtorSignature = "(F)V"; |
| jfloat jninewElement_0_optionalStructInsideOptional_g = static_cast<jfloat>(entry_0.optionalStruct.Value().g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>( |
| newElement_0_optionalStructInsideOptional_gClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_gCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_g); |
| jobject newElement_0_optionalStructInsideOptional_h; |
| std::string newElement_0_optionalStructInsideOptional_hClassName = "java/lang/Double"; |
| std::string newElement_0_optionalStructInsideOptional_hCtorSignature = "(D)V"; |
| jdouble jninewElement_0_optionalStructInsideOptional_h = static_cast<jdouble>(entry_0.optionalStruct.Value().h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>( |
| newElement_0_optionalStructInsideOptional_hClassName.c_str(), |
| newElement_0_optionalStructInsideOptional_hCtorSignature.c_str(), |
| jninewElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_h); |
| |
| jclass simpleStructStructClass_3; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_3 = |
| env->GetMethodID(simpleStructStructClass_3, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" |
| "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_3 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0_optionalStructInsideOptional = |
| env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, |
| newElement_0_optionalStructInsideOptional_a, newElement_0_optionalStructInsideOptional_b, |
| newElement_0_optionalStructInsideOptional_c, newElement_0_optionalStructInsideOptional_d, |
| newElement_0_optionalStructInsideOptional_e, newElement_0_optionalStructInsideOptional_f, |
| newElement_0_optionalStructInsideOptional_g, newElement_0_optionalStructInsideOptional_h); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStructInsideOptional, |
| newElement_0_optionalStruct); |
| } |
| jobject newElement_0_nullableOptionalStruct; |
| if (!entry_0.nullableOptionalStruct.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalStruct); |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalStructInsideOptional; |
| if (entry_0.nullableOptionalStruct.Value().IsNull()) |
| { |
| newElement_0_nullableOptionalStructInsideOptional = nullptr; |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalStructInsideOptional_a; |
| std::string newElement_0_nullableOptionalStructInsideOptional_aClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_aCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableOptionalStructInsideOptional_a = |
| static_cast<jint>(entry_0.nullableOptionalStruct.Value().Value().a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableOptionalStructInsideOptional_aClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_aCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_a, |
| newElement_0_nullableOptionalStructInsideOptional_a); |
| jobject newElement_0_nullableOptionalStructInsideOptional_b; |
| std::string newElement_0_nullableOptionalStructInsideOptional_bClassName = "java/lang/Boolean"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_bCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_nullableOptionalStructInsideOptional_b = |
| static_cast<jboolean>(entry_0.nullableOptionalStruct.Value().Value().b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_nullableOptionalStructInsideOptional_bClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_bCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_b, |
| newElement_0_nullableOptionalStructInsideOptional_b); |
| jobject newElement_0_nullableOptionalStructInsideOptional_c; |
| std::string newElement_0_nullableOptionalStructInsideOptional_cClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_cCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableOptionalStructInsideOptional_c = |
| static_cast<jint>(entry_0.nullableOptionalStruct.Value().Value().c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableOptionalStructInsideOptional_cClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_cCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_c, |
| newElement_0_nullableOptionalStructInsideOptional_c); |
| jobject newElement_0_nullableOptionalStructInsideOptional_d; |
| jbyteArray newElement_0_nullableOptionalStructInsideOptional_dByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.nullableOptionalStruct.Value().Value().d.size())); |
| env->SetByteArrayRegion( |
| newElement_0_nullableOptionalStructInsideOptional_dByteArray, 0, |
| static_cast<jsize>(entry_0.nullableOptionalStruct.Value().Value().d.size()), |
| reinterpret_cast<const jbyte *>(entry_0.nullableOptionalStruct.Value().Value().d.data())); |
| newElement_0_nullableOptionalStructInsideOptional_d = |
| newElement_0_nullableOptionalStructInsideOptional_dByteArray; |
| jobject newElement_0_nullableOptionalStructInsideOptional_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( |
| entry_0.nullableOptionalStruct.Value().Value().e, newElement_0_nullableOptionalStructInsideOptional_e)); |
| jobject newElement_0_nullableOptionalStructInsideOptional_f; |
| std::string newElement_0_nullableOptionalStructInsideOptional_fClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_fCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableOptionalStructInsideOptional_f = |
| static_cast<jint>(entry_0.nullableOptionalStruct.Value().Value().f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableOptionalStructInsideOptional_fClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_fCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_f, |
| newElement_0_nullableOptionalStructInsideOptional_f); |
| jobject newElement_0_nullableOptionalStructInsideOptional_g; |
| std::string newElement_0_nullableOptionalStructInsideOptional_gClassName = "java/lang/Float"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_gCtorSignature = "(F)V"; |
| jfloat jninewElement_0_nullableOptionalStructInsideOptional_g = |
| static_cast<jfloat>(entry_0.nullableOptionalStruct.Value().Value().g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>( |
| newElement_0_nullableOptionalStructInsideOptional_gClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_gCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_g, |
| newElement_0_nullableOptionalStructInsideOptional_g); |
| jobject newElement_0_nullableOptionalStructInsideOptional_h; |
| std::string newElement_0_nullableOptionalStructInsideOptional_hClassName = "java/lang/Double"; |
| std::string newElement_0_nullableOptionalStructInsideOptional_hCtorSignature = "(D)V"; |
| jdouble jninewElement_0_nullableOptionalStructInsideOptional_h = |
| static_cast<jdouble>(entry_0.nullableOptionalStruct.Value().Value().h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>( |
| newElement_0_nullableOptionalStructInsideOptional_hClassName.c_str(), |
| newElement_0_nullableOptionalStructInsideOptional_hCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalStructInsideOptional_h, |
| newElement_0_nullableOptionalStructInsideOptional_h); |
| |
| jclass simpleStructStructClass_4; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_4 = |
| env->GetMethodID(simpleStructStructClass_4, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/" |
| "lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_4 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0_nullableOptionalStructInsideOptional = |
| env->NewObject(simpleStructStructClass_4, simpleStructStructCtor_4, |
| newElement_0_nullableOptionalStructInsideOptional_a, |
| newElement_0_nullableOptionalStructInsideOptional_b, |
| newElement_0_nullableOptionalStructInsideOptional_c, |
| newElement_0_nullableOptionalStructInsideOptional_d, |
| newElement_0_nullableOptionalStructInsideOptional_e, |
| newElement_0_nullableOptionalStructInsideOptional_f, |
| newElement_0_nullableOptionalStructInsideOptional_g, |
| newElement_0_nullableOptionalStructInsideOptional_h); |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStructInsideOptional, |
| newElement_0_nullableOptionalStruct); |
| } |
| jobject newElement_0_nullableList; |
| if (entry_0.nullableList.IsNull()) |
| { |
| newElement_0_nullableList = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableList); |
| |
| auto iter_newElement_0_nullableList_3 = entry_0.nullableList.Value().begin(); |
| while (iter_newElement_0_nullableList_3.Next()) |
| { |
| auto & entry_3 = iter_newElement_0_nullableList_3.GetValue(); |
| jobject newElement_3; |
| std::string newElement_3ClassName = "java/lang/Integer"; |
| std::string newElement_3CtorSignature = "(I)V"; |
| jint jninewElement_3 = static_cast<jint>(entry_3); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_nullableList, newElement_3); |
| } |
| } |
| jobject newElement_0_optionalList; |
| if (!entry_0.optionalList.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalList); |
| } |
| else |
| { |
| jobject newElement_0_optionalListInsideOptional; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_optionalListInsideOptional); |
| |
| auto iter_newElement_0_optionalListInsideOptional_3 = entry_0.optionalList.Value().begin(); |
| while (iter_newElement_0_optionalListInsideOptional_3.Next()) |
| { |
| auto & entry_3 = iter_newElement_0_optionalListInsideOptional_3.GetValue(); |
| jobject newElement_3; |
| std::string newElement_3ClassName = "java/lang/Integer"; |
| std::string newElement_3CtorSignature = "(I)V"; |
| jint jninewElement_3 = static_cast<jint>(entry_3); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_optionalListInsideOptional, newElement_3); |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalListInsideOptional, |
| newElement_0_optionalList); |
| } |
| jobject newElement_0_nullableOptionalList; |
| if (!entry_0.nullableOptionalList.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalList); |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalListInsideOptional; |
| if (entry_0.nullableOptionalList.Value().IsNull()) |
| { |
| newElement_0_nullableOptionalListInsideOptional = nullptr; |
| } |
| else |
| { |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableOptionalListInsideOptional); |
| |
| auto iter_newElement_0_nullableOptionalListInsideOptional_4 = |
| entry_0.nullableOptionalList.Value().Value().begin(); |
| while (iter_newElement_0_nullableOptionalListInsideOptional_4.Next()) |
| { |
| auto & entry_4 = iter_newElement_0_nullableOptionalListInsideOptional_4.GetValue(); |
| jobject newElement_4; |
| std::string newElement_4ClassName = "java/lang/Integer"; |
| std::string newElement_4CtorSignature = "(I)V"; |
| jint jninewElement_4 = static_cast<jint>(entry_4); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_4ClassName.c_str(), newElement_4CtorSignature.c_str(), jninewElement_4, newElement_4); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_nullableOptionalListInsideOptional, |
| newElement_4); |
| } |
| } |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalListInsideOptional, |
| newElement_0_nullableOptionalList); |
| } |
| |
| jclass nullablesAndOptionalsStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct", |
| nullablesAndOptionalsStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct"); |
| return nullptr; |
| } |
| jmethodID nullablesAndOptionalsStructStructCtor_1 = env->GetMethodID( |
| nullablesAndOptionalsStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/" |
| "Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/util/" |
| "Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V"); |
| if (nullablesAndOptionalsStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = |
| env->NewObject(nullablesAndOptionalsStructStructClass_1, nullablesAndOptionalsStructStructCtor_1, |
| newElement_0_nullableInt, newElement_0_optionalInt, newElement_0_nullableOptionalInt, |
| newElement_0_nullableString, newElement_0_optionalString, newElement_0_nullableOptionalString, |
| newElement_0_nullableStruct, newElement_0_optionalStruct, newElement_0_nullableOptionalStruct, |
| newElement_0_nullableList, newElement_0_optionalList, newElement_0_nullableOptionalList); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EnumAttr::Id: { |
| using TypeInfo = Attributes::EnumAttr::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::StructAttr::Id: { |
| using TypeInfo = Attributes::StructAttr::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| jobject value_a; |
| std::string value_aClassName = "java/lang/Integer"; |
| std::string value_aCtorSignature = "(I)V"; |
| jint jnivalue_a = static_cast<jint>(cppValue.a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_aClassName.c_str(), value_aCtorSignature.c_str(), |
| jnivalue_a, value_a); |
| jobject value_b; |
| std::string value_bClassName = "java/lang/Boolean"; |
| std::string value_bCtorSignature = "(Z)V"; |
| jboolean jnivalue_b = static_cast<jboolean>(cppValue.b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_bClassName.c_str(), value_bCtorSignature.c_str(), |
| jnivalue_b, value_b); |
| jobject value_c; |
| std::string value_cClassName = "java/lang/Integer"; |
| std::string value_cCtorSignature = "(I)V"; |
| jint jnivalue_c = static_cast<jint>(cppValue.c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_cClassName.c_str(), value_cCtorSignature.c_str(), |
| jnivalue_c, value_c); |
| jobject value_d; |
| jbyteArray value_dByteArray = env->NewByteArray(static_cast<jsize>(cppValue.d.size())); |
| env->SetByteArrayRegion(value_dByteArray, 0, static_cast<jsize>(cppValue.d.size()), |
| reinterpret_cast<const jbyte *>(cppValue.d.data())); |
| value_d = value_dByteArray; |
| jobject value_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.e, value_e)); |
| jobject value_f; |
| std::string value_fClassName = "java/lang/Integer"; |
| std::string value_fCtorSignature = "(I)V"; |
| jint jnivalue_f = static_cast<jint>(cppValue.f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_fClassName.c_str(), value_fCtorSignature.c_str(), |
| jnivalue_f, value_f); |
| jobject value_g; |
| std::string value_gClassName = "java/lang/Float"; |
| std::string value_gCtorSignature = "(F)V"; |
| jfloat jnivalue_g = static_cast<jfloat>(cppValue.g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(value_gClassName.c_str(), value_gCtorSignature.c_str(), |
| jnivalue_g, value_g); |
| jobject value_h; |
| std::string value_hClassName = "java/lang/Double"; |
| std::string value_hCtorSignature = "(D)V"; |
| jdouble jnivalue_h = static_cast<jdouble>(cppValue.h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>(value_hClassName.c_str(), value_hCtorSignature.c_str(), |
| jnivalue_h, value_h); |
| |
| jclass simpleStructStructClass_0; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_0 = |
| env->GetMethodID(simpleStructStructClass_0, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" |
| "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_0 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_a, value_b, value_c, value_d, value_e, |
| value_f, value_g, value_h); |
| return value; |
| } |
| case Attributes::RangeRestrictedInt8u::Id: { |
| using TypeInfo = Attributes::RangeRestrictedInt8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RangeRestrictedInt8s::Id: { |
| using TypeInfo = Attributes::RangeRestrictedInt8s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RangeRestrictedInt16u::Id: { |
| using TypeInfo = Attributes::RangeRestrictedInt16u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::RangeRestrictedInt16s::Id: { |
| using TypeInfo = Attributes::RangeRestrictedInt16s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::ListLongOctetString::Id: { |
| using TypeInfo = Attributes::ListLongOctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast<jsize>(entry_0.size())); |
| env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast<jsize>(entry_0.size()), |
| reinterpret_cast<const jbyte *>(entry_0.data())); |
| newElement_0 = newElement_0ByteArray; |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::ListFabricScoped::Id: { |
| using TypeInfo = Attributes::ListFabricScoped::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| jobject newElement_0_fabricSensitiveInt8u; |
| std::string newElement_0_fabricSensitiveInt8uClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricSensitiveInt8uCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricSensitiveInt8u = static_cast<jint>(entry_0.fabricSensitiveInt8u); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_fabricSensitiveInt8uClassName.c_str(), newElement_0_fabricSensitiveInt8uCtorSignature.c_str(), |
| jninewElement_0_fabricSensitiveInt8u, newElement_0_fabricSensitiveInt8u); |
| jobject newElement_0_optionalFabricSensitiveInt8u; |
| if (!entry_0.optionalFabricSensitiveInt8u.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalFabricSensitiveInt8u); |
| } |
| else |
| { |
| jobject newElement_0_optionalFabricSensitiveInt8uInsideOptional; |
| std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_optionalFabricSensitiveInt8uInsideOptional = |
| static_cast<jint>(entry_0.optionalFabricSensitiveInt8u.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_optionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), |
| newElement_0_optionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_optionalFabricSensitiveInt8uInsideOptional, |
| newElement_0_optionalFabricSensitiveInt8uInsideOptional); |
| chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalFabricSensitiveInt8uInsideOptional, |
| newElement_0_optionalFabricSensitiveInt8u); |
| } |
| jobject newElement_0_nullableFabricSensitiveInt8u; |
| if (entry_0.nullableFabricSensitiveInt8u.IsNull()) |
| { |
| newElement_0_nullableFabricSensitiveInt8u = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_nullableFabricSensitiveInt8uClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableFabricSensitiveInt8uCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableFabricSensitiveInt8u = |
| static_cast<jint>(entry_0.nullableFabricSensitiveInt8u.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableFabricSensitiveInt8uClassName.c_str(), |
| newElement_0_nullableFabricSensitiveInt8uCtorSignature.c_str(), |
| jninewElement_0_nullableFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u); |
| } |
| jobject newElement_0_nullableOptionalFabricSensitiveInt8u; |
| if (!entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) |
| { |
| chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalFabricSensitiveInt8u); |
| } |
| else |
| { |
| jobject newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional; |
| if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) |
| { |
| newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = nullptr; |
| } |
| else |
| { |
| std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName = "java/lang/Integer"; |
| std::string newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature = "(I)V"; |
| jint jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional = |
| static_cast<jint>(entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalClassName.c_str(), |
| newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptionalCtorSignature.c_str(), |
| jninewElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, |
| newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional); |
| } |
| chip::JniReferences::GetInstance().CreateOptional( |
| newElement_0_nullableOptionalFabricSensitiveInt8uInsideOptional, |
| newElement_0_nullableOptionalFabricSensitiveInt8u); |
| } |
| jobject newElement_0_fabricSensitiveCharString; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveCharString, |
| newElement_0_fabricSensitiveCharString)); |
| jobject newElement_0_fabricSensitiveStruct; |
| jobject newElement_0_fabricSensitiveStruct_a; |
| std::string newElement_0_fabricSensitiveStruct_aClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricSensitiveStruct_aCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricSensitiveStruct_a = static_cast<jint>(entry_0.fabricSensitiveStruct.a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_fabricSensitiveStruct_aClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_aCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_a, |
| newElement_0_fabricSensitiveStruct_a); |
| jobject newElement_0_fabricSensitiveStruct_b; |
| std::string newElement_0_fabricSensitiveStruct_bClassName = "java/lang/Boolean"; |
| std::string newElement_0_fabricSensitiveStruct_bCtorSignature = "(Z)V"; |
| jboolean jninewElement_0_fabricSensitiveStruct_b = static_cast<jboolean>(entry_0.fabricSensitiveStruct.b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>( |
| newElement_0_fabricSensitiveStruct_bClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_bCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_b, |
| newElement_0_fabricSensitiveStruct_b); |
| jobject newElement_0_fabricSensitiveStruct_c; |
| std::string newElement_0_fabricSensitiveStruct_cClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricSensitiveStruct_cCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricSensitiveStruct_c = static_cast<jint>(entry_0.fabricSensitiveStruct.c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_fabricSensitiveStruct_cClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_cCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_c, |
| newElement_0_fabricSensitiveStruct_c); |
| jobject newElement_0_fabricSensitiveStruct_d; |
| jbyteArray newElement_0_fabricSensitiveStruct_dByteArray = |
| env->NewByteArray(static_cast<jsize>(entry_0.fabricSensitiveStruct.d.size())); |
| env->SetByteArrayRegion(newElement_0_fabricSensitiveStruct_dByteArray, 0, |
| static_cast<jsize>(entry_0.fabricSensitiveStruct.d.size()), |
| reinterpret_cast<const jbyte *>(entry_0.fabricSensitiveStruct.d.data())); |
| newElement_0_fabricSensitiveStruct_d = newElement_0_fabricSensitiveStruct_dByteArray; |
| jobject newElement_0_fabricSensitiveStruct_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.fabricSensitiveStruct.e, |
| newElement_0_fabricSensitiveStruct_e)); |
| jobject newElement_0_fabricSensitiveStruct_f; |
| std::string newElement_0_fabricSensitiveStruct_fClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricSensitiveStruct_fCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricSensitiveStruct_f = static_cast<jint>(entry_0.fabricSensitiveStruct.f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_0_fabricSensitiveStruct_fClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_fCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_f, |
| newElement_0_fabricSensitiveStruct_f); |
| jobject newElement_0_fabricSensitiveStruct_g; |
| std::string newElement_0_fabricSensitiveStruct_gClassName = "java/lang/Float"; |
| std::string newElement_0_fabricSensitiveStruct_gCtorSignature = "(F)V"; |
| jfloat jninewElement_0_fabricSensitiveStruct_g = static_cast<jfloat>(entry_0.fabricSensitiveStruct.g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>( |
| newElement_0_fabricSensitiveStruct_gClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_gCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_g, |
| newElement_0_fabricSensitiveStruct_g); |
| jobject newElement_0_fabricSensitiveStruct_h; |
| std::string newElement_0_fabricSensitiveStruct_hClassName = "java/lang/Double"; |
| std::string newElement_0_fabricSensitiveStruct_hCtorSignature = "(D)V"; |
| jdouble jninewElement_0_fabricSensitiveStruct_h = static_cast<jdouble>(entry_0.fabricSensitiveStruct.h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>( |
| newElement_0_fabricSensitiveStruct_hClassName.c_str(), |
| newElement_0_fabricSensitiveStruct_hCtorSignature.c_str(), jninewElement_0_fabricSensitiveStruct_h, |
| newElement_0_fabricSensitiveStruct_h); |
| |
| jclass simpleStructStructClass_2; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_2 = |
| env->GetMethodID(simpleStructStructClass_2, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" |
| "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_2 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| newElement_0_fabricSensitiveStruct = |
| env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_fabricSensitiveStruct_a, |
| newElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_c, |
| newElement_0_fabricSensitiveStruct_d, newElement_0_fabricSensitiveStruct_e, |
| newElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_g, |
| newElement_0_fabricSensitiveStruct_h); |
| jobject newElement_0_fabricSensitiveInt8uList; |
| chip::JniReferences::GetInstance().CreateArrayList(newElement_0_fabricSensitiveInt8uList); |
| |
| auto iter_newElement_0_fabricSensitiveInt8uList_2 = entry_0.fabricSensitiveInt8uList.begin(); |
| while (iter_newElement_0_fabricSensitiveInt8uList_2.Next()) |
| { |
| auto & entry_2 = iter_newElement_0_fabricSensitiveInt8uList_2.GetValue(); |
| jobject newElement_2; |
| std::string newElement_2ClassName = "java/lang/Integer"; |
| std::string newElement_2CtorSignature = "(I)V"; |
| jint jninewElement_2 = static_cast<jint>(entry_2); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>( |
| newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); |
| chip::JniReferences::GetInstance().AddToList(newElement_0_fabricSensitiveInt8uList, newElement_2); |
| } |
| jobject newElement_0_fabricIndex; |
| std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; |
| std::string newElement_0_fabricIndexCtorSignature = "(I)V"; |
| jint jninewElement_0_fabricIndex = static_cast<jint>(entry_0.fabricIndex); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_fabricIndexClassName.c_str(), |
| newElement_0_fabricIndexCtorSignature.c_str(), |
| jninewElement_0_fabricIndex, newElement_0_fabricIndex); |
| |
| jclass testFabricScopedStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped"); |
| return nullptr; |
| } |
| jmethodID testFabricScopedStructCtor_1 = env->GetMethodID( |
| testFabricScopedStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/" |
| "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V"); |
| if (testFabricScopedStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor"); |
| return nullptr; |
| } |
| |
| newElement_0 = env->NewObject( |
| testFabricScopedStructClass_1, testFabricScopedStructCtor_1, newElement_0_fabricSensitiveInt8u, |
| newElement_0_optionalFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u, |
| newElement_0_nullableOptionalFabricSensitiveInt8u, newElement_0_fabricSensitiveCharString, |
| newElement_0_fabricSensitiveStruct, newElement_0_fabricSensitiveInt8uList, newElement_0_fabricIndex); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::TimedWriteBoolean::Id: { |
| using TypeInfo = Attributes::TimedWriteBoolean::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneralErrorBoolean::Id: { |
| using TypeInfo = Attributes::GeneralErrorBoolean::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterErrorBoolean::Id: { |
| using TypeInfo = Attributes::ClusterErrorBoolean::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::Unsupported::Id: { |
| using TypeInfo = Attributes::Unsupported::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::NullableBoolean::Id: { |
| using TypeInfo = Attributes::NullableBoolean::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableBitmap8::Id: { |
| using TypeInfo = Attributes::NullableBitmap8::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value().Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableBitmap16::Id: { |
| using TypeInfo = Attributes::NullableBitmap16::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value().Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableBitmap32::Id: { |
| using TypeInfo = Attributes::NullableBitmap32::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value().Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableBitmap64::Id: { |
| using TypeInfo = Attributes::NullableBitmap64::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value().Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt8u::Id: { |
| using TypeInfo = Attributes::NullableInt8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt16u::Id: { |
| using TypeInfo = Attributes::NullableInt16u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt24u::Id: { |
| using TypeInfo = Attributes::NullableInt24u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt32u::Id: { |
| using TypeInfo = Attributes::NullableInt32u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt40u::Id: { |
| using TypeInfo = Attributes::NullableInt40u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt48u::Id: { |
| using TypeInfo = Attributes::NullableInt48u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt56u::Id: { |
| using TypeInfo = Attributes::NullableInt56u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt64u::Id: { |
| using TypeInfo = Attributes::NullableInt64u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt8s::Id: { |
| using TypeInfo = Attributes::NullableInt8s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt16s::Id: { |
| using TypeInfo = Attributes::NullableInt16s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt24s::Id: { |
| using TypeInfo = Attributes::NullableInt24s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt32s::Id: { |
| using TypeInfo = Attributes::NullableInt32s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt40s::Id: { |
| using TypeInfo = Attributes::NullableInt40s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt48s::Id: { |
| using TypeInfo = Attributes::NullableInt48s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt56s::Id: { |
| using TypeInfo = Attributes::NullableInt56s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableInt64s::Id: { |
| using TypeInfo = Attributes::NullableInt64s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableEnum8::Id: { |
| using TypeInfo = Attributes::NullableEnum8::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableEnum16::Id: { |
| using TypeInfo = Attributes::NullableEnum16::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableFloatSingle::Id: { |
| using TypeInfo = Attributes::NullableFloatSingle::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Float"; |
| std::string valueCtorSignature = "(F)V"; |
| jfloat jnivalue = static_cast<jfloat>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableFloatDouble::Id: { |
| using TypeInfo = Attributes::NullableFloatDouble::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Double"; |
| std::string valueCtorSignature = "(D)V"; |
| jdouble jnivalue = static_cast<jdouble>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableOctetString::Id: { |
| using TypeInfo = Attributes::NullableOctetString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jbyteArray valueByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().size())); |
| env->SetByteArrayRegion(valueByteArray, 0, static_cast<jsize>(cppValue.Value().size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().data())); |
| value = valueByteArray; |
| } |
| return value; |
| } |
| case Attributes::NullableCharString::Id: { |
| using TypeInfo = Attributes::NullableCharString::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value)); |
| } |
| return value; |
| } |
| case Attributes::NullableEnumAttr::Id: { |
| using TypeInfo = Attributes::NullableEnumAttr::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableStruct::Id: { |
| using TypeInfo = Attributes::NullableStruct::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| jobject value_a; |
| std::string value_aClassName = "java/lang/Integer"; |
| std::string value_aCtorSignature = "(I)V"; |
| jint jnivalue_a = static_cast<jint>(cppValue.Value().a); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_aClassName.c_str(), value_aCtorSignature.c_str(), |
| jnivalue_a, value_a); |
| jobject value_b; |
| std::string value_bClassName = "java/lang/Boolean"; |
| std::string value_bCtorSignature = "(Z)V"; |
| jboolean jnivalue_b = static_cast<jboolean>(cppValue.Value().b); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(value_bClassName.c_str(), |
| value_bCtorSignature.c_str(), jnivalue_b, value_b); |
| jobject value_c; |
| std::string value_cClassName = "java/lang/Integer"; |
| std::string value_cCtorSignature = "(I)V"; |
| jint jnivalue_c = static_cast<jint>(cppValue.Value().c); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_cClassName.c_str(), value_cCtorSignature.c_str(), |
| jnivalue_c, value_c); |
| jobject value_d; |
| jbyteArray value_dByteArray = env->NewByteArray(static_cast<jsize>(cppValue.Value().d.size())); |
| env->SetByteArrayRegion(value_dByteArray, 0, static_cast<jsize>(cppValue.Value().d.size()), |
| reinterpret_cast<const jbyte *>(cppValue.Value().d.data())); |
| value_d = value_dByteArray; |
| jobject value_e; |
| LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().e, value_e)); |
| jobject value_f; |
| std::string value_fClassName = "java/lang/Integer"; |
| std::string value_fCtorSignature = "(I)V"; |
| jint jnivalue_f = static_cast<jint>(cppValue.Value().f.Raw()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_fClassName.c_str(), value_fCtorSignature.c_str(), |
| jnivalue_f, value_f); |
| jobject value_g; |
| std::string value_gClassName = "java/lang/Float"; |
| std::string value_gCtorSignature = "(F)V"; |
| jfloat jnivalue_g = static_cast<jfloat>(cppValue.Value().g); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jfloat>(value_gClassName.c_str(), value_gCtorSignature.c_str(), |
| jnivalue_g, value_g); |
| jobject value_h; |
| std::string value_hClassName = "java/lang/Double"; |
| std::string value_hCtorSignature = "(D)V"; |
| jdouble jnivalue_h = static_cast<jdouble>(cppValue.Value().h); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jdouble>(value_hClassName.c_str(), |
| value_hCtorSignature.c_str(), jnivalue_h, value_h); |
| |
| jclass simpleStructStructClass_1; |
| err = chip::JniReferences::GetInstance().GetClassRef( |
| env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); |
| if (err != CHIP_NO_ERROR) |
| { |
| ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); |
| return nullptr; |
| } |
| jmethodID simpleStructStructCtor_1 = |
| env->GetMethodID(simpleStructStructClass_1, "<init>", |
| "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" |
| "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); |
| if (simpleStructStructCtor_1 == nullptr) |
| { |
| ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); |
| return nullptr; |
| } |
| |
| value = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, value_a, value_b, value_c, value_d, |
| value_e, value_f, value_g, value_h); |
| } |
| return value; |
| } |
| case Attributes::NullableRangeRestrictedInt8u::Id: { |
| using TypeInfo = Attributes::NullableRangeRestrictedInt8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableRangeRestrictedInt8s::Id: { |
| using TypeInfo = Attributes::NullableRangeRestrictedInt8s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableRangeRestrictedInt16u::Id: { |
| using TypeInfo = Attributes::NullableRangeRestrictedInt16u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::NullableRangeRestrictedInt16s::Id: { |
| using TypeInfo = Attributes::NullableRangeRestrictedInt16s::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| if (cppValue.IsNull()) |
| { |
| value = nullptr; |
| } |
| else |
| { |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue.Value()); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| } |
| return value; |
| } |
| case Attributes::WriteOnlyInt8u::Id: { |
| using TypeInfo = Attributes::WriteOnlyInt8u::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::FaultInjection::Id: { |
| using namespace app::Clusters::FaultInjection; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| case app::Clusters::SampleMei::Id: { |
| using namespace app::Clusters::SampleMei; |
| switch (aPath.mAttributeId) |
| { |
| case Attributes::FlipFlop::Id: { |
| using TypeInfo = Attributes::FlipFlop::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Boolean"; |
| std::string valueCtorSignature = "(Z)V"; |
| jboolean jnivalue = static_cast<jboolean>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::GeneratedCommandList::Id: { |
| using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AcceptedCommandList::Id: { |
| using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::EventList::Id: { |
| using TypeInfo = Attributes::EventList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::AttributeList::Id: { |
| using TypeInfo = Attributes::AttributeList::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| chip::JniReferences::GetInstance().CreateArrayList(value); |
| |
| auto iter_value_0 = cppValue.begin(); |
| while (iter_value_0.Next()) |
| { |
| auto & entry_0 = iter_value_0.GetValue(); |
| jobject newElement_0; |
| std::string newElement_0ClassName = "java/lang/Long"; |
| std::string newElement_0CtorSignature = "(J)V"; |
| jlong jninewElement_0 = static_cast<jlong>(entry_0); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>( |
| newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); |
| chip::JniReferences::GetInstance().AddToList(value, newElement_0); |
| } |
| return value; |
| } |
| case Attributes::FeatureMap::Id: { |
| using TypeInfo = Attributes::FeatureMap::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Long"; |
| std::string valueCtorSignature = "(J)V"; |
| jlong jnivalue = static_cast<jlong>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(), |
| jnivalue, value); |
| return value; |
| } |
| case Attributes::ClusterRevision::Id: { |
| using TypeInfo = Attributes::ClusterRevision::TypeInfo; |
| TypeInfo::DecodableType cppValue; |
| *aError = app::DataModel::Decode(aReader, cppValue); |
| if (*aError != CHIP_NO_ERROR) |
| { |
| return nullptr; |
| } |
| jobject value; |
| std::string valueClassName = "java/lang/Integer"; |
| std::string valueCtorSignature = "(I)V"; |
| jint jnivalue = static_cast<jint>(cppValue); |
| chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, |
| value); |
| return value; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| break; |
| } |
| default: |
| *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; |
| break; |
| } |
| return nullptr; |
| } |
| |
| } // namespace chip |