From 0213253778614891def9a5e19bd12abe74fd02cf Mon Sep 17 00:00:00 2001 From: Austin Hsieh Date: Fri, 14 Jan 2022 14:32:15 -0800 Subject: [PATCH 1/8] Complex types in Java --- src/controller/java/BUILD.gn | 1 + .../java/templates/CHIPClusters-JNI.zapt | 14 +- .../java/templates/CHIPClustersWrite-JNI.zapt | 13 +- .../templates/CHIPInvokeCallbacks-src.zapt | 4 +- .../java/templates/CHIPReadCallbacks-src.zapt | 184 +--------------- .../java/templates/ChipClusters-java.zapt | 129 ++--------- .../java/templates/ChipStructs-java.zapt | 58 +++++ .../java/templates/ClusterInfo-java.zapt | 52 ++--- .../ClusterInfo-write-interaction.zapt | 4 +- src/controller/java/templates/helper.js | 207 ++++++++++++------ .../partials/command_callback_responses.zapt | 27 --- .../java/templates/partials/decode_value.zapt | 87 +++++--- .../java/templates/partials/encode_value.zapt | 114 +++++----- .../partials/java_type_for_argument.zapt | 1 - .../list_attribute_callback_type.zapt | 30 --- src/controller/java/templates/templates.json | 17 +- .../Framework/CHIP.xcodeproj/project.pbxproj | 4 - .../CHIP/templates/CHIPClustersObjc-src.zapt | 2 +- .../templates/CHIPTestClustersObjc-src.zapt | 2 +- .../support/CHIPListUtils.h} | 2 + src/lib/support/JniReferences.cpp | 68 ++++++ src/lib/support/JniReferences.h | 12 + 22 files changed, 454 insertions(+), 578 deletions(-) create mode 100644 src/controller/java/templates/ChipStructs-java.zapt delete mode 100644 src/controller/java/templates/partials/command_callback_responses.zapt delete mode 100644 src/controller/java/templates/partials/java_type_for_argument.zapt delete mode 100644 src/controller/java/templates/partials/list_attribute_callback_type.zapt rename src/{darwin/Framework/CHIP/CHIPListUtils_internal.h => lib/support/CHIPListUtils.h} (96%) diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 5d9b6f8a0db893..c488033b3ef907 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -84,6 +84,7 @@ android_library("java") { "src/chip/devicecontroller/NetworkCredentials.java", "src/chip/devicecontroller/PaseVerifierParams.java", "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", "zap-generated/chip/devicecontroller/ClusterReadMapping.java", "zap-generated/chip/devicecontroller/ClusterWriteMapping.java", diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index 9c5fb5bff7fcce..e7e70bb837e2fd 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -44,16 +46,19 @@ JNI_METHOD(jlong, {{asUpperCamelCase name}}Cluster, initWithDevice)(JNIEnv * env } {{#chip_cluster_commands}} -JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}})(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback{{#chip_cluster_command_arguments}}, {{asJniBasicType type true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}}, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; {{asUpperCamelCase ../name}}Cluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; {{#chip_cluster_command_arguments}} - {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(asLowerCamelCase label) cluster=parent.parent.name}} + {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(asLowerCamelCase label) cluster=(asUpperCamelCase parent.parent.name) depth=0}} {{/chip_cluster_command_arguments}} {{#*inline "callbackName"}}{{#if hasSpecificResponse}}{{asUpperCamelCase parent.name false}}Cluster{{asUpperCamelCase responseName false}}{{else}}DefaultSuccess{{/if}}{{/inline}} @@ -81,6 +86,9 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{/if}} VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), [](chip::JniByteArray * jniByteArray){ chip::Platform::Delete(jniByteArray);}); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), [](chip::JniUtfString * jniString){ chip::Platform::Delete(jniString);}); + onSuccess.release(); onFailure.release(); } @@ -88,7 +96,6 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{#chip_server_cluster_attributes}} {{#unless (isStrEqual chipCallback.name "Unsupported")}} {{#if isReportableAttribute}} -{{#unless isList}} JNI_METHOD(void, {{asCamelCased ../name false}}Cluster, subscribe{{asCamelCased name false}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -120,7 +127,6 @@ JNI_METHOD(void, {{asCamelCased ../name false}}Cluster, subscribe{{asCamelCased onSuccess.release(); onFailure.release(); } -{{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} diff --git a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt index d6cf240b496302..3b846ddc6574cb 100644 --- a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt +++ b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -28,16 +29,18 @@ using namespace chip::Controller; {{#chip_server_cluster_attributes}} {{#unless (isStrEqual chipCallback.name "Unsupported")}} {{#if isWritableAttribute}} -{{! TODO: Lists not supported in attribute writes yet. }} -{{#unless isList}} JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase name}}Attribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, {{asJniBasicType type true}} value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; TypeInfo::Type cppValue; - {{>encode_value target="cppValue" source="value" cluster=parent.name}} + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + {{>encode_value target="cppValue" source="value" cluster=(asUpperCamelCase parent.name) depth=0}} std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -63,10 +66,12 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase na {{/if}} VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), [](chip::JniByteArray * jniByteArray){ chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), [](chip::JniUtfString * jniString){ chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } -{{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} diff --git a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt index 3a90b3d2d9bd7a..e1f445ec112442 100644 --- a/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPInvokeCallbacks-src.zapt @@ -61,11 +61,11 @@ void CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callbac // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#chip_cluster_response_arguments}}{{#if isArray}}{{else}}{{#if_is_struct type}}{{else if isOptional}}Ljava/util/Optional;{{else if (isOctetString type)}}[B{{else if (isCharString type)}}Ljava/lang/String;{{else}}{{asJniSignature type true}}{{/if_is_struct}}{{/if}}{{/chip_cluster_response_arguments}})V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#chip_cluster_response_arguments}}{{asJniSignature type null parent.parent.name true}}{{/chip_cluster_response_arguments}})V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); {{#chip_cluster_response_arguments}} - {{>decode_value source=(concat "dataResponse." (asLowerCamelCase name)) target=(asSymbol label) cluster=parent.parent.name}} + {{>decode_value source=(concat "dataResponse." (asLowerCamelCase name)) target=(asSymbol label) cluster=(asUpperCamelCase parent.parent.name) depth=0}} {{/chip_cluster_response_arguments}} env->CallVoidMethod(javaCallbackRef, javaMethod{{#chip_cluster_response_arguments}}, {{asSymbol label}}{{/chip_cluster_response_arguments}}); diff --git a/src/controller/java/templates/CHIPReadCallbacks-src.zapt b/src/controller/java/templates/CHIPReadCallbacks-src.zapt index d103662136f3ee..6d263c1d0e3645 100644 --- a/src/controller/java/templates/CHIPReadCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPReadCallbacks-src.zapt @@ -88,14 +88,6 @@ void CHIP{{chipCallback.name}}AttributeCallback::CallbackFn(void * context, {{ch {{! TODO: Add support for struct-typed attributes }} {{#unless (isStrEqual chipCallback.name "Unsupported")}} -{{! NOTE: Some of our helpers rely on broken ZAP APIs that sniff for "isArray" - when we are just trying to work with the type of an array element. Fix - that by defining some inline partials that let us force isArray to false as - needed. }} -{{~#*inline "asUnboxedJniSignature"}}{{asJniSignature type false}}{{/inline}} -{{~#*inline "asUnboxedJniSignatureForEntry"}}{{> asUnboxedJniSignature isArray=false}}{{/inline~}} -{{~#*inline "asBoxedJavaBasicType"}}{{asJavaBasicTypeForZclType type true}}{{/inline~}} -{{~#*inline "asBoxedJavaBasicTypeForEntry"}}{{>asBoxedJavaBasicType isArray=false}}{{/inline~}} {{#if_in_global_responses}} {{else}} CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback::CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback(jobject javaCallback, bool keepAlive) : @@ -140,181 +132,11 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb javaCallbackRef = cppCallback.get()->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - {{#if isStruct}} - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipClusters${{asUpperCamelCase parent.name}}Cluster${{asUpperCamelCase name}}Attribute", attributeClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters${{asUpperCamelCase parent.name}}Cluster${{asUpperCamelCase name}}Attribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "" - , "({{#chip_attribute_list_entryTypes}}{{#if isArray}}{{! TODO: Add support for lists here }}{{else if isStruct}}{{! TODO: Add support for structs here }}{{else if isOptional}}Ljava/util/Optional;{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type true}}{{/if}}{{/chip_attribute_list_entryTypes}})V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find {{asUpperCamelCase name}}Attribute constructor")); - {{/if}} - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - {{#if isStruct}} - (void)entry; {{! In case all our struct members are not supported yet }} - {{#chip_attribute_list_entryTypes}} - {{#unless isArray}} - {{#unless isStruct}} - bool {{asLowerCamelCase name}}Null = false; - bool {{asLowerCamelCase name}}HasValue = true; - {{#if isNullable}} - {{#unless isOptional}} - {{chipType}} {{asLowerCamelCase name}}Value; - {{asLowerCamelCase name}}Null = entry.{{asLowerCamelCase name}}.IsNull(); - if (!{{asLowerCamelCase name}}Null) { - {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}.Value(); - } - {{/unless}} - {{/if}} - - {{#if isOptional}} - {{zapTypeToDecodableClusterObjectType type forceNotOptional=true forceNotNullable=true ns=parent.parent.name}} {{asLowerCamelCase name}}Value; - {{#if isNullable}} - {{asLowerCamelCase name}}HasValue = entry.{{asLowerCamelCase name}}.HasValue(); - if ({{asLowerCamelCase name}}HasValue) { - auto {{asLowerCamelCase name}}ValueFromOptional = entry.{{asLowerCamelCase name}}.Value(); - {{asLowerCamelCase name}}Null = {{asLowerCamelCase name}}ValueFromOptional.IsNull(); - if (!{{asLowerCamelCase name}}Null) { - {{asLowerCamelCase name}}Value = {{asLowerCamelCase name}}ValueFromOptional.Value(); - } - } - {{else}} - {{asLowerCamelCase name}}HasValue = entry.{{asLowerCamelCase name}}.HasValue(); - if ({{asLowerCamelCase name}}HasValue) { - {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}.Value(); - } - {{/if}} - {{/if}} - - {{#unless isOptional}} - {{#unless isNullable}} - {{zapTypeToDecodableClusterObjectType type ns=parent.parent.name}} {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}; - {{/unless}} - {{/unless}} - - {{/unless}} - {{/unless}} - - {{#if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else if (isOctetString type)}} - jbyteArray {{asLowerCamelCase name}} = nullptr; - if (!{{asLowerCamelCase name}}Null && {{asLowerCamelCase name}}HasValue) { - {{asLowerCamelCase name}} = env->NewByteArray({{asLowerCamelCase name}}Value.size()); - env->SetByteArrayRegion({{asLowerCamelCase name}}, 0, {{asLowerCamelCase name}}Value.size(), reinterpret_cast({{asLowerCamelCase name}}Value.data())); - } - {{else if (isCharString type)}} - jstring {{asLowerCamelCase name}} = nullptr; - chip::UtfString {{asLowerCamelCase name}}Str(env, {{asLowerCamelCase name}}Value); - if (!{{asLowerCamelCase name}}Null && {{asLowerCamelCase name}}HasValue) { - {{asLowerCamelCase name}} = jstring({{asLowerCamelCase name}}Str.jniValue()); - } - {{else}} - jobject {{asLowerCamelCase name}} = nullptr; - if (!{{asLowerCamelCase name}}Null && {{asLowerCamelCase name}}HasValue) { - jclass {{asLowerCamelCase name}}EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/{{>asBoxedJavaBasicTypeForEntry}}", {{asLowerCamelCase name}}EntryCls); - chip::JniClass {{asLowerCamelCase name}}JniClass({{asLowerCamelCase name}}EntryCls); - jmethodID {{asLowerCamelCase name}}EntryTypeCtor = env->GetMethodID({{asLowerCamelCase name}}EntryCls, "", "({{>asUnboxedJniSignatureForEntry}})V"); - {{asLowerCamelCase name}} = env->NewObject({{asLowerCamelCase name}}EntryCls, {{asLowerCamelCase name}}EntryTypeCtor, {{asLowerCamelCase name}}Value); - } - {{/if}} - - {{#if isOptional}} - {{#unless isArray}} - {{#unless isStruct}} - jobject {{asLowerCamelCase name}}Optional = nullptr; - chip::JniReferences::GetInstance().CreateOptional({{asLowerCamelCase name}}, {{asLowerCamelCase name}}Optional); - {{/unless}} - {{/unless}} - {{/if}} - {{/chip_attribute_list_entryTypes}} - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor - {{#chip_attribute_list_entryTypes}} - {{#if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else isOptional}} - , {{asLowerCamelCase name}}Optional - {{else}} - , {{asLowerCamelCase name}} - {{/if}} - {{/chip_attribute_list_entryTypes}} - ); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create {{asUpperCamelCase name}}Attribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - {{else}} - bool entryNull = false; - {{#unless isStruct}} - {{#if isNullable}} - {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue; - entryNull = entry.IsNull(); - if (!entryNull) { - entryValue = entry.Value(); - } - {{else}} - {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue = entry; - {{/if}} - {{/unless}} - - {{#if isStruct}} - {{! TODO: Add support for structs here }} - {{else if (isOctetString type)}} - jbyteArray entryObject = nullptr; - if (!entryNull) { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); - } - {{else if (isCharString type)}} - jstring entryObject = nullptr; - chip::UtfString entryStr(env, entryValue); - if (!entryNull) { - entryObject = jstring(entryStr.jniValue()); - } - {{else}} - jobject entryObject = nullptr; - if (!entryNull) { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/{{>asBoxedJavaBasicTypeForEntry}}", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "({{>asUnboxedJniSignatureForEntry}})V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - {{/if}} - - {{#if isOptional}} - jobject entryOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(entryObject, entryOptional); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryOptional); - {{else}} - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); - {{/if}} - {{/if}} - } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, ChipLogError(Zcl, "Error decoding {{asUpperCamelCase name}}Attribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + {{>decode_value source="list" target="arrayListObj" cluster=(asUpperCamelCase parent.name) depth=0}} env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -337,10 +159,10 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#if isArray}}{{else if isStruct}}{{else if isOptional}}Ljava/util/Optional;{{else if (isOctetString type)}}[B{{else if (isCharString type)}}Ljava/lang/String;{{else}}{{asJniSignature type true}}{{/if}})V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "({{#if isArray}}{{else if isStruct}}{{else if isOptional}}Ljava/util/Optional;{{else if (isOctetString type)}}[B{{else if (isCharString type)}}Ljava/lang/String;{{else}}{{asJniSignatureBasic type true}}{{/if}})V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - {{>decode_value source="value" target="javaValue" cluster=parent.name}} + {{>decode_value source="value" target="javaValue" cluster=(asUpperCamelCase parent.name) depth=0}} env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 37ae51f5e88ad3..1ac1aaad1dc481 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -4,6 +4,7 @@ package chip.devicecontroller; import androidx.annotation.Nullable; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; @@ -95,24 +96,25 @@ public class ChipClusters { {{#unless mustUseTimedInvoke}} public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { - {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, null); + {{#chip_cluster_command_arguments}}, {{asJavaType type chipType parent.parent.name includeAnnotations=true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}}) { + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments}}, {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}}, null); } {{/unless}} public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, int timedInvokeTimeoutMs) { - {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}, timedInvokeTimeoutMs); + {{#chip_cluster_command_arguments}}, {{asJavaType type chipType parent.parent.name includeAnnotations=true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}} + , int timedInvokeTimeoutMs) { + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments}}, {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}}, timedInvokeTimeoutMs); } {{/chip_cluster_commands}} {{#chip_cluster_commands}} private native void {{asLowerCamelCase name}}(long chipClusterPtr, {{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} Callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}} + {{#chip_cluster_command_arguments}}, {{asJavaType type chipType parent.parent.name includeAnnotations=true}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments}} , @Nullable Integer timedInvokeTimeoutMs); {{/chip_cluster_commands}} {{#chip_cluster_responses}} public interface {{asUpperCamelCase name}}Callback { - void onSuccess({{>command_callback_responses parent=..}}); + void onSuccess({{#chip_cluster_response_arguments}}{{#not_first}}, {{/not_first}}{{asJavaType type chipType parent.parent.name includeAnnotations=true}} {{asLowerCamelCase label}}{{/chip_cluster_response_arguments}}); void onError(Exception error); } @@ -120,110 +122,21 @@ public class ChipClusters { {{/chip_cluster_responses}} {{#chip_server_cluster_attributes}} - {{! TODO: Add support for struct-typed attributes }} {{#unless (isStrEqual chipCallback.name "Unsupported")}} - {{#if isList}} - {{#if isStruct}} - public static class {{asUpperCamelCase name}}Attribute { - {{#chip_attribute_list_entryTypes}} - {{#if isNullable}} - {{! 'unless' blocks are temporary until optional array / struct implemented }} - {{#unless isArray}} - {{#unless isStruct}} - @Nullable - {{/unless}} - {{/unless}} - {{/if}} - {{#if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else if (isOctetString type)}} - public {{#if isOptional}}Optional<{{/if}}byte[]{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}}; - {{else if (isCharString type)}} - public {{#if isOptional}}Optional<{{/if}}String{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}}; - {{else}} - public {{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType label type}}{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}}; - {{/if}} - {{/chip_attribute_list_entryTypes}} - - public {{asUpperCamelCase name}}Attribute( - {{#chip_attribute_list_entryTypes}} - {{#if isNullable}} - {{#unless isArray}} - {{#unless isStruct}} - @Nullable - {{/unless}} - {{/unless}} - {{/if}} - {{#if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else if (isOctetString type)}} - {{#if isOptional}}Optional<{{/if}}byte[]{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}} {{#notLastSupportedEntryTypes ..}},{{/notLastSupportedEntryTypes}} - {{else if (isCharString type)}} - {{#if isOptional}}Optional<{{/if}}String{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}} {{#notLastSupportedEntryTypes ..}},{{/notLastSupportedEntryTypes}} - {{else}} - {{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType label type}}{{#if isOptional}}>{{/if}} {{asLowerCamelCase name}} {{#notLastSupportedEntryTypes ..}},{{/notLastSupportedEntryTypes}} - {{/if}} - {{/chip_attribute_list_entryTypes}} - ) { - {{#chip_attribute_list_entryTypes}} - {{#if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else}} - this.{{asLowerCamelCase name}} = {{asLowerCamelCase name}}; - {{/if}} - {{/chip_attribute_list_entryTypes}} - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - {{#chip_attribute_list_entryTypes}} - {{#if isOptional}} - {{! TODO: Add support for optional types here }} - {{else if isNullable}} - {{! TODO: Add support for nullable types here }} - {{else if isArray}} - {{! TODO: Add support for lists here }} - {{else if isStruct}} - {{! TODO: Add support for structs here }} - {{else if (isOctetString type)}} - output.append("byte[] "); - output.append(Arrays.toString({{asLowerCamelCase name}})); - output.append("\n"); - {{else if (isCharString type)}} - output.append("String {{asLowerCamelCase name}}: "); - output.append(this.{{asLowerCamelCase name}}); - output.append("\n"); - {{else}} - output.append("{{asJavaBasicType label type}} {{asLowerCamelCase name}}: "); - output.append(this.{{asLowerCamelCase name}}); - output.append("\n"); - {{/if}} - - {{/chip_attribute_list_entryTypes}} - return output.toString(); - } - } - {{/if}} - {{/if}} - {{#if_in_global_responses}} {{else}} + {{! NOTE: asJavaType ends up sniffing for isArray on the context. Since we want the type of our _entry_, force isArray to + false. }} + {{~#*inline "asJavaTypeForEntry"}}{{asJavaType type null parent.name forceNotList=true}}{{/inline~}} {{#if isList}} public interface {{asUpperCamelCase name}}AttributeCallback { - void onSuccess(List<{{#>list_attribute_callback_type}}{{/list_attribute_callback_type}}> valueList); + void onSuccess({{#if isNullable}}@Nullable{{/if}} List<{{>asJavaTypeForEntry isArray=false}}> valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } {{else}} public interface {{asUpperCamelCase name}}AttributeCallback { - void onSuccess({{#>list_attribute_callback_type}}{{/list_attribute_callback_type}} value); + void onSuccess({{#if isNullable}}@Nullable{{/if}} {{>asJavaTypeForEntry isArray=false}} value); void onError(Exception ex); default void onSubscriptionEstablished() {} } @@ -245,21 +158,17 @@ public class ChipClusters { read{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback); } {{#if isWritableAttribute}} - {{! TODO: Lists not supported in attribute writes yet. }} - {{#unless isList}} {{#unless mustUseTimedWrite}} - public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value) { + public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback, {{asJavaType type chipType parent.name}} value) { write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, null); } {{/unless}} - public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback{{>java_type_for_argument}} value, int timedWriteTimeoutMs) { + public void write{{asUpperCamelCase name}}Attribute(DefaultClusterCallback callback, {{asJavaType type chipType parent.name}} value, int timedWriteTimeoutMs) { write{{asUpperCamelCase name}}Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } - {{/unless}} {{/if}} {{#if isReportableAttribute}} - {{#unless isList}} public void subscribe{{asCamelCased name false}}Attribute( {{#if_in_global_responses}} {{convertAttributeCallbackTypeToJavaName chipCallback.type}}AttributeCallback callback @@ -269,7 +178,6 @@ public class ChipClusters { int minInterval, int maxInterval) { subscribe{{asCamelCased name false}}Attribute(chipClusterPtr, callback, minInterval, maxInterval); } - {{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} @@ -285,21 +193,16 @@ public class ChipClusters { {{/if_in_global_responses}} ); {{#if isWritableAttribute}} - {{! TODO: Lists not supported in attribute writes yet. }} - {{#unless isList}} - private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback{{>java_type_for_argument}} value, @Nullable Integer timedWriteTimeoutMs); - {{/unless}} + private native void write{{asUpperCamelCase name}}Attribute(long chipClusterPtr, DefaultClusterCallback callback, {{asJavaType type chipType parent.name}} value, @Nullable Integer timedWriteTimeoutMs); {{/if}} {{#if isReportableAttribute}} - {{#unless isList}} private native void subscribe{{asCamelCased name false}}Attribute(long chipClusterPtr, {{#if_in_global_responses}} {{convertAttributeCallbackTypeToJavaName chipCallback.type}}AttributeCallback callback {{else}} {{asUpperCamelCase name}}AttributeCallback callback {{/if_in_global_responses}}, int minInterval, int maxInterval); - {{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} diff --git a/src/controller/java/templates/ChipStructs-java.zapt b/src/controller/java/templates/ChipStructs-java.zapt new file mode 100644 index 00000000000000..937efcc3279918 --- /dev/null +++ b/src/controller/java/templates/ChipStructs-java.zapt @@ -0,0 +1,58 @@ +{{> header}} +{{#if (chip_has_client_clusters)}} +package chip.devicecontroller; + +import androidx.annotation.Nullable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Optional; + +public class ChipStructs { + +{{#zcl_clusters}} +{{#zcl_structs}} +{{#if itemCnt}} +public static class {{asUpperCamelCase parent.name}}Cluster{{asUnderlyingType name}} { +{{#zcl_struct_items}} +public {{asJavaType type null parent.parent.name includeAnnotations=true}} {{asLowerCamelCase (asSymbol label)}}; +{{/zcl_struct_items}} + + public {{asUpperCamelCase parent.name}}Cluster{{asUnderlyingType name}}( + {{#zcl_struct_items}} + {{#not_first}}, {{/not_first}}{{asJavaType type null parent.parent.name includeAnnotations=true}} {{asLowerCamelCase (asSymbol label)}} + {{/zcl_struct_items}}) { + {{#zcl_struct_items}} + this.{{asLowerCamelCase (asSymbol label)}} = {{asLowerCamelCase (asSymbol label)}}; + {{/zcl_struct_items}} + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("{{asUpperCamelCase parent.name}}Cluster{{asUnderlyingType name}} {\n"); + {{#zcl_struct_items}} + {{! TODO: Print more descriptive types for optional, nullable, array, and struct. }} + output.append("\t{{asLowerCamelCase name}}: "); + {{#if isList}} + output.append({{asLowerCamelCase name}}); + {{else if isArray}} + output.append({{asLowerCamelCase name}}); + {{else if (isOctetString type)}} + output.append(Arrays.toString({{asLowerCamelCase name}})); + {{else}} + output.append({{asLowerCamelCase name}}); + {{/if}} + output.append("\n"); + {{/zcl_struct_items}} + output.append("}\n"); + return output.toString(); + } +} +{{/if}} + +{{/zcl_structs}} +{{/zcl_clusters}} + +} + +{{/if}} \ No newline at end of file diff --git a/src/controller/java/templates/ClusterInfo-java.zapt b/src/controller/java/templates/ClusterInfo-java.zapt index 2951811eac7c0c..c7f26cbd639321 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -3,6 +3,7 @@ package chip.devicecontroller; +import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; @@ -208,7 +209,7 @@ public class ClusterInfoMapping { } @Override - public void onSuccess({{>command_callback_responses parent=..}}) { + public void onSuccess({{#chip_cluster_response_arguments}}{{#not_first}}, {{/not_first}}{{asJavaType type chipType parent.parent.name includeAnnotations=true}} {{asSymbol label}}{{/chip_cluster_response_arguments}}) { Map responseValues = new LinkedHashMap<>(); {{#chip_cluster_response_arguments}} {{#if isArray}} @@ -219,7 +220,7 @@ public class ClusterInfoMapping { // {{asSymbol label}}: Struct {{type}} // Conversion from this type to Java is not properly implemented yet {{else}} - CommandResponseInfo {{asSymbol label}}ResponseValue = new CommandResponseInfo("{{asSymbol label}}", "{{asJavaBasicType type}}"); + CommandResponseInfo {{asSymbol label}}ResponseValue = new CommandResponseInfo("{{asSymbol label}}", "{{asJavaType type null parent.parent.name}}"); responseValues.put({{asSymbol label}}ResponseValue, {{asSymbol label}}); {{/if_is_struct}} {{/if}} @@ -246,26 +247,14 @@ public class ClusterInfoMapping { public void setCallbackDelegate(ClusterCommandCallback callback) { this.callback = callback; } + + {{! NOTE: asJavaType ends up sniffing for isArray on the context. Since we want the type of our _entry_, force isArray to + false. }} + {{~#*inline "asJavaTypeForEntry"}}{{asJavaType type null parent.name forceNotList=true}}{{/inline~}} @Override - public void onSuccess(List<{{#>list_attribute_callback_type}}ChipClusters.{{asUpperCamelCase ../name}}Cluster.{{/list_attribute_callback_type}}> valueList) { + public void onSuccess({{#if isNullable}}@Nullable{{/if}} List<{{> asJavaTypeForEntry isArray=false}}> valueList) { Map responseValues = new LinkedHashMap<>(); - {{#if isStruct}} - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - {{else}} - {{#if (isOctetString type)}} - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - {{else if (isCharString type)}} - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - {{else}} - {{! NOTE: asJavaBasicTypeForZclType does not handle isArray well, so - add an inline partial to force isArray to false when we want the - types of list entries. }} - {{~#*inline "asBoxedJavaBasicType"}}{{asJavaBasicTypeForZclType type true}}{{/inline~}} - {{~#*inline "asBoxedJavaBasicTypeForEntry"}}{{> asBoxedJavaBasicType isArray=false}}{{/inline~}} - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<{{>asBoxedJavaBasicTypeForEntry}}>"); - {{/if}} - {{/if}} - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<{{> asJavaTypeForEntry isArray=false}}>"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -315,28 +304,26 @@ public class ClusterInfoMapping { Map {{asLowerCamelCase ../name}}{{asLowerCamelCase name}}CommandParams = new LinkedHashMap(); {{! TODO: fill out parameter types }} {{#if (zcl_command_arguments_count this.id)}} - {{#chip_cluster_command_arguments_with_structs_expanded}} + {{#chip_cluster_command_arguments}} {{#if_is_struct type}} {{else}} - CommandParameterInfo {{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}{{asLowerCamelCase label}}CommandParameterInfo = new CommandParameterInfo("{{asLowerCamelCase label}}", {{asJavaBasicType type}}.class); + CommandParameterInfo {{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}{{asLowerCamelCase label}}CommandParameterInfo = new CommandParameterInfo("{{asLowerCamelCase label}}", {{asJavaType type null parent.parent.name removeGenericType=true}}.class); {{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}CommandParams.put("{{asLowerCamelCase label}}",{{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}{{asLowerCamelCase label}}CommandParameterInfo); {{#not_last}} {{/not_last}} {{/if_is_struct}} - {{/chip_cluster_command_arguments_with_structs_expanded}} + {{/chip_cluster_command_arguments}} {{else}} {{/if}} - // Populate commands {{#if hasSpecificResponse}} InteractionInfo {{asLowerCamelCase ../name}}{{asLowerCamelCase name}}InteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.{{asUpperCamelCase ../name}}Cluster) cluster) .{{asLowerCamelCase name}}((ChipClusters.{{asUpperCamelCase ../name}}Cluster.{{asUpperCamelCase responseName}}Callback) callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, - ({{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}) + {{#chip_cluster_command_arguments}} + , ({{asJavaType type chipType parent.parent.name}}) commandArguments.get("{{asLowerCamelCase label}}") - {{/if_is_struct}} - {{/chip_cluster_command_arguments_with_structs_expanded}} - {{! TODO: Allow timeout to be passed from client for this and timed write. }} + {{/chip_cluster_command_arguments}} + {{! TODO: Allow timeout to be passed from client for this and timed write. }} {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, @@ -348,10 +335,11 @@ public class ClusterInfoMapping { (cluster, callback, commandArguments) -> { ((ChipClusters.{{asUpperCamelCase ../name}}Cluster) cluster) .{{asLowerCamelCase name}}((DefaultClusterCallback) callback - {{#chip_cluster_command_arguments_with_structs_expanded}}, - ({{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}) + {{#chip_cluster_command_arguments}} + , ({{asJavaType type chipType parent.parent.name}}) commandArguments.get("{{asLowerCamelCase label}}") - {{/chip_cluster_command_arguments_with_structs_expanded}} + {{/chip_cluster_command_arguments}} + {{! TODO: Allow timeout to be passed from client for this and timed write. }} {{#if mustUseTimedInvoke}}, 10000{{/if}} ); }, diff --git a/src/controller/java/templates/ClusterInfo-write-interaction.zapt b/src/controller/java/templates/ClusterInfo-write-interaction.zapt index 7cf4b5e4162033..6a49c25073d62d 100644 --- a/src/controller/java/templates/ClusterInfo-write-interaction.zapt +++ b/src/controller/java/templates/ClusterInfo-write-interaction.zapt @@ -21,13 +21,13 @@ public class ClusterWriteMapping { {{#if isWritableAttribute}} {{#unless isList}} Map write{{asUpperCamelCase ../name}}{{asUpperCamelCase name}}CommandParams = new LinkedHashMap(); - CommandParameterInfo {{asLowerCamelCase ../name}}{{asLowerCamelCase name}}CommandParameterInfo = new CommandParameterInfo("value", {{asJavaBasicType type}}.class); + CommandParameterInfo {{asLowerCamelCase ../name}}{{asLowerCamelCase name}}CommandParameterInfo = new CommandParameterInfo("value", {{asJavaType type null parent.parent.name removeGenericType=true}}.class); write{{asUpperCamelCase ../name}}{{asUpperCamelCase name}}CommandParams.put("value",{{asLowerCamelCase ../name}}{{asLowerCamelCase name}}CommandParameterInfo); InteractionInfo write{{asUpperCamelCase ../name}}{{asUpperCamelCase name}}AttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.{{asUpperCamelCase ../name}}Cluster) cluster).write{{asUpperCamelCase name}}Attribute( (DefaultClusterCallback) callback, - ({{asJavaBoxedType type}}) + ({{asJavaBoxedType type chipType}}) commandArguments.get("value") {{#if mustUseTimedWrite}}, 10000{{/if}} ); diff --git a/src/controller/java/templates/helper.js b/src/controller/java/templates/helper.js index 8fffe460fcbb70..a68d31a95322f1 100644 --- a/src/controller/java/templates/helper.js +++ b/src/controller/java/templates/helper.js @@ -19,11 +19,10 @@ const zapPath = '../../../../third_party/zap/repo/dist/src-electron/'; const templateUtil = require(zapPath + 'generator/template-util.js') const zclHelper = require(zapPath + 'generator/helper-zcl.js') -const queryCommand = require(zapPath + 'db/query-command.js') const ChipTypesHelper = require('../../../../src/app/zap-templates/common/ChipTypesHelper.js'); const StringHelper = require('../../../../src/app/zap-templates/common/StringHelper.js'); -const ChipHelper = require('../../../../src/app/zap-templates/templates/chip/helper.js'); +const appHelper = require('../../../../src/app/zap-templates/templates/app/helper.js'); function convertBasicCTypeToJavaType(cType) { @@ -89,25 +88,19 @@ function convertBasicCTypeToJavaBoxedType(cType) } } -function asJavaBasicType(type) +function asJavaBoxedType(type, zclType) { if (StringHelper.isOctetString(type)) { return 'byte[]'; } else if (StringHelper.isCharString(type)) { return 'String'; } else { - return convertBasicCTypeToJavaType(ChipTypesHelper.asBasicType(this.chipType)); - } -} - -function asJavaBoxedType(type) -{ - if (StringHelper.isOctetString(type)) { - return 'byte[]'; - } else if (StringHelper.isCharString(type)) { - return 'String'; - } else { - return convertBasicCTypeToJavaBoxedType(ChipTypesHelper.asBasicType(this.chipType)); + try { + return convertBasicCTypeToJavaBoxedType(ChipTypesHelper.asBasicType(zclType)); + } catch (error) { + // Unknown type, default to Object. + return "Object"; + } } } @@ -127,42 +120,7 @@ function asJniBasicType(type, useBoxedTypes) } } -function asJavaBasicTypeForZclType(type, useBoxedTypes) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - if (useBoxedTypes) { - return convertBasicCTypeToJavaBoxedType(ChipTypesHelper.asBasicType(zclType)); - } else { - return convertBasicCTypeToJavaType(ChipTypesHelper.asBasicType(zclType)); - } - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => console.log(err)); - return templateUtil.templatePromise(this.global, promise) -} - -function asJniBasicTypeForZclType(type) -{ - function fn(pkgId) - { - const options = { 'hash' : {} }; - return zclHelper.asUnderlyingZclType.call(this, type, options).then(zclType => { - return convertBasicCTypeToJniType(ChipTypesHelper.asBasicType(zclType)); - }) - } - - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)).catch(err => { - console.log(err); - throw err; - }); - return templateUtil.templatePromise(this.global, promise) -} - -function asJniSignature(type, useBoxedTypes) +function asJniSignatureBasic(type, useBoxedTypes) { function fn(pkgId) { @@ -195,6 +153,10 @@ function convertCTypeToJniSignature(cType, useBoxedTypes) return 'J'; case 'boolean': return 'Z'; + case 'double': + return 'D'; + case 'float': + return 'F'; case 'Boolean': return 'Ljava/lang/Boolean;'; case 'Integer': @@ -227,50 +189,149 @@ function convertAttributeCallbackTypeToJavaName(cType) } } -function notLastSupportedEntryTypes(context, options) +async function asUnderlyingBasicType(type) { - if (context.items.length == 0) { - return + const options = { 'hash' : {} }; + let zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); + return ChipTypesHelper.asBasicType(zclType); +} + +async function asJavaType(type, zclType, cluster, options) +{ + let pkgId = await templateUtil.ensureZclPackageId(this); + if (zclType == null) { + const options = { 'hash' : {} }; + zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); + } + let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); + + let classType = ""; + + if (StringHelper.isOctetString(type)) { + classType += 'byte[]'; + } else if (StringHelper.isCharString(type)) { + classType += 'String'; + } else if (isStruct) { + classType += `ChipStructs.${appHelper.asUpperCamelCase(cluster)}Cluster${appHelper.asUpperCamelCase(type)}`; + } else { + classType += asJavaBoxedType(type, zclType); + } + + if (!options.hash.forceNotList && (this.isList || this.isArray || this.entryType)) { + if (!options.hash.removeGenericType) { + classType = 'ArrayList<' + classType + '>'; + } else { + classType = 'ArrayList'; + } } - let lastIndex = context.items.length - 1; - while (context.items[lastIndex].isStruct || context.items[lastIndex].isArray) { - lastIndex--; + if (this.isOptional) { + if (!options.hash.removeGenericType) { + classType = 'Optional<' + classType + '>'; + } else { + classType = 'Optional'; + } } - if (this.index != lastIndex) { - return options.fn(this); + if (this.isNullable && options.hash.includeAnnotations) { + classType = '@Nullable ' + classType; } + + return classType; +} + +async function asJniType(type, zclType, cluster, options) +{ + let types = await asJniHelper.call(this, type, zclType, cluster, options); + return types["jniType"]; +} + +async function asJniSignature(type, zclType, cluster, useBoxedTypes, options) +{ + let types = await asJniHelper.call(this, type, zclType, cluster, options); + return useBoxedTypes ? types["jniBoxedSignature"] : types["jniSignature"]; } -function notLastSupportedCommandResponseType(items, options) +async function asJniClassName(type, zclType, cluster, options) { - if (items.length == 0) { - return + let types = await asJniHelper.call(this, type, zclType, cluster, options); + return types["jniClassName"]; +} + +async function asJniHelper(type, zclType, cluster, options) +{ + let pkgId = await templateUtil.ensureZclPackageId(this); + if (zclType == null) { + zclType = await zclHelper.asUnderlyingZclType.call(this, type, options); + } + let isStruct = await zclHelper.isStruct(this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); + + if (this.isOptional) { + const signature = "Ljava/util/Optional;" + return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; + } + + if (this.isList || this.isArray) { + const signature = "Ljava/util/ArrayList;" + return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; + } + + if (StringHelper.isOctetString(type)) { + const signature = "[B"; + return { jniType : "jbyteArray", jniSignature : signature, jniBoxedSignature : signature }; } - let lastIndex = items.length - 1; - while (items[lastIndex].isArray) { - lastIndex--; + if (StringHelper.isCharString(type)) { + const signature = "Ljava/lang/String;"; + return { jniType : "jstring", jniSignature : signature, jniBoxedSignature : signature }; } - if (this.index != lastIndex) { - return options.fn(this); + if (isStruct) { + const signature + = `Lchip/devicecontroller/ChipStructs$${appHelper.asUpperCamelCase(cluster)}Cluster${appHelper.asUpperCamelCase(type)};`; + return { jniType : "jobject", jniSignature : signature, jniBoxedSignature : signature }; + } + + let jniBoxedSignature; + try { + jniBoxedSignature = await asJniSignatureBasic.call(this, type, true); + } catch (error) { + jniBoxedSignature = "Ljava/lang/Object;"; + } + let jniSignature; + try { + jniSignature = await asJniSignatureBasic.call(this, type, false); + } catch (error) { + jniSignature = "Ljava/lang/Object;"; } + // Example: Ljava/lang/Integer; -> java/lang/Integer, needed for JNI class lookup + let jniClassName = jniBoxedSignature.substring(1, jniBoxedSignature.length - 1); + return { + jniType : asJniBasicType(type, true), + jniSignature : jniSignature, + jniBoxedSignature : jniBoxedSignature, + jniClassName : jniClassName + }; +} + +function incrementDepth(depth) +{ + return depth + 1; } // // Module exports // -exports.asJavaBasicType = asJavaBasicType; +exports.asUnderlyingBasicType = asUnderlyingBasicType; +exports.asJavaType = asJavaType; exports.asJavaBoxedType = asJavaBoxedType; -exports.asJniBasicType = asJniBasicType; -exports.asJniBasicTypeForZclType = asJniBasicTypeForZclType; +exports.asJniType = asJniType; exports.asJniSignature = asJniSignature; -exports.asJavaBasicTypeForZclType = asJavaBasicTypeForZclType; +exports.asJniClassName = asJniClassName; +exports.asJniBasicType = asJniBasicType; +exports.asJniSignatureBasic = asJniSignatureBasic; exports.convertBasicCTypeToJniType = convertBasicCTypeToJniType; exports.convertCTypeToJniSignature = convertCTypeToJniSignature; exports.convertBasicCTypeToJavaBoxedType = convertBasicCTypeToJavaBoxedType; exports.convertAttributeCallbackTypeToJavaName = convertAttributeCallbackTypeToJavaName; -exports.notLastSupportedEntryTypes = notLastSupportedEntryTypes; -exports.notLastSupportedCommandResponseType = notLastSupportedCommandResponseType; +exports.incrementDepth = incrementDepth; diff --git a/src/controller/java/templates/partials/command_callback_responses.zapt b/src/controller/java/templates/partials/command_callback_responses.zapt deleted file mode 100644 index 920dd27a7d60ac..00000000000000 --- a/src/controller/java/templates/partials/command_callback_responses.zapt +++ /dev/null @@ -1,27 +0,0 @@ -{{#chip_cluster_response_arguments}} -{{#if isNullable}} - {{#unless isArray}} - {{#unless isOptional}} - {{#if_is_struct type}} - {{else}} - @Nullable - {{/if_is_struct}} - {{/unless}} - {{/unless}} -{{/if}} -{{#if isArray}} - // {{asSymbol label}}: {{asUnderlyingZclType type}} - // Conversion from this type to Java is not properly implemented yet -{{else}} -{{#if_is_struct type}} - // {{asSymbol label}}: Struct {{type}} - // Conversion from this type to Java is not properly implemented yet -{{else if (isOctetString type)}} - {{#if isOptional}}Optional<{{/if}}byte[]{{#if isOptional}}>{{/if}} {{asSymbol label}}{{#notLastSupportedCommandResponseType parent.arguments}},{{/notLastSupportedCommandResponseType}} -{{else if (isShortString type)}} - {{#if isOptional}}Optional<{{/if}}String{{#if isOptional}}>{{/if}} {{asSymbol label}}{{#notLastSupportedCommandResponseType parent.arguments}},{{/notLastSupportedCommandResponseType}} -{{else}} - {{#if isOptional}}Optional<{{/if}}{{asJavaBasicTypeForZclType type true}}{{#if isOptional}}>{{/if}} {{asSymbol label}}{{#notLastSupportedCommandResponseType parent.arguments}},{{/notLastSupportedCommandResponseType}} -{{/if_is_struct}} -{{/if}} -{{/chip_cluster_response_arguments}} \ No newline at end of file diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 723258bb631046..63db5531d1dfff 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -1,35 +1,68 @@ +{{#unless omitDeclaration}} jobject {{target}}; +{{/unless}} {{#if isOptional}} if (!{{source}}.HasValue()) { chip::JniReferences::GetInstance().CreateOptional(nullptr, {{target}}); } else { -{{#if isNullable}} -if ({{source}}.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, {{target}}); -} else { -{{/if}} -{{/if}} -{{~#*inline "item"}}{{source}}{{#if isOptional}}.Value(){{/if}}{{#if isNullable}}.Value(){{/if}}{{/inline}} -{{#if isArray}} -{{asSymbol label}} = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ -{{! TODO: Use if_is_struct, which works better for nested types. Currently can't because inline partials aren't found in its else block. }} -{{else if isStruct}} -{{asSymbol label}} = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ -{{else if (isOctetString type)}} -chip::ByteArray {{target}}ByteArray(env, {{>item}}); -{{target}} = {{target}}ByteArray.jniValue(); -{{else if (isCharString type)}} -chip::UtfString {{target}}UtfString(env, {{>item}}); -{{target}} = {{target}}UtfString.jniValue(); -{{else}} -std::string {{target}}ClassName = "java/lang/{{asJavaBasicTypeForZclType type true}}"; -std::string {{target}}CtorSignature = "({{asJniSignature type false}})V"; -chip::JniReferences::GetInstance().CreateBoxedObject<{{zapTypeToDecodableClusterObjectType type ns=cluster forceNotNullable=true forceNotOptional=true}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{>item}}, {{target}}); -{{/if}} -{{#if isOptional}} -chip::JniReferences::GetInstance().CreateOptional({{target}}, {{target}}); -{{#if isNullable}} + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster depth=(incrementDepth depth) isOptional=false omitDeclaration=true}} } -{{/if}} +{{else if isNullable}} +if ({{source}}.IsNull()) { + {{target}} = nullptr; +} else { + {{>decode_value target=target source=(concat source ".Value()") cluster=cluster depth=(incrementDepth depth) isNullable=false omitDeclaration=true}} } +{{else if isArray}} + chip::JniReferences::GetInstance().CreateArrayList({{target}}); + + auto iter_{{target}}_{{depth}} = {{source}}.begin(); + while (iter_{{target}}_{{depth}}.Next()) + { + auto & entry_{{depth}} = iter_{{target}}_{{depth}}.GetValue(); + {{>decode_value target=(concat "newElement_" depth) source=(concat "entry_" depth) cluster=cluster depth=(incrementDepth depth) isList=false isArray=false forceNotList=true omitDeclaration=false}} + chip::JniReferences::GetInstance().AddToArrayList({{target}}, newElement_{{depth}}); + } +{{else}} + {{#if_is_struct type}} + {{#zcl_struct_items_by_struct_name type}} + {{>decode_value target=(concat ../target "_" (asLowerCamelCase label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster depth=(incrementDepth depth) omitDeclaration=false}} + {{/zcl_struct_items_by_struct_name}} + + jclass {{asLowerCamelCase type}}StructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs${{cluster}}Cluster{{asUpperCamelCase type}}", {{asLowerCamelCase type}}StructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs${{cluster}}Cluster{{asUpperCamelCase type}}")); + chip::JniClass structJniClass({{asLowerCamelCase type}}StructClass); + jmethodID {{asLowerCamelCase type}}StructCtor = env->GetMethodID({{asLowerCamelCase type}}StructClass, "" + , "({{#zcl_struct_items_by_struct_name type}}{{#if isOptional}}Ljava/util/Optional;{{else}}{{#if_is_struct type}}Lchip/devicecontroller/ChipStructs${{../cluster}}Cluster{{asUpperCamelCase type}};{{else}}{{#if isArray}}Ljava/util/ArrayList;{{else if (isString type)}}{{#if (isOctetString type)}}[B{{else}}Ljava/lang/String;{{/if}}{{else}}{{asJniSignature type null cluster true}}{{/if}}{{/if_is_struct}}{{/if}}{{/zcl_struct_items_by_struct_name}})V"); + VerifyOrReturn({{asLowerCamelCase type}}StructCtor != nullptr, ChipLogError(Zcl, "Could not find ChipStructs${{cluster}}Cluster{{asUpperCamelCase type}} constructor")); + + {{target}} = env->NewObject({{asLowerCamelCase type}}StructClass, {{asLowerCamelCase type}}StructCtor + {{#zcl_struct_items_by_struct_name type}} + , {{../target}}_{{asLowerCamelCase label}} + {{/zcl_struct_items_by_struct_name}} + ); + {{else}} + {{#if_chip_enum type}} + std::string {{target}}ClassName = "{{asJniClassName type null cluster}}"; + std::string {{target}}CtorSignature = "({{asJniSignature type null cluster false}})V"; + chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), static_cast<{{asUnderlyingBasicType type}}>({{source}}), {{target}}); + {{else}} + {{#if (isOctetString type)}} + jbyteArray {{target}}ByteArray = env->NewByteArray(static_cast({{source}}.size())); + env->SetByteArrayRegion({{target}}ByteArray, 0, static_cast({{source}}.size()), reinterpret_cast({{source}}.data())); + {{target}} = {{target}}ByteArray; + {{else if (isCharString type)}} + {{target}} = env->NewStringUTF(std::string({{source}}.data(), {{source}}.size()).c_str()); + {{else}} + std::string {{target}}ClassName = "{{asJniClassName type null cluster}}"; + std::string {{target}}CtorSignature = "({{asJniSignature type null cluster false}})V"; + {{#if_is_bitmap type}} + chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}.Raw(), {{target}}); + {{else}} + chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}, {{target}}); + {{/if_is_bitmap}} + {{/if}} + {{/if_chip_enum}} + {{/if_is_struct}} {{/if}} \ No newline at end of file diff --git a/src/controller/java/templates/partials/encode_value.zapt b/src/controller/java/templates/partials/encode_value.zapt index 14f244f0837f7d..ad314afacfa3fe 100644 --- a/src/controller/java/templates/partials/encode_value.zapt +++ b/src/controller/java/templates/partials/encode_value.zapt @@ -1,75 +1,61 @@ {{#if isOptional}} -chip::JniReferences::GetInstance().GetOptionalValue({{source}}, {{source}}); -{{/if}} -{{#if isNullable}} -{{#if_chip_enum type}} - decltype({{target}})::UnderlyingType {{source}}Value; if ({{source}} != nullptr) { - {{source}}Value = static_cast(chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}})); + jobject optionalValue_{{depth}}; + chip::JniReferences::GetInstance().GetOptionalValue({{source}}, optionalValue_{{depth}}); + auto & definedValue_{{depth}} = {{target}}.Emplace(); + {{>encode_value target=(concat "definedValue_" depth) source=(concat "optionalValue_" depth) cluster=cluster depth=(incrementDepth depth) isOptional=false}} } -{{else}} -{{#if isArray}} -{{! TODO: Support array types. }} -{{else if isStruct}} -{{! TODO: Use if_is_struct, which works better for nested types. Currently can't because inline partials aren't found in its else block. }} -{{! TODO: Support struct types. }} -{{else if (isOctetString type)}} - chip::ByteSpan {{source}}Value; - if ({{source}} != nullptr) { - {{source}}Value = chip::JniByteArray(env, static_cast({{source}})).byteSpan(); +{{else if isNullable}} + if ({{source}} == nullptr) { + {{target}}.SetNull(); + } else { + auto & nonNullValue_{{depth}} = {{target}}.SetNonNull(); + {{>encode_value target=(concat "nonNullValue_" depth) source=source cluster=cluster depth=(incrementDepth depth) isNullable=false}} } -{{else if (isCharString type)}} - chip::CharSpan {{source}}Value; - if ({{source}} != nullptr) { - {{source}}Value = chip::JniUtfString(env, static_cast({{source}})).charSpan(); - } -{{else}} - {{#if_is_bitmap type}} - decltype({{target}}) {{source}}Value; - if ({{source}} != nullptr) { - {{source}}Value = static_cast(chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}})); - } - {{else}} - {{chipType}} {{source}}Value; - if ({{source}} != nullptr) { - {{source}}Value = chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}}); +{{else if isArray}} + { + using ListType_{{depth}} = std::remove_reference_t; + using ListMemberType_{{depth}} = ListMemberTypeGetter::Type; + jint {{source}}Size; + chip::JniReferences::GetInstance().GetArrayListSize({{source}}, {{source}}Size); + if ({{source}}Size != 0) { + auto * listHolder_{{depth}} = new ListHolder({{source}}Size); + listFreer.add(listHolder_{{depth}}); + + for (size_t i_{{depth}} = 0; i_{{depth}} < static_cast({{source}}Size); ++i_{{depth}}) { + jobject element_{{depth}}; + chip::JniReferences::GetInstance().GetArrayListItem({{source}}, i_{{depth}}, element_{{depth}}); + {{>encode_value target=(concat "listHolder_" depth "->mList[i_" depth "]") source=(concat "element_" depth) cluster=cluster depth=(incrementDepth depth) isList=false isArray=false}} + } + {{target}} = ListType_{{depth}}(listHolder_{{depth}}->mList, {{source}}Size); + } else { + {{target}} = ListType_{{depth}}(); } - {{/if_is_bitmap}} -{{/if}} -{{/if_chip_enum}} -{{/if}} -{{#*inline "value"}} -{{! TODO Implement complex types parsing in order to properly set the request parameters }} -{{#if isArray}} -{{zapTypeToEncodableClusterObjectType type ns=cluster}}() -{{else if isStruct}} -{{zapTypeToEncodableClusterObjectType type ns=cluster}}() + } {{else if (isOctetString type)}} -chip::JniByteArray(env, static_cast({{source}})).byteSpan() + auto {{source}}Jni = chip::Platform::New(env, static_cast({{source}})); + cleanupByteArrays.push_back({{source}}Jni); + {{target}} = {{source}}Jni->byteSpan(); {{else if (isCharString type)}} -chip::JniUtfString(env, static_cast({{source}})).charSpan() + auto {{source}}Jni = chip::Platform::New(env, static_cast({{source}})); + cleanupStrings.push_back({{source}}Jni); + {{target}} = {{source}}Jni->charSpan(); {{else}} - {{#if_chip_enum type}} - static_cast(chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}})) + {{#if_is_struct type}} + {{#zcl_struct_items_by_struct_name type}} + jobject {{../source}}_{{asLowerCamelCase label}}Item_{{../depth}}; + chip::JniReferences::GetInstance().GetObjectField({{../source}}, "{{asLowerCamelCase label}}", "{{asJniSignature type null ../cluster true}}", {{../source}}_{{asLowerCamelCase label}}Item_{{../depth}}); + {{>encode_value target=(concat ../target "." (asLowerCamelCase label)) source=(concat ../source "_" (asLowerCamelCase label) "Item_" ../depth) cluster=../cluster depth=(incrementDepth ../depth)}} + {{/zcl_struct_items_by_struct_name}} {{else}} - {{#if_is_bitmap type}} - static_cast(chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}})) + {{#if_chip_enum type}} + {{target}} = static_cast>(chip::JniReferences::GetInstance().{{asJavaType type null parent.parent.name forceNotList=true}}ToPrimitive({{source}})); {{else}} - static_cast(chip::JniReferences::GetInstance().{{asJavaBoxedType type}}ToPrimitive({{source}})) - {{/if_is_bitmap}} - {{/if_chip_enum}} + {{#if_is_bitmap type}} + {{target}} = static_cast>(chip::JniReferences::GetInstance().{{asJavaType type null parent.parent.name forceNotList=true}}ToPrimitive({{source}})); + {{else}} + {{target}} = static_cast>(chip::JniReferences::GetInstance().{{asJavaType type null parent.parent.name forceNotList=true}}ToPrimitive({{source}})); + {{/if_is_bitmap}} + {{/if_chip_enum}} + {{/if_is_struct}} {{/if}} -{{/inline}} -{{target}} = -{{#if isOptional}} -{{zapTypeToEncodableClusterObjectType type ns=cluster}}( -{{/if}} -{{#if isNullable}} - {{source}} == nullptr ? {{zapTypeToEncodableClusterObjectType type ns=cluster forceNotOptional=true}}() : {{zapTypeToEncodableClusterObjectType type ns=cluster forceNotOptional=true}}({{source}}Value) - {{else}} -{{! TODO If the inline partial is indented, generation fails with "result.split is not a function". }} -{{>value}} -{{/if}} -{{#if isOptional}} -) -{{/if}}; diff --git a/src/controller/java/templates/partials/java_type_for_argument.zapt b/src/controller/java/templates/partials/java_type_for_argument.zapt deleted file mode 100644 index 7b8f65d10bacf8..00000000000000 --- a/src/controller/java/templates/partials/java_type_for_argument.zapt +++ /dev/null @@ -1 +0,0 @@ -{{#if_is_struct type}}{{else}}, {{#if isOptional}}Optional<{{else if isNullable}}@Nullable {{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}{{/if_is_struct}} \ No newline at end of file diff --git a/src/controller/java/templates/partials/list_attribute_callback_type.zapt b/src/controller/java/templates/partials/list_attribute_callback_type.zapt deleted file mode 100644 index 587f7b8d436bdd..00000000000000 --- a/src/controller/java/templates/partials/list_attribute_callback_type.zapt +++ /dev/null @@ -1,30 +0,0 @@ -{{#if isStruct}} -{{> @partial-block }}{{asUpperCamelCase name}}Attribute -{{else}} - {{#if isNullable}} - @Nullable - {{/if}} - {{#if isOptional}} - Optional< - {{/if}} - {{#if isArray}} - {{! TODO Implement a real type for arrays. }} - Object - {{else if isStruct}} - {{! TODO Implement a real type for structs. }} - Object - {{else if (isOctetString type)}} - byte[] - {{else if (isCharString type)}} - String - {{else}} - {{! NOTE: asJavaBasicTypeForZclType ends up sniffing for isArray on the - context. Since we want the type of our _entry_, force isArray to - false. }} - {{~#*inline "asJavaBasicTypeForEntry"}}{{asJavaBasicTypeForZclType type true}}{{/inline~}} - {{> asJavaBasicTypeForEntry isArray=false}} - {{/if}} - {{#if isOptional}} - > - {{/if}} -{{/if}} \ No newline at end of file diff --git a/src/controller/java/templates/templates.json b/src/controller/java/templates/templates.json index d7cc8dfb9cc88d..b5306b57279d24 100644 --- a/src/controller/java/templates/templates.json +++ b/src/controller/java/templates/templates.json @@ -31,21 +31,14 @@ { "name": "decode_value", "path": "partials/decode_value.zapt" - }, - { - "name": "list_attribute_callback_type", - "path": "partials/list_attribute_callback_type.zapt" - }, - { - "name": "command_callback_responses", - "path": "partials/command_callback_responses.zapt" - }, - { - "name": "java_type_for_argument", - "path": "partials/java_type_for_argument.zapt" } ], "templates": [ + { + "path": "ChipStructs-java.zapt", + "name": "CHIP structs for Java", + "output": "src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java" + }, { "path": "CHIPInvokeCallbacks.zapt", "name": "CHIP cluster invoke callbacks for Java (native code)", diff --git a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj index 9c5f2f2794e573..11c53c2a5fed71 100644 --- a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj @@ -52,7 +52,6 @@ 5129BCFD26A9EE3300122DDF /* CHIPError.h in Headers */ = {isa = PBXBuildFile; fileRef = 5129BCFC26A9EE3300122DDF /* CHIPError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 513DDB862761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 513DDB852761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h */; }; 513DDB8A2761F6F900DAA01A /* CHIPAttributeTLVValueDecoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 513DDB892761F6F900DAA01A /* CHIPAttributeTLVValueDecoder.mm */; }; - 5145F81027435A5500225B60 /* CHIPListUtils_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 5145F80F27435A5400225B60 /* CHIPListUtils_internal.h */; }; 51B22C1E2740CB0A008D5055 /* CHIPStructsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C1D2740CB0A008D5055 /* CHIPStructsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51B22C222740CB1D008D5055 /* CHIPCommandPayloadsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51B22C262740CB32008D5055 /* CHIPStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */; }; @@ -143,7 +142,6 @@ 5129BCFC26A9EE3300122DDF /* CHIPError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CHIPError.h; path = CHIP/CHIPError.h; sourceTree = ""; }; 513DDB852761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPAttributeTLVValueDecoder_Internal.h; sourceTree = ""; }; 513DDB892761F6F900DAA01A /* CHIPAttributeTLVValueDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPAttributeTLVValueDecoder.mm; path = "zap-generated/CHIPAttributeTLVValueDecoder.mm"; sourceTree = ""; }; - 5145F80F27435A5400225B60 /* CHIPListUtils_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPListUtils_internal.h; sourceTree = ""; }; 51B22C1D2740CB0A008D5055 /* CHIPStructsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPStructsObjc.h; path = "zap-generated/CHIPStructsObjc.h"; sourceTree = ""; }; 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPCommandPayloadsObjc.h; path = "zap-generated/CHIPCommandPayloadsObjc.h"; sourceTree = ""; }; 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPStructsObjc.mm; path = "zap-generated/CHIPStructsObjc.mm"; sourceTree = ""; }; @@ -272,7 +270,6 @@ isa = PBXGroup; children = ( 513DDB852761F69300DAA01A /* CHIPAttributeTLVValueDecoder_Internal.h */, - 5145F80F27435A5400225B60 /* CHIPListUtils_internal.h */, 1ED276E326C5832500547A89 /* CHIPCluster.h */, 1ED276E126C5812A00547A89 /* CHIPCluster.mm */, 2C5EEEF4268A85C400CAE3D3 /* CHIPDeviceConnectionBridge.h */, @@ -369,7 +366,6 @@ B2E0D7B5245B0B5C003C5B48 /* CHIPQRCodeSetupPayloadParser.h in Headers */, 1EC4CE6425CC276600D7304F /* CHIPClustersObjc.h in Headers */, 2C5EEEF6268A85C400CAE3D3 /* CHIPDeviceConnectionBridge.h in Headers */, - 5145F81027435A5500225B60 /* CHIPListUtils_internal.h in Headers */, 2C8C8FC0253E0C2100797F05 /* CHIPPersistentStorageDelegateBridge.h in Headers */, 998F286F26D55EC5001846C6 /* CHIPP256KeypairBridge.h in Headers */, 2C222ADF255C811800E446B9 /* CHIPDevice_Internal.h in Headers */, diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt index ae6d5ab11895b5..3948b226833909 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt @@ -10,8 +10,8 @@ #import "CHIPDevice_Internal.h" #import "CHIPStructsObjc.h" #import "CHIPCommandPayloadsObjc.h" -#import "CHIPListUtils_internal.h" +#include #include using chip::Callback::Callback; diff --git a/src/darwin/Framework/CHIP/templates/CHIPTestClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPTestClustersObjc-src.zapt index bb2937682d98ff..b0cc4361893a34 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPTestClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPTestClustersObjc-src.zapt @@ -6,11 +6,11 @@ #import "CHIPCluster_internal.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" -#import "CHIPListUtils_internal.h" #import "zap-generated/tests/CHIPClustersTest.h" #import "zap-generated/CHIPTestClustersObjc.h" +#include #include using chip::Callback::Callback; diff --git a/src/darwin/Framework/CHIP/CHIPListUtils_internal.h b/src/lib/support/CHIPListUtils.h similarity index 96% rename from src/darwin/Framework/CHIP/CHIPListUtils_internal.h rename to src/lib/support/CHIPListUtils.h index 82dad3d80120f3..95e063a49581b7 100644 --- a/src/darwin/Framework/CHIP/CHIPListUtils_internal.h +++ b/src/lib/support/CHIPListUtils.h @@ -18,9 +18,11 @@ #ifndef CHIP_LISTUTILS_INTERNAL_H #define CHIP_LISTUTILS_INTERNAL_H +#include #include #include +// TODO move to chip namespace template struct ListMemberTypeGetter { diff --git a/src/lib/support/JniReferences.cpp b/src/lib/support/JniReferences.cpp index f713d291ec0bbd..20f931ec522f23 100644 --- a/src/lib/support/JniReferences.cpp +++ b/src/lib/support/JniReferences.cpp @@ -42,6 +42,8 @@ void JniReferences::SetJavaVm(JavaVM * jvm, const char * clsType) mClassLoader = env->NewGlobalRef(env->CallObjectMethod(chipClass, getClassLoaderMethod)); mFindClassMethod = env->GetMethodID(classLoaderClass, "findClass", "(Ljava/lang/String;)Ljava/lang/Class;"); + + chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", mArrayListClass); } JNIEnv * JniReferences::GetEnvForCurrentThread() @@ -291,4 +293,70 @@ CHIP_ERROR JniReferences::CallSubscriptionEstablished(jobject javaCallback) return err; } +CHIP_ERROR JniReferences::CreateArrayList(jobject & outList) +{ + JNIEnv * env = GetEnvForCurrentThread(); + CHIP_ERROR err = CHIP_NO_ERROR; + + jmethodID arrayListCtor = env->GetMethodID(mArrayListClass, "", "()V"); + VerifyOrReturnError(arrayListCtor != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + outList = env->NewObject(mArrayListClass, arrayListCtor); + VerifyOrReturnError(outList != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); + + return err; +} + +CHIP_ERROR JniReferences::AddToArrayList(jobject list, jobject objectToAdd) +{ + JNIEnv * env = GetEnvForCurrentThread(); + CHIP_ERROR err = CHIP_NO_ERROR; + + jmethodID addMethod = env->GetMethodID(mArrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturnError(addMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + env->CallBooleanMethod(list, addMethod, objectToAdd); + VerifyOrReturnError(!env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + return err; +} + +CHIP_ERROR JniReferences::GetArrayListSize(jobject list, jint & size) +{ + JNIEnv * env = GetEnvForCurrentThread(); + CHIP_ERROR err = CHIP_NO_ERROR; + + jmethodID sizeMethod = env->GetMethodID(mArrayListClass, "size", "()I"); + VerifyOrReturnError(sizeMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + size = env->CallIntMethod(list, sizeMethod); + VerifyOrReturnError(!env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + return err; +} + +CHIP_ERROR JniReferences::GetArrayListItem(jobject list, jint index, jobject & outItem) +{ + JNIEnv * env = GetEnvForCurrentThread(); + CHIP_ERROR err = CHIP_NO_ERROR; + + jmethodID getMethod = env->GetMethodID(mArrayListClass, "get", "(I)Ljava/lang/Object;"); + VerifyOrReturnError(getMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND); + + outItem = env->CallObjectMethod(list, getMethod, index); + VerifyOrReturnError(!env->ExceptionCheck(), CHIP_JNI_ERROR_EXCEPTION_THROWN); + return err; +} + +CHIP_ERROR JniReferences::GetObjectField(jobject objectToRead, const char * name, const char * signature, jobject & outObject) +{ + JNIEnv * env = GetEnvForCurrentThread(); + CHIP_ERROR err = CHIP_NO_ERROR; + + VerifyOrReturnError(objectToRead != nullptr, CHIP_JNI_ERROR_NULL_OBJECT); + + jclass objClass = env->GetObjectClass(objectToRead); + jfieldID field = env->GetFieldID(objClass, name, signature); + + outObject = env->GetObjectField(objectToRead, field); + return err; +} + } // namespace chip diff --git a/src/lib/support/JniReferences.h b/src/lib/support/JniReferences.h index 2c4eb5613b9490..f3bc44ab016499 100644 --- a/src/lib/support/JniReferences.h +++ b/src/lib/support/JniReferences.h @@ -112,6 +112,16 @@ class JniReferences */ jdouble DoubleToPrimitive(jobject boxedObject); + CHIP_ERROR CreateArrayList(jobject & outList); + + CHIP_ERROR AddToArrayList(jobject list, jobject objectToAdd); + + CHIP_ERROR GetArrayListSize(jobject list, jint & size); + + CHIP_ERROR GetArrayListItem(jobject list, jint index, jobject & outItem); + + CHIP_ERROR GetObjectField(jobject objectToRead, const char * name, const char * signature, jobject & outObject); + /** * Call a void method with no arguments named "OnSubscriptionEstablished" on the provided jobject. */ @@ -152,5 +162,7 @@ class JniReferences JavaVM * mJvm = nullptr; jobject mClassLoader = nullptr; jmethodID mFindClassMethod = nullptr; + + jclass mArrayListClass = nullptr; }; } // namespace chip From cdfe2d68ad641a8c97c4117b4856d4a0e3a8db4e Mon Sep 17 00:00:00 2001 From: Austin Hsieh Date: Fri, 14 Jan 2022 14:32:36 -0800 Subject: [PATCH 2/8] Regenerate --- .../java/zap-generated/CHIPClusters-JNI.cpp | 8320 ++++++++++++++-- .../zap-generated/CHIPClustersWrite-JNI.cpp | 3106 +++++- .../zap-generated/CHIPInvokeCallbacks.cpp | 954 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 8395 +++++++---------- .../chip/devicecontroller/ChipClusters.java | 3281 +++---- .../chip/devicecontroller/ChipStructs.java | 2039 ++++ .../devicecontroller/ClusterInfoMapping.java | 1760 ++-- .../devicecontroller/ClusterWriteMapping.java | 244 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 2 +- .../zap-generated/CHIPTestClustersObjc.mm | 2 +- 10 files changed, 18653 insertions(+), 9450 deletions(-) create mode 100644 src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 1e710f0eeae700..2cc26192ca7f75 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -28,10 +28,12 @@ #include #include #include +#include #include #include #include #include +#include #include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ @@ -59,6 +61,120 @@ JNI_METHOD(jlong, AccessControlCluster, initWithDevice)(JNIEnv * env, jobject se return reinterpret_cast(cppCluster); } +JNI_METHOD(void, AccessControlCluster, subscribeAclAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAccessControlAclAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, AccessControlCluster, subscribeExtensionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAccessControlExtensionAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, AccessControlCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAccessControlAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, AccessControlCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -112,9 +228,14 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) CHIP_ERROR err = CHIP_NO_ERROR; AccountLoginCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::GetSetupPINRequest::Type request; - request.tempAccountIdentifier = chip::JniUtfString(env, static_cast(tempAccountIdentifier)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto tempAccountIdentifierJni = chip::Platform::New(env, static_cast(tempAccountIdentifier)); + cleanupStrings.push_back(tempAccountIdentifierJni); + request.tempAccountIdentifier = tempAccountIdentifierJni->charSpan(); std::unique_ptr @@ -144,6 +265,11 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -155,10 +281,17 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) CHIP_ERROR err = CHIP_NO_ERROR; AccountLoginCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::LoginRequest::Type request; - request.tempAccountIdentifier = chip::JniUtfString(env, static_cast(tempAccountIdentifier)).charSpan(); - request.setupPIN = chip::JniUtfString(env, static_cast(setupPIN)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto tempAccountIdentifierJni = chip::Platform::New(env, static_cast(tempAccountIdentifier)); + cleanupStrings.push_back(tempAccountIdentifierJni); + request.tempAccountIdentifier = tempAccountIdentifierJni->charSpan(); + auto setupPINJni = chip::Platform::New(env, static_cast(setupPIN)); + cleanupStrings.push_back(setupPINJni); + request.setupPIN = setupPINJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -192,6 +325,11 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -202,8 +340,12 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest) CHIP_ERROR err = CHIP_NO_ERROR; AccountLoginCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::LogoutRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -229,6 +371,49 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, AccountLoginCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccountLoginCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAccountLoginAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -285,9 +470,12 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow CHIP_ERROR err = CHIP_NO_ERROR; AdministratorCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - request.commissioningTimeout = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.commissioningTimeout = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(commissioningTimeout)); std::unique_ptr onSuccess( @@ -322,6 +510,11 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -333,17 +526,25 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) CHIP_ERROR err = CHIP_NO_ERROR; AdministratorCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - request.commissioningTimeout = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.commissioningTimeout = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(commissioningTimeout)); - request.PAKEVerifier = chip::JniByteArray(env, static_cast(PAKEVerifier)).byteSpan(); - request.discriminator = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(discriminator)); - request.iterations = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(iterations)); - request.salt = chip::JniByteArray(env, static_cast(salt)).byteSpan(); - request.passcodeID = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(passcodeID)); + auto PAKEVerifierJni = chip::Platform::New(env, static_cast(PAKEVerifier)); + cleanupByteArrays.push_back(PAKEVerifierJni); + request.PAKEVerifier = PAKEVerifierJni->byteSpan(); + request.discriminator = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(discriminator)); + request.iterations = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(iterations)); + auto saltJni = chip::Platform::New(env, static_cast(salt)); + cleanupByteArrays.push_back(saltJni); + request.salt = saltJni->byteSpan(); + request.passcodeID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(passcodeID)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -377,6 +578,11 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -387,8 +593,12 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) CHIP_ERROR err = CHIP_NO_ERROR; AdministratorCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -421,6 +631,11 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -541,6 +756,47 @@ JNI_METHOD(void, AdministratorCommissioningCluster, subscribeAdminVendorIdAttrib onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, AdministratorCommissioningCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AdministratorCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPAdministratorCommissioningAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, AdministratorCommissioningCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -810,6 +1066,84 @@ JNI_METHOD(void, ApplicationBasicCluster, subscribeApplicationVersionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ApplicationBasicCluster, subscribeAllowedVendorListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationBasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPApplicationBasicAllowedVendorListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ApplicationBasicCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationBasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPApplicationBasicAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ApplicationBasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -857,16 +1191,29 @@ JNI_METHOD(jlong, ApplicationLauncherCluster, initWithDevice)(JNIEnv * env, jobj } JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, - jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject application, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ApplicationLauncherCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::HideAppRequest::Type request; - request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApplication::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject application_catalogVendorIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", + application_catalogVendorIdItem_0); + request.application.catalogVendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(application_catalogVendorIdItem_0)); + jobject application_applicationIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", + application_applicationIdItem_0); + auto application_applicationIdItem_0Jni = + chip::Platform::New(env, static_cast(application_applicationIdItem_0)); + cleanupStrings.push_back(application_applicationIdItem_0Jni); + request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); std::unique_ptr @@ -903,21 +1250,41 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject catalogVendorId, jstring applicationId, - jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring data, jobject application, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ApplicationLauncherCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppRequest::Type request; - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); - request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApplication::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto dataJni = chip::Platform::New(env, static_cast(data)); + cleanupStrings.push_back(dataJni); + request.data = dataJni->charSpan(); + jobject application_catalogVendorIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", + application_catalogVendorIdItem_0); + request.application.catalogVendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(application_catalogVendorIdItem_0)); + jobject application_applicationIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", + application_applicationIdItem_0); + auto application_applicationIdItem_0Jni = + chip::Platform::New(env, static_cast(application_applicationIdItem_0)); + cleanupStrings.push_back(application_applicationIdItem_0Jni); + request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); std::unique_ptr @@ -954,20 +1321,38 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject catalogVendorId, jstring applicationId, - jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject application, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ApplicationLauncherCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::StopAppRequest::Type request; - request.application = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationLauncherApplication::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject application_catalogVendorIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", + application_catalogVendorIdItem_0); + request.application.catalogVendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(application_catalogVendorIdItem_0)); + jobject application_applicationIdItem_0; + chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", + application_applicationIdItem_0); + auto application_applicationIdItem_0Jni = + chip::Platform::New(env, static_cast(application_applicationIdItem_0)); + cleanupStrings.push_back(application_applicationIdItem_0Jni); + request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); std::unique_ptr @@ -1004,15 +1389,22 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ApplicationLauncherCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, ApplicationLauncherCluster, subscribeApplicationLauncherListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -1029,14 +1421,16 @@ JNI_METHOD(void, ApplicationLauncherCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::ApplicationLauncherList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPApplicationLauncherApplicationLauncherListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -1044,14 +1438,90 @@ JNI_METHOD(void, ApplicationLauncherCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, AudioOutputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, ApplicationLauncherCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - AudioOutputCluster * cppCluster = new AudioOutputCluster(); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPApplicationLauncherAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ApplicationLauncherCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ApplicationLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, AudioOutputCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + AudioOutputCluster * cppCluster = new AudioOutputCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject index, jstring name, jobject timedInvokeTimeoutMs) @@ -1060,10 +1530,16 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) CHIP_ERROR err = CHIP_NO_ERROR; AudioOutputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::RenameOutputRequest::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); - request.name = chip::JniUtfString(env, static_cast(name)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.index = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + auto nameJni = chip::Platform::New(env, static_cast(name)); + cleanupStrings.push_back(nameJni); + request.name = nameJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1097,6 +1573,11 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1107,9 +1588,13 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) CHIP_ERROR err = CHIP_NO_ERROR; AudioOutputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::SelectOutputRequest::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.index = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1143,6 +1628,49 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, AudioOutputCluster, subscribeAudioOutputListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AudioOutputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AudioOutput::Attributes::AudioOutputList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAudioOutputAudioOutputListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -1183,6 +1711,44 @@ JNI_METHOD(void, AudioOutputCluster, subscribeCurrentAudioOutputAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, AudioOutputCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AudioOutputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPAudioOutputAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, AudioOutputCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -1236,10 +1802,13 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) CHIP_ERROR err = CHIP_NO_ERROR; BarrierControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type request; - request.percentOpen = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(percentOpen)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.percentOpen = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(percentOpen)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1273,6 +1842,11 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1283,8 +1857,12 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop) CHIP_ERROR err = CHIP_NO_ERROR; BarrierControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -1317,6 +1895,11 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1468,6 +2051,44 @@ JNI_METHOD(void, BarrierControlCluster, subscribeBarrierPositionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BarrierControlCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BarrierControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBarrierControlAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BarrierControlCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -1521,8 +2142,12 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing) CHIP_ERROR err = CHIP_NO_ERROR; BasicCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Basic::Commands::MfgSpecificPing::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -1555,6 +2180,11 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2253,6 +2883,44 @@ JNI_METHOD(void, BasicCluster, subscribeUniqueIDAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BasicCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Basic::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBasicAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2410,6 +3078,45 @@ JNI_METHOD(void, BinaryInputBasicCluster, subscribeStatusFlagsAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BinaryInputBasicCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BinaryInputBasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBinaryInputBasicAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BinaryInputBasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2464,13 +3171,19 @@ JNI_METHOD(void, BindingCluster, bind) CHIP_ERROR err = CHIP_NO_ERROR; BindingCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Binding::Commands::Bind::Type request; - request.nodeId = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.endpointId = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); - request.clusterId = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.nodeId = + static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.endpointId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); + request.clusterId = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2504,6 +3217,11 @@ JNI_METHOD(void, BindingCluster, bind) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2515,13 +3233,19 @@ JNI_METHOD(void, BindingCluster, unbind) CHIP_ERROR err = CHIP_NO_ERROR; BindingCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Binding::Commands::Unbind::Type request; - request.nodeId = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.endpointId = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); - request.clusterId = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.nodeId = + static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.endpointId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(endpointId)); + request.clusterId = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(clusterId)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2555,15 +3279,21 @@ JNI_METHOD(void, BindingCluster, unbind) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, BindingCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, BindingCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -2580,14 +3310,14 @@ JNI_METHOD(void, BindingCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::Binding::Attributes::AttributeList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + CHIPBindingAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -2595,21 +3325,12 @@ JNI_METHOD(void, BindingCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, BooleanStateCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - BooleanStateCluster * cppCluster = new BooleanStateCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, BooleanStateCluster, subscribeStateValueAttribute) +JNI_METHOD(void, BindingCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -2620,8 +3341,54 @@ JNI_METHOD(void, BooleanStateCluster, subscribeStateValueAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - BooleanStateCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + BindingCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Binding::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, BooleanStateCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + BooleanStateCluster * cppCluster = new BooleanStateCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, BooleanStateCluster, subscribeStateValueAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BooleanStateCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -2641,6 +3408,44 @@ JNI_METHOD(void, BooleanStateCluster, subscribeStateValueAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BooleanStateCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BooleanStateCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBooleanStateAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BooleanStateCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -2694,12 +3499,21 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::DisableAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2733,6 +3547,11 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2744,13 +3563,23 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); - request.duration = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(duration)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } + request.duration = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(duration)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2784,6 +3613,11 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2794,12 +3628,21 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::EnableAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2833,6 +3676,11 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2844,13 +3692,23 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); - request.duration = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(duration)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } + request.duration = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(duration)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2884,6 +3742,11 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2894,12 +3757,21 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::InstantAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2933,6 +3805,11 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2944,14 +3821,23 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2985,6 +3871,11 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2995,12 +3886,21 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::PauseAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3034,6 +3934,11 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3045,13 +3950,23 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); - request.duration = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(duration)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } + request.duration = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(duration)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3085,6 +4000,11 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3095,12 +4015,21 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3134,6 +4063,11 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3144,12 +4078,21 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StartAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3183,6 +4126,11 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3194,13 +4142,23 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); - request.duration = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(duration)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } + request.duration = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(duration)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3234,6 +4192,11 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3244,12 +4207,21 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) CHIP_ERROR err = CHIP_NO_ERROR; BridgedActionsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StopAction::Type request; - request.actionID = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); - chip::JniReferences::GetInstance().GetOptionalValue(invokeID, invokeID); - request.invokeID = chip::Optional( - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(invokeID))); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.actionID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); + if (invokeID != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(invokeID, optionalValue_0); + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3283,6 +4255,87 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, BridgedActionsCluster, subscribeActionListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BridgedActions::Attributes::ActionList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBridgedActionsActionListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, BridgedActionsCluster, subscribeEndpointListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BridgedActions::Attributes::EndpointList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBridgedActionsEndpointListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -3323,6 +4376,44 @@ JNI_METHOD(void, BridgedActionsCluster, subscribeSetupUrlAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, BridgedActionsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedActionsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBridgedActionsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BridgedActionsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -3369,6 +4460,45 @@ JNI_METHOD(jlong, BridgedDeviceBasicCluster, initWithDevice)(JNIEnv * env, jobje return reinterpret_cast(cppCluster); } +JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BridgedDeviceBasicCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPBridgedDeviceBasicAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, BridgedDeviceBasicCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -3423,12 +4553,15 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) CHIP_ERROR err = CHIP_NO_ERROR; ChannelCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Channel::Commands::ChangeChannelByNumberRequest::Type request; - request.majorNumber = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(majorNumber)); - request.minorNumber = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(minorNumber)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.majorNumber = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(majorNumber)); + request.minorNumber = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(minorNumber)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3462,6 +4595,11 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3472,9 +4610,14 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) CHIP_ERROR err = CHIP_NO_ERROR; ChannelCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Channel::Commands::ChangeChannelRequest::Type request; - request.match = chip::JniUtfString(env, static_cast(match)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto matchJni = chip::Platform::New(env, static_cast(match)); + cleanupStrings.push_back(matchJni); + request.match = matchJni->charSpan(); std::unique_ptr onSuccess(Platform::New(callback), @@ -3510,6 +4653,11 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3520,9 +4668,13 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest) CHIP_ERROR err = CHIP_NO_ERROR; ChannelCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type request; - request.count = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(count)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.count = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(count)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3556,15 +4708,21 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ChannelCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, ChannelCluster, subscribeChannelListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -3581,14 +4739,14 @@ JNI_METHOD(void, ChannelCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::Channel::Attributes::ChannelList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + CHIPChannelChannelListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -3596,13 +4754,88 @@ JNI_METHOD(void, ChannelCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, ChannelCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - ColorControlCluster * cppCluster = new ColorControlCluster(); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Channel::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPChannelAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ChannelCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ChannelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, ColorControlCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + ColorControlCluster * cppCluster = new ColorControlCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); } JNI_METHOD(void, ColorControlCluster, colorLoopSet) @@ -3613,18 +4846,25 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type request; - request.updateFlags = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(updateFlags)); - request.action = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(action)); - request.direction = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); - request.time = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(time)); - request.startHue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(startHue)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.updateFlags = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(updateFlags)); + request.action = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(action)); + request.direction = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); + request.time = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(time)); + request.startHue = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(startHue)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3658,6 +4898,11 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3669,14 +4914,19 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3710,6 +4960,11 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3721,17 +4976,21 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type request; - request.enhancedHue = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); - request.direction = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.enhancedHue = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); + request.direction = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3765,6 +5024,11 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3776,18 +5040,21 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - request.enhancedHue = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); - request.saturation = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.enhancedHue = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); + request.saturation = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3821,6 +5088,11 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3832,16 +5104,21 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3875,6 +5152,11 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3886,14 +5168,19 @@ JNI_METHOD(void, ColorControlCluster, moveColor) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type request; - request.rateX = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rateX)); - request.rateY = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rateY)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.rateX = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rateX)); + request.rateY = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rateY)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3927,6 +5214,11 @@ JNI_METHOD(void, ColorControlCluster, moveColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3938,18 +5230,23 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.colorTemperatureMinimum = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.colorTemperatureMinimum = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperatureMinimum)); - request.colorTemperatureMaximum = static_cast( + request.colorTemperatureMaximum = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperatureMaximum)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3983,6 +5280,11 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3994,14 +5296,19 @@ JNI_METHOD(void, ColorControlCluster, moveHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4035,6 +5342,11 @@ JNI_METHOD(void, ColorControlCluster, moveHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4046,14 +5358,19 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4087,6 +5404,11 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4098,16 +5420,21 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type request; - request.colorX = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(colorX)); - request.colorY = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(colorY)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.colorX = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(colorX)); + request.colorY = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(colorY)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4141,6 +5468,11 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4152,16 +5484,19 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type request; - request.colorTemperature = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperature)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.colorTemperature = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperature)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4195,6 +5530,11 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4206,16 +5546,21 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type request; - request.hue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); - request.direction = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.hue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); + request.direction = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(direction)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4249,6 +5594,11 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4260,17 +5610,21 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type request; - request.hue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); - request.saturation = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.hue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); + request.saturation = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4304,6 +5658,11 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4315,16 +5674,19 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type request; - request.saturation = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.saturation = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4358,6 +5720,11 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4369,16 +5736,21 @@ JNI_METHOD(void, ColorControlCluster, stepColor) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColor::Type request; - request.stepX = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepX)); - request.stepY = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepY)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepX = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(stepX)); + request.stepY = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(stepY)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4412,6 +5784,11 @@ JNI_METHOD(void, ColorControlCluster, stepColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4424,20 +5801,25 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.colorTemperatureMinimum = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.colorTemperatureMinimum = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperatureMinimum)); - request.colorTemperatureMaximum = static_cast( + request.colorTemperatureMaximum = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperatureMaximum)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4471,6 +5853,11 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4482,16 +5869,21 @@ JNI_METHOD(void, ColorControlCluster, stepHue) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4525,6 +5917,11 @@ JNI_METHOD(void, ColorControlCluster, stepHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4536,16 +5933,21 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4579,6 +5981,11 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4590,12 +5997,15 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) CHIP_ERROR err = CHIP_NO_ERROR; ColorControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type request; - request.optionsMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); - request.optionsOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.optionsMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); + request.optionsOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionsOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4629,6 +6039,11 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6560,6 +7975,44 @@ JNI_METHOD(void, ColorControlCluster, subscribeStartUpColorTemperatureMiredsAttr onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ColorControlCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ColorControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPColorControlAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ColorControlCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -6607,18 +8060,126 @@ JNI_METHOD(jlong, ContentLauncherCluster, initWithDevice)(JNIEnv * env, jobject } JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject parameterList, +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject autoPlay, jstring data, jobject search, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ContentLauncherCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type request; - request.autoPlay = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); - request.search = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.autoPlay = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); + auto dataJni = chip::Platform::New(env, static_cast(data)); + cleanupStrings.push_back(dataJni); + request.data = dataJni->charSpan(); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint searchSize; + chip::JniReferences::GetInstance().GetArrayListSize(search, searchSize); + if (searchSize != 0) + { + auto * listHolder_0 = new ListHolder(searchSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(searchSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(search, i_0, element_0); + jobject element_0_parameterListItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "parameterList", "Ljava/util/ArrayList;", + element_0_parameterListItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].parameterList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_parameterListItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_parameterListItem_1, + element_0_parameterListItem_1Size); + if (element_0_parameterListItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_parameterListItem_1Size); + listFreer.add(listHolder_2); + + for (size_t i_2 = 0; i_2 < static_cast(element_0_parameterListItem_1Size); ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_parameterListItem_1, i_2, element_2); + jobject element_2_typeItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "type", "Ljava/lang/Integer;", + element_2_typeItem_3); + listHolder_2->mList[i_2].type = + static_castmList[i_2].type)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_typeItem_3)); + jobject element_2_valueItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "value", "Ljava/lang/String;", + element_2_valueItem_3); + auto element_2_valueItem_3Jni = + chip::Platform::New(env, static_cast(element_2_valueItem_3)); + cleanupStrings.push_back(element_2_valueItem_3Jni); + listHolder_2->mList[i_2].value = element_2_valueItem_3Jni->charSpan(); + jobject element_2_externalIDListItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "externalIDList", "Ljava/util/ArrayList;", + element_2_externalIDListItem_3); + { + using ListType_4 = std::remove_reference_tmList[i_2].externalIDList)>; + using ListMemberType_4 = ListMemberTypeGetter::Type; + jint element_2_externalIDListItem_3Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_2_externalIDListItem_3, + element_2_externalIDListItem_3Size); + if (element_2_externalIDListItem_3Size != 0) + { + auto * listHolder_4 = new ListHolder(element_2_externalIDListItem_3Size); + listFreer.add(listHolder_4); + + for (size_t i_4 = 0; i_4 < static_cast(element_2_externalIDListItem_3Size); ++i_4) + { + jobject element_4; + chip::JniReferences::GetInstance().GetArrayListItem(element_2_externalIDListItem_3, i_4, + element_4); + jobject element_4_nameItem_5; + chip::JniReferences::GetInstance().GetObjectField(element_4, "name", "Ljava/lang/String;", + element_4_nameItem_5); + auto element_4_nameItem_5Jni = chip::Platform::New( + env, static_cast(element_4_nameItem_5)); + cleanupStrings.push_back(element_4_nameItem_5Jni); + listHolder_4->mList[i_4].name = element_4_nameItem_5Jni->charSpan(); + jobject element_4_valueItem_5; + chip::JniReferences::GetInstance().GetObjectField(element_4, "value", "Ljava/lang/String;", + element_4_valueItem_5); + auto element_4_valueItem_5Jni = chip::Platform::New( + env, static_cast(element_4_valueItem_5)); + cleanupStrings.push_back(element_4_valueItem_5Jni); + listHolder_4->mList[i_4].value = element_4_valueItem_5Jni->charSpan(); + } + listHolder_2->mList[i_2].externalIDList = + ListType_4(listHolder_4->mList, element_2_externalIDListItem_3Size); + } + else + { + listHolder_2->mList[i_2].externalIDList = ListType_4(); + } + } + } + listHolder_0->mList[i_0].parameterList = ListType_2(listHolder_2->mList, element_0_parameterListItem_1Size); + } + else + { + listHolder_0->mList[i_0].parameterList = ListType_2(); + } + } + } + request.search = ListType_0(listHolder_0->mList, searchSize); + } + else + { + request.search = ListType_0(); + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -6654,22 +8215,248 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, jstring providerName, - jobject background, jobject logo, jobject progressBar, jobject splash, jobject waterMark, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring contentURL, jstring displayString, + jobject brandingInformation, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ContentLauncherCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type request; - request.contentURL = chip::JniUtfString(env, static_cast(contentURL)).charSpan(); - request.displayString = chip::JniUtfString(env, static_cast(displayString)).charSpan(); - request.brandingInformation = chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto contentURLJni = chip::Platform::New(env, static_cast(contentURL)); + cleanupStrings.push_back(contentURLJni); + request.contentURL = contentURLJni->charSpan(); + auto displayStringJni = chip::Platform::New(env, static_cast(displayString)); + cleanupStrings.push_back(displayStringJni); + request.displayString = displayStringJni->charSpan(); + jobject brandingInformation_providerNameItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "providerName", "Ljava/lang/String;", + brandingInformation_providerNameItem_0); + auto brandingInformation_providerNameItem_0Jni = + chip::Platform::New(env, static_cast(brandingInformation_providerNameItem_0)); + cleanupStrings.push_back(brandingInformation_providerNameItem_0Jni); + request.brandingInformation.providerName = brandingInformation_providerNameItem_0Jni->charSpan(); + jobject brandingInformation_backgroundItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "background", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", + brandingInformation_backgroundItem_0); + jobject brandingInformation_backgroundItem_0_imageUrlItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "imageUrl", "Ljava/lang/String;", + brandingInformation_backgroundItem_0_imageUrlItem_1); + auto brandingInformation_backgroundItem_0_imageUrlItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_backgroundItem_0_imageUrlItem_1)); + cleanupStrings.push_back(brandingInformation_backgroundItem_0_imageUrlItem_1Jni); + request.brandingInformation.background.imageUrl = brandingInformation_backgroundItem_0_imageUrlItem_1Jni->charSpan(); + jobject brandingInformation_backgroundItem_0_colorItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "color", "Ljava/lang/String;", + brandingInformation_backgroundItem_0_colorItem_1); + auto brandingInformation_backgroundItem_0_colorItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_backgroundItem_0_colorItem_1)); + cleanupStrings.push_back(brandingInformation_backgroundItem_0_colorItem_1Jni); + request.brandingInformation.background.color = brandingInformation_backgroundItem_0_colorItem_1Jni->charSpan(); + jobject brandingInformation_backgroundItem_0_sizeItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "size", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", + brandingInformation_backgroundItem_0_sizeItem_1); + jobject brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "width", + "Ljava/lang/Double;", + brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2); + request.brandingInformation.background.size.width = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_widthItem_2)); + jobject brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "height", + "Ljava/lang/Double;", + brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2); + request.brandingInformation.background.size.height = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_heightItem_2)); + jobject brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0_sizeItem_1, "metric", + "Ljava/lang/Integer;", + brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2); + request.brandingInformation.background.size.metric = + static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_backgroundItem_0_sizeItem_1_metricItem_2)); + jobject brandingInformation_logoItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "logo", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", + brandingInformation_logoItem_0); + jobject brandingInformation_logoItem_0_imageUrlItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "imageUrl", "Ljava/lang/String;", + brandingInformation_logoItem_0_imageUrlItem_1); + auto brandingInformation_logoItem_0_imageUrlItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_logoItem_0_imageUrlItem_1)); + cleanupStrings.push_back(brandingInformation_logoItem_0_imageUrlItem_1Jni); + request.brandingInformation.logo.imageUrl = brandingInformation_logoItem_0_imageUrlItem_1Jni->charSpan(); + jobject brandingInformation_logoItem_0_colorItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "color", "Ljava/lang/String;", + brandingInformation_logoItem_0_colorItem_1); + auto brandingInformation_logoItem_0_colorItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_logoItem_0_colorItem_1)); + cleanupStrings.push_back(brandingInformation_logoItem_0_colorItem_1Jni); + request.brandingInformation.logo.color = brandingInformation_logoItem_0_colorItem_1Jni->charSpan(); + jobject brandingInformation_logoItem_0_sizeItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "size", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", + brandingInformation_logoItem_0_sizeItem_1); + jobject brandingInformation_logoItem_0_sizeItem_1_widthItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "width", "Ljava/lang/Double;", + brandingInformation_logoItem_0_sizeItem_1_widthItem_2); + request.brandingInformation.logo.size.width = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_logoItem_0_sizeItem_1_widthItem_2)); + jobject brandingInformation_logoItem_0_sizeItem_1_heightItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "height", "Ljava/lang/Double;", + brandingInformation_logoItem_0_sizeItem_1_heightItem_2); + request.brandingInformation.logo.size.height = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_logoItem_0_sizeItem_1_heightItem_2)); + jobject brandingInformation_logoItem_0_sizeItem_1_metricItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0_sizeItem_1, "metric", "Ljava/lang/Integer;", + brandingInformation_logoItem_0_sizeItem_1_metricItem_2); + request.brandingInformation.logo.size.metric = + static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_logoItem_0_sizeItem_1_metricItem_2)); + jobject brandingInformation_progressBarItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "progressBar", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", + brandingInformation_progressBarItem_0); + jobject brandingInformation_progressBarItem_0_imageUrlItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "imageUrl", "Ljava/lang/String;", + brandingInformation_progressBarItem_0_imageUrlItem_1); + auto brandingInformation_progressBarItem_0_imageUrlItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_progressBarItem_0_imageUrlItem_1)); + cleanupStrings.push_back(brandingInformation_progressBarItem_0_imageUrlItem_1Jni); + request.brandingInformation.progressBar.imageUrl = brandingInformation_progressBarItem_0_imageUrlItem_1Jni->charSpan(); + jobject brandingInformation_progressBarItem_0_colorItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "color", "Ljava/lang/String;", + brandingInformation_progressBarItem_0_colorItem_1); + auto brandingInformation_progressBarItem_0_colorItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_progressBarItem_0_colorItem_1)); + cleanupStrings.push_back(brandingInformation_progressBarItem_0_colorItem_1Jni); + request.brandingInformation.progressBar.color = brandingInformation_progressBarItem_0_colorItem_1Jni->charSpan(); + jobject brandingInformation_progressBarItem_0_sizeItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "size", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", + brandingInformation_progressBarItem_0_sizeItem_1); + jobject brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "width", + "Ljava/lang/Double;", + brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2); + request.brandingInformation.progressBar.size.width = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_widthItem_2)); + jobject brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "height", + "Ljava/lang/Double;", + brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2); + request.brandingInformation.progressBar.size.height = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_heightItem_2)); + jobject brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0_sizeItem_1, "metric", + "Ljava/lang/Integer;", + brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2); + request.brandingInformation.progressBar.size.metric = + static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_progressBarItem_0_sizeItem_1_metricItem_2)); + jobject brandingInformation_splashItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "splash", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", + brandingInformation_splashItem_0); + jobject brandingInformation_splashItem_0_imageUrlItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "imageUrl", "Ljava/lang/String;", + brandingInformation_splashItem_0_imageUrlItem_1); + auto brandingInformation_splashItem_0_imageUrlItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_splashItem_0_imageUrlItem_1)); + cleanupStrings.push_back(brandingInformation_splashItem_0_imageUrlItem_1Jni); + request.brandingInformation.splash.imageUrl = brandingInformation_splashItem_0_imageUrlItem_1Jni->charSpan(); + jobject brandingInformation_splashItem_0_colorItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "color", "Ljava/lang/String;", + brandingInformation_splashItem_0_colorItem_1); + auto brandingInformation_splashItem_0_colorItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_splashItem_0_colorItem_1)); + cleanupStrings.push_back(brandingInformation_splashItem_0_colorItem_1Jni); + request.brandingInformation.splash.color = brandingInformation_splashItem_0_colorItem_1Jni->charSpan(); + jobject brandingInformation_splashItem_0_sizeItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "size", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", + brandingInformation_splashItem_0_sizeItem_1); + jobject brandingInformation_splashItem_0_sizeItem_1_widthItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "width", "Ljava/lang/Double;", + brandingInformation_splashItem_0_sizeItem_1_widthItem_2); + request.brandingInformation.splash.size.width = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_splashItem_0_sizeItem_1_widthItem_2)); + jobject brandingInformation_splashItem_0_sizeItem_1_heightItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "height", "Ljava/lang/Double;", + brandingInformation_splashItem_0_sizeItem_1_heightItem_2); + request.brandingInformation.splash.size.height = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_splashItem_0_sizeItem_1_heightItem_2)); + jobject brandingInformation_splashItem_0_sizeItem_1_metricItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0_sizeItem_1, "metric", "Ljava/lang/Integer;", + brandingInformation_splashItem_0_sizeItem_1_metricItem_2); + request.brandingInformation.splash.size.metric = + static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_splashItem_0_sizeItem_1_metricItem_2)); + jobject brandingInformation_waterMarkItem_0; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "waterMark", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", + brandingInformation_waterMarkItem_0); + jobject brandingInformation_waterMarkItem_0_imageUrlItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "imageUrl", "Ljava/lang/String;", + brandingInformation_waterMarkItem_0_imageUrlItem_1); + auto brandingInformation_waterMarkItem_0_imageUrlItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_waterMarkItem_0_imageUrlItem_1)); + cleanupStrings.push_back(brandingInformation_waterMarkItem_0_imageUrlItem_1Jni); + request.brandingInformation.waterMark.imageUrl = brandingInformation_waterMarkItem_0_imageUrlItem_1Jni->charSpan(); + jobject brandingInformation_waterMarkItem_0_colorItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "color", "Ljava/lang/String;", + brandingInformation_waterMarkItem_0_colorItem_1); + auto brandingInformation_waterMarkItem_0_colorItem_1Jni = + chip::Platform::New(env, static_cast(brandingInformation_waterMarkItem_0_colorItem_1)); + cleanupStrings.push_back(brandingInformation_waterMarkItem_0_colorItem_1Jni); + request.brandingInformation.waterMark.color = brandingInformation_waterMarkItem_0_colorItem_1Jni->charSpan(); + jobject brandingInformation_waterMarkItem_0_sizeItem_1; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "size", + "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", + brandingInformation_waterMarkItem_0_sizeItem_1); + jobject brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "width", "Ljava/lang/Double;", + brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2); + request.brandingInformation.waterMark.size.width = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_widthItem_2)); + jobject brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "height", + "Ljava/lang/Double;", + brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2); + request.brandingInformation.waterMark.size.height = + static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_heightItem_2)); + jobject brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2; + chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0_sizeItem_1, "metric", + "Ljava/lang/Integer;", + brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2); + request.brandingInformation.waterMark.size.metric = + static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(brandingInformation_waterMarkItem_0_sizeItem_1_metricItem_2)); std::unique_ptr onSuccess(Platform::New(callback), @@ -6705,6 +8492,50 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ContentLauncherCluster, subscribeAcceptHeaderListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeaderList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPContentLauncherAcceptHeaderListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -6746,6 +8577,45 @@ JNI_METHOD(void, ContentLauncherCluster, subscribeSupportedStreamingProtocolsAtt onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ContentLauncherCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ContentLauncherCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPContentLauncherAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ContentLauncherCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -6792,12 +8662,13 @@ JNI_METHOD(jlong, DescriptorCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } -JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, DescriptorCluster, subscribeDeviceListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -6814,14 +8685,14 @@ JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::DeviceList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + CHIPDescriptorDeviceListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -6829,88 +8700,337 @@ JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - DiagnosticLogsCluster * cppCluster = new DiagnosticLogsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, - jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) +JNI_METHOD(void, DescriptorCluster, subscribeServerListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - CHIP_ERROR err = CHIP_NO_ERROR; - DiagnosticLogsCluster * cppCluster; - - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - - request.intent = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(intent)); - request.requestedProtocol = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(requestedProtocol)); - request.transferFileDesignator = chip::JniByteArray(env, static_cast(transferFileDesignator)).byteSpan(); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr - onSuccess(Platform::New(callback), - Platform::Delete); std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + Platform::New(callback), chip::Platform::Delete); VerifyOrReturn(onFailure.get() != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ServerList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedInvokeTimeoutMs == nullptr) - { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); - } + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDescriptorServerListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, DescriptorCluster, subscribeClientListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - DoorLockCluster * cppCluster = new DoorLockCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClientList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDescriptorClientListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, DescriptorCluster, subscribePartsListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::PartsList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDescriptorPartsListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, DescriptorCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDescriptorAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, DescriptorCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DescriptorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, DiagnosticLogsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + DiagnosticLogsCluster * cppCluster = new DiagnosticLogsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject intent, jobject requestedProtocol, + jbyteArray transferFileDesignator, jobject timedInvokeTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + DiagnosticLogsCluster * cppCluster; + + ListFreer listFreer; + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; + + std::list cleanupByteArrays; + std::list cleanupStrings; + request.intent = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(intent)); + request.requestedProtocol = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(requestedProtocol)); + auto transferFileDesignatorJni = chip::Platform::New(env, static_cast(transferFileDesignator)); + cleanupByteArrays.push_back(transferFileDesignatorJni); + request.transferFileDesignator = transferFileDesignatorJni->byteSpan(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedInvokeTimeoutMs == nullptr) + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, DiagnosticLogsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DiagnosticLogsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDiagnosticLogsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, DoorLockCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + DoorLockCluster * cppCluster = new DoorLockCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} JNI_METHOD(void, DoorLockCluster, clearCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, - jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credential, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type request; - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject credential_credentialTypeItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialType", "Ljava/lang/Integer;", + credential_credentialTypeItem_0); + request.credential.credentialType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialTypeItem_0)); + jobject credential_credentialIndexItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialIndex", "Ljava/lang/Integer;", + credential_credentialIndexItem_0); + request.credential.credentialIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialIndexItem_0)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6944,6 +9064,11 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6954,9 +9079,13 @@ JNI_METHOD(void, DoorLockCluster, clearUser) CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type request; - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.userIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6990,20 +9119,36 @@ JNI_METHOD(void, DoorLockCluster, clearUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, DoorLockCluster, getCredentialStatus) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credentialType, jobject credentialIndex, - jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject credential, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type request; - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject credential_credentialTypeItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialType", "Ljava/lang/Integer;", + credential_credentialTypeItem_0); + request.credential.credentialType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialTypeItem_0)); + jobject credential_credentialIndexItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialIndex", "Ljava/lang/Integer;", + credential_credentialIndexItem_0); + request.credential.credentialIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialIndexItem_0)); std::unique_ptr @@ -7040,6 +9185,11 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -7050,9 +9200,13 @@ JNI_METHOD(void, DoorLockCluster, getUser) CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetUser::Type request; - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.userIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); std::unique_ptr onSuccess( Platform::New(callback), @@ -7087,6 +9241,11 @@ JNI_METHOD(void, DoorLockCluster, getUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -7097,10 +9256,20 @@ JNI_METHOD(void, DoorLockCluster, lockDoor) CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type request; - chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); - request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).byteSpan()); + std::list cleanupByteArrays; + std::list cleanupStrings; + if (pinCode != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(pinCode, optionalValue_0); + auto & definedValue_0 = request.pinCode.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -7134,26 +9303,46 @@ JNI_METHOD(void, DoorLockCluster, lockDoor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, DoorLockCluster, setCredential) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credentialType, - jobject credentialIndex, jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject operationType, jobject credential, + jbyteArray credentialData, jobject userIndex, jobject userStatus, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetCredential::Type request; - request.operationType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); - request.credential = chip::app::Clusters::DoorLock::Structs::DlCredential::Type(); - request.credentialData = chip::JniByteArray(env, static_cast(credentialData)).byteSpan(); - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); - request.userStatus = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.operationType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); + jobject credential_credentialTypeItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialType", "Ljava/lang/Integer;", + credential_credentialTypeItem_0); + request.credential.credentialType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialTypeItem_0)); + jobject credential_credentialIndexItem_0; + chip::JniReferences::GetInstance().GetObjectField(credential, "credentialIndex", "Ljava/lang/Integer;", + credential_credentialIndexItem_0); + request.credential.credentialIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialIndexItem_0)); + auto credentialDataJni = chip::Platform::New(env, static_cast(credentialData)); + cleanupByteArrays.push_back(credentialDataJni); + request.credentialData = credentialDataJni->byteSpan(); + request.userIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + request.userStatus = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); std::unique_ptr onSuccess(Platform::New(callback), @@ -7189,6 +9378,11 @@ JNI_METHOD(void, DoorLockCluster, setCredential) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -7200,30 +9394,42 @@ JNI_METHOD(void, DoorLockCluster, setUser) CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type request; - request.operationType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); - request.userIndex = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); - chip::CharSpan userNameValue; - if (userName != nullptr) + std::list cleanupByteArrays; + std::list cleanupStrings; + request.operationType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); + request.userIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); + if (userName == nullptr) + { + request.userName.SetNull(); + } + else + { + auto & nonNullValue_0 = request.userName.SetNonNull(); + auto userNameJni = chip::Platform::New(env, static_cast(userName)); + cleanupStrings.push_back(userNameJni); + nonNullValue_0 = userNameJni->charSpan(); + } + if (userUniqueId == nullptr) { - userNameValue = chip::JniUtfString(env, static_cast(userName)).charSpan(); + request.userUniqueId.SetNull(); } - request.userName = userName == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(userNameValue); - uint32_t userUniqueIdValue; - if (userUniqueId != nullptr) + else { - userUniqueIdValue = chip::JniReferences::GetInstance().LongToPrimitive(userUniqueId); + auto & nonNullValue_0 = request.userUniqueId.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(userUniqueId)); } - request.userUniqueId = userUniqueId == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(userUniqueIdValue); - request.userStatus = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); - request.userType = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(userType)); - request.credentialRule = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(credentialRule)); + request.userStatus = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userStatus)); + request.userType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(userType)); + request.credentialRule = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(credentialRule)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -7257,6 +9463,11 @@ JNI_METHOD(void, DoorLockCluster, setUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -7267,10 +9478,20 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor) CHIP_ERROR err = CHIP_NO_ERROR; DoorLockCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type request; - chip::JniReferences::GetInstance().GetOptionalValue(pinCode, pinCode); - request.pinCode = chip::Optional(chip::JniByteArray(env, static_cast(pinCode)).byteSpan()); + std::list cleanupByteArrays; + std::list cleanupStrings; + if (pinCode != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(pinCode, optionalValue_0); + auto & definedValue_0 = request.pinCode.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -7304,6 +9525,11 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -7901,12 +10127,13 @@ JNI_METHOD(void, DoorLockCluster, subscribeWrongCodeEntryLimitAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, DoorLockCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7923,14 +10150,14 @@ JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AttributeList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + CHIPDoorLockAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -7938,10 +10165,47 @@ JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, ElectricalMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +JNI_METHOD(void, DoorLockCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - ElectricalMeasurementCluster * cppCluster = new ElectricalMeasurementCluster(); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + DoorLockCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, ElectricalMeasurementCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + ElectricalMeasurementCluster * cppCluster = new ElectricalMeasurementCluster(); cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); return reinterpret_cast(cppCluster); @@ -8355,6 +10619,45 @@ JNI_METHOD(void, ElectricalMeasurementCluster, subscribeActivePowerMaxAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ElectricalMeasurementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ElectricalMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPElectricalMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ElectricalMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -8408,8 +10711,12 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) CHIP_ERROR err = CHIP_NO_ERROR; EthernetNetworkDiagnosticsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -8442,6 +10749,11 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -8784,6 +11096,47 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeTimeSinceResetAttri onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + EthernetNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -8868,6 +11221,82 @@ JNI_METHOD(jlong, FixedLabelCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } +JNI_METHOD(void, FixedLabelCluster, subscribeLabelListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + FixedLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPFixedLabelLabelListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, FixedLabelCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + FixedLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPFixedLabelAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, FixedLabelCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -9062,6 +11491,45 @@ JNI_METHOD(void, FlowMeasurementCluster, subscribeToleranceAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, FlowMeasurementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + FlowMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPFlowMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, FlowMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -9116,12 +11584,17 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) CHIP_ERROR err = CHIP_NO_ERROR; GeneralCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type request; - request.expiryLengthSeconds = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.expiryLengthSeconds = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(expiryLengthSeconds)); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.timeoutMs = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); std::unique_ptr @@ -9158,6 +11631,11 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9168,8 +11646,12 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) CHIP_ERROR err = CHIP_NO_ERROR; GeneralCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), @@ -9206,6 +11688,11 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9217,12 +11704,20 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) CHIP_ERROR err = CHIP_NO_ERROR; GeneralCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - request.location = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(location)); - request.countryCode = chip::JniUtfString(env, static_cast(countryCode)).charSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); - request.timeoutMs = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.location = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(location)); + auto countryCodeJni = chip::Platform::New(env, static_cast(countryCode)); + cleanupStrings.push_back(countryCodeJni); + request.countryCode = countryCodeJni->charSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + request.timeoutMs = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(timeoutMs)); std::unique_ptr @@ -9260,6 +11755,11 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9300,6 +11800,47 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeBreadcrumbAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, GeneralCommissioningCluster, subscribeBasicCommissioningInfoListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfoList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, GeneralCommissioningCluster, subscribeRegulatoryConfigAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -9375,12 +11916,14 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeLocationCapabilityAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -9397,14 +11940,14 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPGeneralCommissioningAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -9412,16 +11955,7 @@ JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) -{ - chip::DeviceLayer::StackLock lock; - GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); - - cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); - return reinterpret_cast(cppCluster); -} - -JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) +JNI_METHOD(void, GeneralCommissioningCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -9437,15 +11971,100 @@ JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(jlong, GeneralDiagnosticsCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) +{ + chip::DeviceLayer::StackLock lock; + GeneralDiagnosticsCluster * cppCluster = new GeneralDiagnosticsCluster(); + + cppCluster->Associate(reinterpret_cast(devicePtr), endpointId); + return reinterpret_cast(cppCluster); +} + +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeNetworkInterfacesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeRebootCountAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -9570,6 +12189,164 @@ JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeBootReasonsAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeActiveHardwareFaultsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeActiveRadioFaultsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeActiveNetworkFaultsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GeneralDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPGeneralDiagnosticsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, GeneralDiagnosticsCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -9623,10 +12400,13 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) CHIP_ERROR err = CHIP_NO_ERROR; GroupKeyManagementCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type request; - request.groupKeySetID = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupKeySetID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); std::unique_ptr @@ -9663,6 +12443,11 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9673,9 +12458,35 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) CHIP_ERROR err = CHIP_NO_ERROR; GroupKeyManagementCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - request.groupKeySetIDs = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint groupKeySetIDsSize; + chip::JniReferences::GetInstance().GetArrayListSize(groupKeySetIDs, groupKeySetIDsSize); + if (groupKeySetIDsSize != 0) + { + auto * listHolder_0 = new ListHolder(groupKeySetIDsSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(groupKeySetIDsSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(groupKeySetIDs, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.groupKeySetIDs = ListType_0(listHolder_0->mList, groupKeySetIDsSize); + } + else + { + request.groupKeySetIDs = ListType_0(); + } + } std::unique_ptr @@ -9713,6 +12524,11 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9723,10 +12539,13 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) CHIP_ERROR err = CHIP_NO_ERROR; GroupKeyManagementCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type request; - request.groupKeySetID = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupKeySetID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -9760,21 +12579,69 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySetID, jobject securityPolicy, - jbyteArray epochKey0, jobject epochStartTime0, jbyteArray epochKey1, jobject epochStartTime1, jbyteArray epochKey2, - jobject epochStartTime2, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupKeySet, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; GroupKeyManagementCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type request; - request.groupKeySet = chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySet::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject groupKeySet_groupKeySetIDItem_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "groupKeySetID", "Ljava/lang/Integer;", + groupKeySet_groupKeySetIDItem_0); + request.groupKeySet.groupKeySetID = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySet_groupKeySetIDItem_0)); + jobject groupKeySet_securityPolicyItem_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "securityPolicy", "Ljava/lang/Integer;", + groupKeySet_securityPolicyItem_0); + request.groupKeySet.securityPolicy = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySet_securityPolicyItem_0)); + jobject groupKeySet_epochKey0Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey0", "[B", groupKeySet_epochKey0Item_0); + auto groupKeySet_epochKey0Item_0Jni = + chip::Platform::New(env, static_cast(groupKeySet_epochKey0Item_0)); + cleanupByteArrays.push_back(groupKeySet_epochKey0Item_0Jni); + request.groupKeySet.epochKey0 = groupKeySet_epochKey0Item_0Jni->byteSpan(); + jobject groupKeySet_epochStartTime0Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime0", "Ljava/lang/Long;", + groupKeySet_epochStartTime0Item_0); + request.groupKeySet.epochStartTime0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(groupKeySet_epochStartTime0Item_0)); + jobject groupKeySet_epochKey1Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey1", "[B", groupKeySet_epochKey1Item_0); + auto groupKeySet_epochKey1Item_0Jni = + chip::Platform::New(env, static_cast(groupKeySet_epochKey1Item_0)); + cleanupByteArrays.push_back(groupKeySet_epochKey1Item_0Jni); + request.groupKeySet.epochKey1 = groupKeySet_epochKey1Item_0Jni->byteSpan(); + jobject groupKeySet_epochStartTime1Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime1", "Ljava/lang/Long;", + groupKeySet_epochStartTime1Item_0); + request.groupKeySet.epochStartTime1 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(groupKeySet_epochStartTime1Item_0)); + jobject groupKeySet_epochKey2Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey2", "[B", groupKeySet_epochKey2Item_0); + auto groupKeySet_epochKey2Item_0Jni = + chip::Platform::New(env, static_cast(groupKeySet_epochKey2Item_0)); + cleanupByteArrays.push_back(groupKeySet_epochKey2Item_0Jni); + request.groupKeySet.epochKey2 = groupKeySet_epochKey2Item_0Jni->byteSpan(); + jobject groupKeySet_epochStartTime2Item_0; + chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime2", "Ljava/lang/Long;", + groupKeySet_epochStartTime2Item_0); + request.groupKeySet.epochStartTime2 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(groupKeySet_epochStartTime2Item_0)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -9808,6 +12675,89 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GroupKeyManagementCluster, subscribeGroupKeyMapAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GroupKeyManagementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPGroupKeyManagementGroupKeyMapAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GroupKeyManagementCluster, subscribeGroupTableAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GroupKeyManagementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPGroupKeyManagementGroupTableAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -9886,6 +12836,45 @@ JNI_METHOD(void, GroupKeyManagementCluster, subscribeMaxGroupKeysPerFabricAttrib onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, GroupKeyManagementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GroupKeyManagementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPGroupKeyManagementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, GroupKeyManagementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -9939,10 +12928,16 @@ JNI_METHOD(void, GroupsCluster, addGroup) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + auto groupNameJni = chip::Platform::New(env, static_cast(groupName)); + cleanupStrings.push_back(groupNameJni); + request.groupName = groupNameJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), @@ -9977,6 +12972,11 @@ JNI_METHOD(void, GroupsCluster, addGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -9987,10 +12987,16 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.groupName = chip::JniUtfString(env, static_cast(groupName)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + auto groupNameJni = chip::Platform::New(env, static_cast(groupName)); + cleanupStrings.push_back(groupNameJni); + request.groupName = groupNameJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -10024,6 +13030,11 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10034,9 +13045,35 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::GetGroupMembership::Type request; - request.groupList = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint groupListSize; + chip::JniReferences::GetInstance().GetArrayListSize(groupList, groupListSize); + if (groupListSize != 0) + { + auto * listHolder_0 = new ListHolder(groupListSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(groupListSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(groupList, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.groupList = ListType_0(listHolder_0->mList, groupListSize); + } + else + { + request.groupList = ListType_0(); + } + } std::unique_ptr @@ -10073,6 +13110,11 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10083,8 +13125,12 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -10117,6 +13163,11 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10127,9 +13178,13 @@ JNI_METHOD(void, GroupsCluster, removeGroup) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); std::unique_ptr onSuccess(Platform::New(callback), @@ -10165,6 +13220,11 @@ JNI_METHOD(void, GroupsCluster, removeGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10175,9 +13235,13 @@ JNI_METHOD(void, GroupsCluster, viewGroup) CHIP_ERROR err = CHIP_NO_ERROR; GroupsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); std::unique_ptr onSuccess( Platform::New(callback), @@ -10209,18 +13273,61 @@ JNI_METHOD(void, GroupsCluster, viewGroup) chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, GroupsCluster, subscribeNameSupportAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + GroupsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Groups::Attributes::NameSupport::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, GroupsCluster, subscribeNameSupportAttribute) +JNI_METHOD(void, GroupsCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -10237,14 +13344,14 @@ JNI_METHOD(void, GroupsCluster, subscribeNameSupportAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::Groups::Attributes::NameSupport::TypeInfo; + using TypeInfo = chip::app::Clusters::Groups::Attributes::AttributeList::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + CHIPGroupsAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -10305,10 +13412,13 @@ JNI_METHOD(void, IdentifyCluster, identify) CHIP_ERROR err = CHIP_NO_ERROR; IdentifyCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Identify::Commands::Identify::Type request; - request.identifyTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(identifyTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.identifyTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(identifyTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -10342,6 +13452,11 @@ JNI_METHOD(void, IdentifyCluster, identify) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10352,8 +13467,12 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) CHIP_ERROR err = CHIP_NO_ERROR; IdentifyCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Identify::Commands::IdentifyQuery::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -10388,6 +13507,11 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10399,12 +13523,15 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) CHIP_ERROR err = CHIP_NO_ERROR; IdentifyCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type request; - request.effectIdentifier = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectIdentifier)); - request.effectVariant = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.effectIdentifier = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(effectIdentifier)); + request.effectVariant = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -10438,6 +13565,11 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10515,6 +13647,44 @@ JNI_METHOD(void, IdentifyCluster, subscribeIdentifyTypeAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, IdentifyCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + IdentifyCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Identify::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPIdentifyAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, IdentifyCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -10757,6 +13927,45 @@ JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeLightSensorTypeAttribut onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + IlluminanceMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPIlluminanceMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, IlluminanceMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -10811,9 +14020,13 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) CHIP_ERROR err = CHIP_NO_ERROR; KeypadInputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type request; - request.keyCode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(keyCode)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.keyCode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(keyCode)); std::unique_ptr onSuccess(Platform::New(callback), @@ -10849,6 +14062,49 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, KeypadInputCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + KeypadInputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPKeypadInputAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -10906,14 +14162,19 @@ JNI_METHOD(void, LevelControlCluster, move) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + request.optionMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -10947,6 +14208,11 @@ JNI_METHOD(void, LevelControlCluster, move) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -10958,15 +14224,19 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type request; - request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.level = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11000,6 +14270,11 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11011,11 +14286,15 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type request; - request.level = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.level = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11049,6 +14328,11 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11059,10 +14343,15 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type request; - request.moveMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); - request.rate = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.moveMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); + request.rate = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rate)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11096,6 +14385,11 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11107,16 +14401,21 @@ JNI_METHOD(void, LevelControlCluster, step) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + request.optionMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11150,6 +14449,11 @@ JNI_METHOD(void, LevelControlCluster, step) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11161,12 +14465,17 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type request; - request.stepMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); - request.stepSize = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.stepMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); + request.stepSize = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(stepSize)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11200,6 +14509,11 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11211,12 +14525,15 @@ JNI_METHOD(void, LevelControlCluster, stop) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type request; - request.optionMask = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); - request.optionOverride = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.optionMask = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); + request.optionOverride = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionOverride)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -11250,6 +14567,11 @@ JNI_METHOD(void, LevelControlCluster, stop) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11260,8 +14582,12 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) CHIP_ERROR err = CHIP_NO_ERROR; LevelControlCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -11294,6 +14620,11 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -11823,6 +15154,44 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLevelControlAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, LevelControlCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -11944,6 +15313,47 @@ JNI_METHOD(void, LocalizationConfigurationCluster, subscribeActiveLocaleAttribut onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, LocalizationConfigurationCluster, subscribeSupportedLocalesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LocalizationConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -11960,8 +15370,12 @@ JNI_METHOD(void, LowPowerCluster, sleep) CHIP_ERROR err = CHIP_NO_ERROR; LowPowerCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::LowPower::Commands::Sleep::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -11994,6 +15408,49 @@ JNI_METHOD(void, LowPowerCluster, sleep) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, LowPowerCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LowPowerCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPLowPowerAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -12050,8 +15507,12 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaInputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -12084,6 +15545,11 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12094,10 +15560,16 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaInputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); - request.name = chip::JniUtfString(env, static_cast(name)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.index = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + auto nameJni = chip::Platform::New(env, static_cast(name)); + cleanupStrings.push_back(nameJni); + request.name = nameJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12131,6 +15603,11 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12141,9 +15618,13 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaInputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type request; - request.index = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.index = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12177,6 +15658,11 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12187,8 +15673,12 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaInputCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -12218,8 +15708,51 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, MediaInputCluster, subscribeMediaInputListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::MediaInput::Attributes::MediaInputList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPMediaInputMediaInputListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); @@ -12261,6 +15794,44 @@ JNI_METHOD(void, MediaInputCluster, subscribeCurrentMediaInputAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, MediaInputCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + MediaInputCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPMediaInputAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, MediaInputCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -12314,8 +15885,12 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12350,6 +15925,11 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12360,8 +15940,12 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12396,6 +15980,11 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12406,8 +15995,12 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12442,6 +16035,11 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12452,8 +16050,12 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12488,6 +16090,11 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12498,8 +16105,12 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12534,6 +16145,11 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12544,8 +16160,12 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12580,6 +16200,11 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12590,9 +16215,13 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type request; - request.position = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(position)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.position = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(position)); std::unique_ptr onSuccess(Platform::New(callback), @@ -12628,6 +16257,11 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12638,9 +16272,12 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type request; - request.deltaPositionMilliseconds = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.deltaPositionMilliseconds = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); std::unique_ptr @@ -12677,6 +16314,11 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12687,9 +16329,12 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type request; - request.deltaPositionMilliseconds = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.deltaPositionMilliseconds = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); std::unique_ptr @@ -12726,6 +16371,11 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12736,8 +16386,12 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12772,6 +16426,11 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -12782,8 +16441,12 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) CHIP_ERROR err = CHIP_NO_ERROR; MediaPlaybackCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), Platform::Delete); @@ -12818,6 +16481,11 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13043,6 +16711,44 @@ JNI_METHOD(void, MediaPlaybackCluster, subscribeSeekRangeStartAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, MediaPlaybackCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + MediaPlaybackCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPMediaPlaybackAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, MediaPlaybackCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -13096,9 +16802,13 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode) CHIP_ERROR err = CHIP_NO_ERROR; ModeSelectCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type request; - request.newMode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(newMode)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.newMode = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(newMode)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -13132,6 +16842,11 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13172,6 +16887,44 @@ JNI_METHOD(void, ModeSelectCluster, subscribeCurrentModeAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ModeSelectCluster, subscribeSupportedModesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPModeSelectSupportedModesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ModeSelectCluster, subscribeOnModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -13283,6 +17036,44 @@ JNI_METHOD(void, ModeSelectCluster, subscribeDescriptionAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ModeSelectCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ModeSelectCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPModeSelectAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ModeSelectCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -13337,10 +17128,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - request.operationalDataset = chip::JniByteArray(env, static_cast(operationalDataset)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto operationalDatasetJni = chip::Platform::New(env, static_cast(operationalDataset)); + cleanupByteArrays.push_back(operationalDatasetJni); + request.operationalDataset = operationalDatasetJni->byteSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13377,6 +17174,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13388,11 +17190,19 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); - request.credentials = chip::JniByteArray(env, static_cast(credentials)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto ssidJni = chip::Platform::New(env, static_cast(ssid)); + cleanupByteArrays.push_back(ssidJni); + request.ssid = ssidJni->byteSpan(); + auto credentialsJni = chip::Platform::New(env, static_cast(credentials)); + cleanupByteArrays.push_back(credentialsJni); + request.credentials = credentialsJni->byteSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13429,6 +17239,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13440,10 +17255,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type request; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); + cleanupByteArrays.push_back(networkIDJni); + request.networkID = networkIDJni->byteSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13480,6 +17301,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13491,10 +17317,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type request; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); + cleanupByteArrays.push_back(networkIDJni); + request.networkID = networkIDJni->byteSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13531,6 +17363,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13542,12 +17379,18 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type request; - request.networkID = chip::JniByteArray(env, static_cast(networkID)).byteSpan(); - request.networkIndex = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(networkIndex)); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); + cleanupByteArrays.push_back(networkIDJni); + request.networkID = networkIDJni->byteSpan(); + request.networkIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(networkIndex)); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13584,6 +17427,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13594,10 +17442,16 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) CHIP_ERROR err = CHIP_NO_ERROR; NetworkCommissioningCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type request; - request.ssid = chip::JniByteArray(env, static_cast(ssid)).byteSpan(); - request.breadcrumb = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto ssidJni = chip::Platform::New(env, static_cast(ssid)); + cleanupByteArrays.push_back(ssidJni); + request.ssid = ssidJni->byteSpan(); + request.breadcrumb = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); std::unique_ptr @@ -13634,6 +17488,11 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -13674,6 +17533,45 @@ JNI_METHOD(void, NetworkCommissioningCluster, subscribeMaxNetworksAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, NetworkCommissioningCluster, subscribeNetworksAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkCommissioningCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPNetworkCommissioningNetworksAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, NetworkCommissioningCluster, subscribeScanMaxTimeSecondsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -13991,10 +17889,16 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) CHIP_ERROR err = CHIP_NO_ERROR; OtaSoftwareUpdateProviderCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); - request.newVersion = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(newVersion)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto updateTokenJni = chip::Platform::New(env, static_cast(updateToken)); + cleanupByteArrays.push_back(updateTokenJni); + request.updateToken = updateTokenJni->byteSpan(); + request.newVersion = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(newVersion)); std::unique_ptr @@ -14031,6 +17935,11 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14042,11 +17951,16 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) CHIP_ERROR err = CHIP_NO_ERROR; OtaSoftwareUpdateProviderCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - request.updateToken = chip::JniByteArray(env, static_cast(updateToken)).byteSpan(); - request.softwareVersion = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto updateTokenJni = chip::Platform::New(env, static_cast(updateToken)); + cleanupByteArrays.push_back(updateTokenJni); + request.updateToken = updateTokenJni->byteSpan(); + request.softwareVersion = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14080,6 +17994,11 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14092,25 +18011,75 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) CHIP_ERROR err = CHIP_NO_ERROR; OtaSoftwareUpdateProviderCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); - request.productId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(productId)); - request.softwareVersion = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); - request.protocolsSupported = - chip::app::DataModel::List(); - chip::JniReferences::GetInstance().GetOptionalValue(hardwareVersion, hardwareVersion); - request.hardwareVersion = chip::Optional( - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(hardwareVersion))); - chip::JniReferences::GetInstance().GetOptionalValue(location, location); - request.location = chip::Optional(chip::JniUtfString(env, static_cast(location)).charSpan()); - chip::JniReferences::GetInstance().GetOptionalValue(requestorCanConsent, requestorCanConsent); - request.requestorCanConsent = chip::Optional(static_cast( - chip::JniReferences::GetInstance().BooleanToPrimitive(requestorCanConsent))); - chip::JniReferences::GetInstance().GetOptionalValue(metadataForProvider, metadataForProvider); - request.metadataForProvider = - chip::Optional(chip::JniByteArray(env, static_cast(metadataForProvider)).byteSpan()); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.vendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); + request.productId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(productId)); + request.softwareVersion = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint protocolsSupportedSize; + chip::JniReferences::GetInstance().GetArrayListSize(protocolsSupported, protocolsSupportedSize); + if (protocolsSupportedSize != 0) + { + auto * listHolder_0 = new ListHolder(protocolsSupportedSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(protocolsSupportedSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(protocolsSupported, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.protocolsSupported = ListType_0(listHolder_0->mList, protocolsSupportedSize); + } + else + { + request.protocolsSupported = ListType_0(); + } + } + if (hardwareVersion != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(hardwareVersion, optionalValue_0); + auto & definedValue_0 = request.hardwareVersion.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_0)); + } + if (location != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(location, optionalValue_0); + auto & definedValue_0 = request.location.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupStrings.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->charSpan(); + } + if (requestorCanConsent != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(requestorCanConsent, optionalValue_0); + auto & definedValue_0 = request.requestorCanConsent.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_0)); + } + if (metadataForProvider != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(metadataForProvider, optionalValue_0); + auto & definedValue_0 = request.metadataForProvider.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } std::unique_ptr @@ -14147,6 +18116,51 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateProviderCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -14205,17 +18219,28 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) CHIP_ERROR err = CHIP_NO_ERROR; OtaSoftwareUpdateRequestorCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; - request.providerNodeId = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(providerNodeId)); - request.vendorId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); - request.announcementReason = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.providerNodeId = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(providerNodeId)); + request.vendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); + request.announcementReason = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(announcementReason)); - chip::JniReferences::GetInstance().GetOptionalValue(metadataForNode, metadataForNode); - request.metadataForNode = - chip::Optional(chip::JniByteArray(env, static_cast(metadataForNode)).byteSpan()); - request.endpoint = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(endpoint)); + if (metadataForNode != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(metadataForNode, optionalValue_0); + auto & definedValue_0 = request.metadataForNode.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } + request.endpoint = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(endpoint)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14246,8 +18271,54 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } VerifyOrReturn(err == CHIP_NO_ERROR, - AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", - CHIP_ERROR_INCORRECT_STATE)); + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeDefaultOtaProvidersAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); @@ -14369,6 +18440,47 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeUpdateStateProgress onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -14528,6 +18640,45 @@ JNI_METHOD(void, OccupancySensingCluster, subscribeOccupancySensorTypeBitmapAttr onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, OccupancySensingCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OccupancySensingCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOccupancySensingAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, OccupancySensingCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -14580,8 +18731,12 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -14614,6 +18769,11 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14625,11 +18785,15 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type request; - request.effectId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectId)); - request.effectVariant = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.effectId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(effectId)); + request.effectVariant = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(effectVariant)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14663,6 +18827,11 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14672,8 +18841,12 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -14706,6 +18879,11 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14716,8 +18894,12 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -14750,6 +18932,11 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14761,13 +18948,17 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type request; - request.onOffControl = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onOffControl)); - request.onTime = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(onTime)); - request.offWaitTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(offWaitTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.onOffControl = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(onOffControl)); + request.onTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(onTime)); + request.offWaitTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(offWaitTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14801,6 +18992,11 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -14810,8 +19006,12 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster CHIP_ERROR err = CHIP_NO_ERROR; OnOffCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Toggle::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -14844,6 +19044,11 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15030,6 +19235,44 @@ JNI_METHOD(void, OnOffCluster, subscribeStartUpOnOffAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, OnOffCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OnOffCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOnOffAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, OnOffCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -15187,6 +19430,46 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeSwitchActionsAttribut onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OnOffSwitchConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, OnOffSwitchConfigurationCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -15242,16 +19525,30 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type request; - request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); - chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); - request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); - request.IPKValue = chip::JniByteArray(env, static_cast(IPKValue)).byteSpan(); - request.caseAdminNode = - static_cast(chip::JniReferences::GetInstance().LongToPrimitive(caseAdminNode)); - request.adminVendorId = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(adminVendorId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto NOCValueJni = chip::Platform::New(env, static_cast(NOCValue)); + cleanupByteArrays.push_back(NOCValueJni); + request.NOCValue = NOCValueJni->byteSpan(); + if (ICACValue != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, optionalValue_0); + auto & definedValue_0 = request.ICACValue.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } + auto IPKValueJni = chip::Platform::New(env, static_cast(IPKValue)); + cleanupByteArrays.push_back(IPKValueJni); + request.IPKValue = IPKValueJni->byteSpan(); + request.caseAdminNode = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(caseAdminNode)); + request.adminVendorId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(adminVendorId)); std::unique_ptr @@ -15288,6 +19585,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15298,9 +19600,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - request.rootCertificate = chip::JniByteArray(env, static_cast(rootCertificate)).byteSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto rootCertificateJni = chip::Platform::New(env, static_cast(rootCertificate)); + cleanupByteArrays.push_back(rootCertificateJni); + request.rootCertificate = rootCertificateJni->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15334,6 +19641,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15344,9 +19656,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type request; - request.attestationNonce = chip::JniByteArray(env, static_cast(attestationNonce)).byteSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto attestationNonceJni = chip::Platform::New(env, static_cast(attestationNonce)); + cleanupByteArrays.push_back(attestationNonceJni); + request.attestationNonce = attestationNonceJni->byteSpan(); std::unique_ptr @@ -15383,6 +19700,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15393,10 +19715,13 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type request; - request.certificateType = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(certificateType)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.certificateType = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(certificateType)); std::unique_ptr @@ -15434,6 +19759,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15444,9 +19774,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type request; - request.CSRNonce = chip::JniByteArray(env, static_cast(CSRNonce)).byteSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto CSRNonceJni = chip::Platform::New(env, static_cast(CSRNonce)); + cleanupByteArrays.push_back(CSRNonceJni); + request.CSRNonce = CSRNonceJni->byteSpan(); std::unique_ptr @@ -15483,6 +19818,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15493,10 +19833,13 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type request; - request.fabricIndex = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.fabricIndex = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex)); std::unique_ptr @@ -15533,6 +19876,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15543,9 +19891,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; - request.trustedRootIdentifier = chip::JniByteArray(env, static_cast(trustedRootIdentifier)).byteSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto trustedRootIdentifierJni = chip::Platform::New(env, static_cast(trustedRootIdentifier)); + cleanupByteArrays.push_back(trustedRootIdentifierJni); + request.trustedRootIdentifier = trustedRootIdentifierJni->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15579,6 +19932,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15589,9 +19947,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type request; - request.label = chip::JniUtfString(env, static_cast(label)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto labelJni = chip::Platform::New(env, static_cast(label)); + cleanupStrings.push_back(labelJni); + request.label = labelJni->charSpan(); std::unique_ptr @@ -15628,6 +19991,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -15639,11 +20007,23 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) CHIP_ERROR err = CHIP_NO_ERROR; OperationalCredentialsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type request; - request.NOCValue = chip::JniByteArray(env, static_cast(NOCValue)).byteSpan(); - chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, ICACValue); - request.ICACValue = chip::Optional(chip::JniByteArray(env, static_cast(ICACValue)).byteSpan()); + std::list cleanupByteArrays; + std::list cleanupStrings; + auto NOCValueJni = chip::Platform::New(env, static_cast(NOCValue)); + cleanupByteArrays.push_back(NOCValueJni); + request.NOCValue = NOCValueJni->byteSpan(); + if (ICACValue != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, optionalValue_0); + auto & definedValue_0 = request.ICACValue.Emplace(); + auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); + cleanupByteArrays.push_back(optionalValue_0Jni); + definedValue_0 = optionalValue_0Jni->byteSpan(); + } std::unique_ptr @@ -15680,6 +20060,50 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, OperationalCredentialsCluster, subscribeFabricsListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::FabricsList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPOperationalCredentialsFabricsListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -15721,12 +20145,93 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeSupportedFabricsAttribu onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, OperationalCredentialsCluster, subscribeTrustedRootCertificatesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, OperationalCredentialsCluster, subscribeCurrentFabricIndexAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -15743,15 +20248,16 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttr chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -15759,14 +20265,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeCommissionedFabricsAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, OperationalCredentialsCluster, subscribeCurrentFabricIndexAttribute) +JNI_METHOD(void, OperationalCredentialsCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr - onSuccess(Platform::New(callback, true), - chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -15783,16 +20289,14 @@ JNI_METHOD(void, OperationalCredentialsCluster, subscribeCurrentFabricIndexAttri chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute( onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), - static_cast(maxInterval), - CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::OnSubscriptionEstablished); + static_cast(maxInterval), CHIPOperationalCredentialsAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -16106,6 +20610,45 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeLevelAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, PowerSourceCluster, subscribeActiveBatteryFaultsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPPowerSourceActiveBatteryFaultsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -16143,6 +20686,44 @@ JNI_METHOD(void, PowerSourceCluster, subscribeBatteryChargeStateAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, PowerSourceCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPPowerSourceAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PowerSourceCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -16226,6 +20807,85 @@ JNI_METHOD(jlong, PowerSourceConfigurationCluster, initWithDevice)(JNIEnv * env, return reinterpret_cast(cppCluster); } +JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeSourcesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPPowerSourceConfigurationSourcesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PowerSourceConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPPowerSourceConfigurationAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PowerSourceConfigurationCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -16384,6 +21044,45 @@ JNI_METHOD(void, PressureMeasurementCluster, subscribeMaxMeasuredValueAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, PressureMeasurementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PressureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPPressureMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PressureMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -17342,6 +22041,47 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAlarmMaskAttribute onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPPumpConfigurationAndControlAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -17541,12 +22281,51 @@ JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeMaxMeasuredValueAt onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeToleranceAttribute) +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeToleranceAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + RelativeHumidityMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -17563,14 +22342,16 @@ JNI_METHOD(void, RelativeHumidityMeasurementCluster, subscribeToleranceAttribute chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -17627,21 +22408,63 @@ JNI_METHOD(jlong, ScenesCluster, initWithDevice)(JNIEnv * env, jobject self, jlo JNI_METHOD(void, ScenesCluster, addScene) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject groupId, jobject sceneId, jobject transitionTime, - jstring sceneName, jobject clusterId, jobject length, jobject value, jobject timedInvokeTimeoutMs) + jstring sceneName, jobject extensionFieldSets, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::AddScene::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - request.sceneName = chip::JniUtfString(env, static_cast(sceneName)).charSpan(); - request.extensionFieldSets = - chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + auto sceneNameJni = chip::Platform::New(env, static_cast(sceneName)); + cleanupStrings.push_back(sceneNameJni); + request.sceneName = sceneNameJni->charSpan(); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint extensionFieldSetsSize; + chip::JniReferences::GetInstance().GetArrayListSize(extensionFieldSets, extensionFieldSetsSize); + if (extensionFieldSetsSize != 0) + { + auto * listHolder_0 = new ListHolder(extensionFieldSetsSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(extensionFieldSetsSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(extensionFieldSets, i_0, element_0); + jobject element_0_clusterIdItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "clusterId", "Ljava/lang/Long;", + element_0_clusterIdItem_1); + listHolder_0->mList[i_0].clusterId = + static_castmList[i_0].clusterId)>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_0_clusterIdItem_1)); + jobject element_0_lengthItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "length", "Ljava/lang/Integer;", + element_0_lengthItem_1); + listHolder_0->mList[i_0].length = static_castmList[i_0].length)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_lengthItem_1)); + jobject element_0_valueItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "value", "Ljava/lang/Integer;", element_0_valueItem_1); + listHolder_0->mList[i_0].value = static_castmList[i_0].value)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_valueItem_1)); + } + request.extensionFieldSets = ListType_0(listHolder_0->mList, extensionFieldSetsSize); + } + else + { + request.extensionFieldSets = ListType_0(); + } + } std::unique_ptr onSuccess( Platform::New(callback), @@ -17676,6 +22499,11 @@ JNI_METHOD(void, ScenesCluster, addScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17686,9 +22514,13 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); std::unique_ptr @@ -17725,6 +22557,11 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17736,12 +22573,17 @@ JNI_METHOD(void, ScenesCluster, recallScene) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RecallScene::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); - request.transitionTime = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + request.transitionTime = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -17775,6 +22617,11 @@ JNI_METHOD(void, ScenesCluster, recallScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17785,9 +22632,13 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); std::unique_ptr onSuccess(Platform::New(callback), @@ -17823,6 +22674,11 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17833,10 +22689,15 @@ JNI_METHOD(void, ScenesCluster, removeScene) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RemoveScene::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); std::unique_ptr onSuccess(Platform::New(callback), @@ -17872,6 +22733,11 @@ JNI_METHOD(void, ScenesCluster, removeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17882,10 +22748,15 @@ JNI_METHOD(void, ScenesCluster, storeScene) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::StoreScene::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); std::unique_ptr onSuccess( Platform::New(callback), @@ -17920,6 +22791,11 @@ JNI_METHOD(void, ScenesCluster, storeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -17930,10 +22806,15 @@ JNI_METHOD(void, ScenesCluster, viewScene) CHIP_ERROR err = CHIP_NO_ERROR; ScenesCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Scenes::Commands::ViewScene::Type request; - request.groupId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - request.sceneId = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.groupId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); + request.sceneId = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); std::unique_ptr onSuccess( Platform::New(callback), @@ -17968,6 +22849,11 @@ JNI_METHOD(void, ScenesCluster, viewScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -18156,6 +23042,44 @@ JNI_METHOD(void, ScenesCluster, subscribeNameSupportAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ScenesCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ScenesCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPScenesAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ScenesCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -18209,8 +23133,12 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) CHIP_ERROR err = CHIP_NO_ERROR; SoftwareDiagnosticsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -18243,6 +23171,50 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeThreadMetricsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -18358,6 +23330,45 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeCurrentHeapHighWatermarkAt onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + SoftwareDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPSoftwareDiagnosticsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, SoftwareDiagnosticsCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -18552,6 +23563,44 @@ JNI_METHOD(void, SwitchCluster, subscribeMultiPressMaxAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, SwitchCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + SwitchCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Switch::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPSwitchAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, SwitchCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -18642,10 +23691,16 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) CHIP_ERROR err = CHIP_NO_ERROR; TargetNavigatorCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type request; - request.target = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(target)); - request.data = chip::JniUtfString(env, static_cast(data)).charSpan(); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.target = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(target)); + auto dataJni = chip::Platform::New(env, static_cast(data)); + cleanupStrings.push_back(dataJni); + request.data = dataJni->charSpan(); std::unique_ptr @@ -18682,6 +23737,50 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TargetNavigatorCluster, subscribeTargetNavigatorListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TargetNavigatorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::TargetNavigatorList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPTargetNavigatorTargetNavigatorListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + onSuccess.release(); onFailure.release(); } @@ -18723,6 +23822,45 @@ JNI_METHOD(void, TargetNavigatorCluster, subscribeCurrentNavigatorTargetAttribut onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TargetNavigatorCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TargetNavigatorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTargetNavigatorAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TargetNavigatorCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -18919,6 +24057,45 @@ JNI_METHOD(void, TemperatureMeasurementCluster, subscribeToleranceAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TemperatureMeasurementCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TemperatureMeasurementCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPTemperatureMeasurementAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TemperatureMeasurementCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -18967,16 +24144,51 @@ JNI_METHOD(jlong, TestClusterCluster, initWithDevice)(JNIEnv * env, jobject self } JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type request; - request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject arg1_aItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); + request.arg1.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_aItem_0)); + jobject arg1_bItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "b", "Ljava/lang/Boolean;", arg1_bItem_0); + request.arg1.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_bItem_0)); + jobject arg1_cItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "c", "Ljava/lang/Integer;", arg1_cItem_0); + request.arg1.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0)); + jobject arg1_dItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "d", "[B", arg1_dItem_0); + auto arg1_dItem_0Jni = chip::Platform::New(env, static_cast(arg1_dItem_0)); + cleanupByteArrays.push_back(arg1_dItem_0Jni); + request.arg1.d = arg1_dItem_0Jni->byteSpan(); + jobject arg1_eItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "e", "Ljava/lang/String;", arg1_eItem_0); + auto arg1_eItem_0Jni = chip::Platform::New(env, static_cast(arg1_eItem_0)); + cleanupStrings.push_back(arg1_eItem_0Jni); + request.arg1.e = arg1_eItem_0Jni->charSpan(); + jobject arg1_fItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "f", "Ljava/lang/Integer;", arg1_fItem_0); + request.arg1.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_fItem_0)); + jobject arg1_gItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "g", "Ljava/lang/Float;", arg1_gItem_0); + request.arg1.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(arg1_gItem_0)); + jobject arg1_hItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "h", "Ljava/lang/Double;", arg1_hItem_0); + request.arg1.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(arg1_hItem_0)); std::unique_ptr @@ -19013,6 +24225,11 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19023,8 +24240,12 @@ JNI_METHOD(void, TestClusterCluster, test) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::Test::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -19057,6 +24278,11 @@ JNI_METHOD(void, TestClusterCluster, test) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19067,10 +24293,15 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type request; - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.arg1 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); std::unique_ptr @@ -19107,6 +24338,11 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19118,11 +24354,17 @@ JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); - request.arg3 = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.arg1 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + request.arg3 = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(arg3)); std::unique_ptr @@ -19159,6 +24401,11 @@ JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19169,10 +24416,15 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type request; - request.arg1 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); - request.arg2 = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.arg1 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); + request.arg2 = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg2)); std::unique_ptr onSuccess(Platform::New(callback), @@ -19208,6 +24460,11 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19218,9 +24475,35 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type request; - request.arg1 = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint arg1Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1, arg1Size); + if (arg1Size != 0) + { + auto * listHolder_0 = new ListHolder(arg1Size); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(arg1Size); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(arg1, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.arg1 = ListType_0(listHolder_0->mList, arg1Size); + } + else + { + request.arg1 = ListType_0(); + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -19256,6 +24539,11 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19266,9 +24554,35 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; - request.arg1 = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint arg1Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1, arg1Size); + if (arg1Size != 0) + { + auto * listHolder_0 = new ListHolder(arg1Size); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(arg1Size); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(arg1, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.arg1 = ListType_0(listHolder_0->mList, arg1Size); + } + else + { + request.arg1 = ListType_0(); + } + } std::unique_ptr @@ -19305,20 +24619,248 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; - request.arg1 = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint arg1Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1, arg1Size); + if (arg1Size != 0) + { + auto * listHolder_0 = new ListHolder(arg1Size); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(arg1Size); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(arg1, i_0, element_0); + jobject element_0_aItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "a", "Ljava/lang/Integer;", element_0_aItem_1); + listHolder_0->mList[i_0].a = static_castmList[i_0].a)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_aItem_1)); + jobject element_0_bItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "b", "Ljava/lang/Boolean;", element_0_bItem_1); + listHolder_0->mList[i_0].b = static_castmList[i_0].b)>>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_bItem_1)); + jobject element_0_cItem_1; + chip::JniReferences::GetInstance().GetObjectField( + element_0, "c", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;", element_0_cItem_1); + jobject element_0_cItem_1_aItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "a", "Ljava/lang/Integer;", + element_0_cItem_1_aItem_2); + listHolder_0->mList[i_0].c.a = static_castmList[i_0].c.a)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1_aItem_2)); + jobject element_0_cItem_1_bItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "b", "Ljava/lang/Boolean;", + element_0_cItem_1_bItem_2); + listHolder_0->mList[i_0].c.b = static_castmList[i_0].c.b)>>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_cItem_1_bItem_2)); + jobject element_0_cItem_1_cItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "c", "Ljava/lang/Integer;", + element_0_cItem_1_cItem_2); + listHolder_0->mList[i_0].c.c = static_castmList[i_0].c.c)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1_cItem_2)); + jobject element_0_cItem_1_dItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "d", "[B", element_0_cItem_1_dItem_2); + auto element_0_cItem_1_dItem_2Jni = + chip::Platform::New(env, static_cast(element_0_cItem_1_dItem_2)); + cleanupByteArrays.push_back(element_0_cItem_1_dItem_2Jni); + listHolder_0->mList[i_0].c.d = element_0_cItem_1_dItem_2Jni->byteSpan(); + jobject element_0_cItem_1_eItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "e", "Ljava/lang/String;", + element_0_cItem_1_eItem_2); + auto element_0_cItem_1_eItem_2Jni = + chip::Platform::New(env, static_cast(element_0_cItem_1_eItem_2)); + cleanupStrings.push_back(element_0_cItem_1_eItem_2Jni); + listHolder_0->mList[i_0].c.e = element_0_cItem_1_eItem_2Jni->charSpan(); + jobject element_0_cItem_1_fItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "f", "Ljava/lang/Integer;", + element_0_cItem_1_fItem_2); + listHolder_0->mList[i_0].c.f = static_castmList[i_0].c.f)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1_fItem_2)); + jobject element_0_cItem_1_gItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "g", "Ljava/lang/Float;", + element_0_cItem_1_gItem_2); + listHolder_0->mList[i_0].c.g = static_castmList[i_0].c.g)>>( + chip::JniReferences::GetInstance().FloatToPrimitive(element_0_cItem_1_gItem_2)); + jobject element_0_cItem_1_hItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "h", "Ljava/lang/Double;", + element_0_cItem_1_hItem_2); + listHolder_0->mList[i_0].c.h = static_castmList[i_0].c.h)>>( + chip::JniReferences::GetInstance().DoubleToPrimitive(element_0_cItem_1_hItem_2)); + jobject element_0_dItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "d", "Ljava/util/ArrayList;", element_0_dItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].d)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_dItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_dItem_1, element_0_dItem_1Size); + if (element_0_dItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_dItem_1Size); + listFreer.add(listHolder_2); + + for (size_t i_2 = 0; i_2 < static_cast(element_0_dItem_1Size); ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_dItem_1, i_2, element_2); + jobject element_2_aItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "a", "Ljava/lang/Integer;", + element_2_aItem_3); + listHolder_2->mList[i_2].a = static_castmList[i_2].a)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_aItem_3)); + jobject element_2_bItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "b", "Ljava/lang/Boolean;", + element_2_bItem_3); + listHolder_2->mList[i_2].b = static_castmList[i_2].b)>>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_2_bItem_3)); + jobject element_2_cItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "c", "Ljava/lang/Integer;", + element_2_cItem_3); + listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_cItem_3)); + jobject element_2_dItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "d", "[B", element_2_dItem_3); + auto element_2_dItem_3Jni = + chip::Platform::New(env, static_cast(element_2_dItem_3)); + cleanupByteArrays.push_back(element_2_dItem_3Jni); + listHolder_2->mList[i_2].d = element_2_dItem_3Jni->byteSpan(); + jobject element_2_eItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "e", "Ljava/lang/String;", + element_2_eItem_3); + auto element_2_eItem_3Jni = + chip::Platform::New(env, static_cast(element_2_eItem_3)); + cleanupStrings.push_back(element_2_eItem_3Jni); + listHolder_2->mList[i_2].e = element_2_eItem_3Jni->charSpan(); + jobject element_2_fItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "f", "Ljava/lang/Integer;", + element_2_fItem_3); + listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_fItem_3)); + jobject element_2_gItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "g", "Ljava/lang/Float;", + element_2_gItem_3); + listHolder_2->mList[i_2].g = static_castmList[i_2].g)>>( + chip::JniReferences::GetInstance().FloatToPrimitive(element_2_gItem_3)); + jobject element_2_hItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "h", "Ljava/lang/Double;", + element_2_hItem_3); + listHolder_2->mList[i_2].h = static_castmList[i_2].h)>>( + chip::JniReferences::GetInstance().DoubleToPrimitive(element_2_hItem_3)); + } + listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0_dItem_1Size); + } + else + { + listHolder_0->mList[i_0].d = ListType_2(); + } + } + jobject element_0_eItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "e", "Ljava/util/ArrayList;", element_0_eItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].e)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_eItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_eItem_1, element_0_eItem_1Size); + if (element_0_eItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_eItem_1Size); + listFreer.add(listHolder_2); + + for (size_t i_2 = 0; i_2 < static_cast(element_0_eItem_1Size); ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_eItem_1, i_2, element_2); + listHolder_2->mList[i_2] = static_castmList[i_2])>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_2)); + } + listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0_eItem_1Size); + } + else + { + listHolder_0->mList[i_0].e = ListType_2(); + } + } + jobject element_0_fItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "f", "Ljava/util/ArrayList;", element_0_fItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].f)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_fItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_fItem_1, element_0_fItem_1Size); + if (element_0_fItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_fItem_1Size); + listFreer.add(listHolder_2); + + for (size_t i_2 = 0; i_2 < static_cast(element_0_fItem_1Size); ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_fItem_1, i_2, element_2); + auto element_2Jni = chip::Platform::New(env, static_cast(element_2)); + cleanupByteArrays.push_back(element_2Jni); + listHolder_2->mList[i_2] = element_2Jni->byteSpan(); + } + listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0_fItem_1Size); + } + else + { + listHolder_0->mList[i_0].f = ListType_2(); + } + } + jobject element_0_gItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "g", "Ljava/util/ArrayList;", element_0_gItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].g)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_gItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_gItem_1, element_0_gItem_1Size); + if (element_0_gItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_gItem_1Size); + listFreer.add(listHolder_2); + + for (size_t i_2 = 0; i_2 < static_cast(element_0_gItem_1Size); ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_gItem_1, i_2, element_2); + listHolder_2->mList[i_2] = static_castmList[i_2])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2)); + } + listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0_gItem_1Size); + } + else + { + listHolder_0->mList[i_0].g = ListType_2(); + } + } + } + request.arg1 = ListType_0(listHolder_0->mList, arg1Size); + } + else + { + request.arg1 = ListType_0(); + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -19354,20 +24896,83 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; - request.arg1 = chip::app::DataModel::List(); + std::list cleanupByteArrays; + std::list cleanupStrings; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint arg1Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1, arg1Size); + if (arg1Size != 0) + { + auto * listHolder_0 = new ListHolder(arg1Size); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(arg1Size); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(arg1, i_0, element_0); + jobject element_0_aItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "a", "Ljava/lang/Integer;", element_0_aItem_1); + listHolder_0->mList[i_0].a = static_castmList[i_0].a)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_aItem_1)); + jobject element_0_bItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "b", "Ljava/lang/Boolean;", element_0_bItem_1); + listHolder_0->mList[i_0].b = static_castmList[i_0].b)>>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_bItem_1)); + jobject element_0_cItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "c", "Ljava/lang/Integer;", element_0_cItem_1); + listHolder_0->mList[i_0].c = static_castmList[i_0].c)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1)); + jobject element_0_dItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "d", "[B", element_0_dItem_1); + auto element_0_dItem_1Jni = + chip::Platform::New(env, static_cast(element_0_dItem_1)); + cleanupByteArrays.push_back(element_0_dItem_1Jni); + listHolder_0->mList[i_0].d = element_0_dItem_1Jni->byteSpan(); + jobject element_0_eItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "e", "Ljava/lang/String;", element_0_eItem_1); + auto element_0_eItem_1Jni = chip::Platform::New(env, static_cast(element_0_eItem_1)); + cleanupStrings.push_back(element_0_eItem_1Jni); + listHolder_0->mList[i_0].e = element_0_eItem_1Jni->charSpan(); + jobject element_0_fItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "f", "Ljava/lang/Integer;", element_0_fItem_1); + listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fItem_1)); + jobject element_0_gItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "g", "Ljava/lang/Float;", element_0_gItem_1); + listHolder_0->mList[i_0].g = static_castmList[i_0].g)>>( + chip::JniReferences::GetInstance().FloatToPrimitive(element_0_gItem_1)); + jobject element_0_hItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "h", "Ljava/lang/Double;", element_0_hItem_1); + listHolder_0->mList[i_0].h = static_castmList[i_0].h)>>( + chip::JniReferences::GetInstance().DoubleToPrimitive(element_0_hItem_1)); + } + request.arg1 = ListType_0(listHolder_0->mList, arg1Size); + } + else + { + request.arg1 = ListType_0(); + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -19403,19 +25008,71 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type request; - request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStruct::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject arg1_aItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); + request.arg1.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_aItem_0)); + jobject arg1_bItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "b", "Ljava/lang/Boolean;", arg1_bItem_0); + request.arg1.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_bItem_0)); + jobject arg1_cItem_0; + chip::JniReferences::GetInstance().GetObjectField( + arg1, "c", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;", arg1_cItem_0); + jobject arg1_cItem_0_aItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "a", "Ljava/lang/Integer;", arg1_cItem_0_aItem_1); + request.arg1.c.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_aItem_1)); + jobject arg1_cItem_0_bItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "b", "Ljava/lang/Boolean;", arg1_cItem_0_bItem_1); + request.arg1.c.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_cItem_0_bItem_1)); + jobject arg1_cItem_0_cItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "c", "Ljava/lang/Integer;", arg1_cItem_0_cItem_1); + request.arg1.c.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_cItem_1)); + jobject arg1_cItem_0_dItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "d", "[B", arg1_cItem_0_dItem_1); + auto arg1_cItem_0_dItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_dItem_1)); + cleanupByteArrays.push_back(arg1_cItem_0_dItem_1Jni); + request.arg1.c.d = arg1_cItem_0_dItem_1Jni->byteSpan(); + jobject arg1_cItem_0_eItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "e", "Ljava/lang/String;", arg1_cItem_0_eItem_1); + auto arg1_cItem_0_eItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_eItem_1)); + cleanupStrings.push_back(arg1_cItem_0_eItem_1Jni); + request.arg1.c.e = arg1_cItem_0_eItem_1Jni->charSpan(); + jobject arg1_cItem_0_fItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "f", "Ljava/lang/Integer;", arg1_cItem_0_fItem_1); + request.arg1.c.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_fItem_1)); + jobject arg1_cItem_0_gItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "g", "Ljava/lang/Float;", arg1_cItem_0_gItem_1); + request.arg1.c.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(arg1_cItem_0_gItem_1)); + jobject arg1_cItem_0_hItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "h", "Ljava/lang/Double;", arg1_cItem_0_hItem_1); + request.arg1.c.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(arg1_cItem_0_hItem_1)); std::unique_ptr onSuccess(Platform::New(callback), @@ -19451,20 +25108,209 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, - jbyteArray f, jobject g, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; - request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStructList::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject arg1_aItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); + request.arg1.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_aItem_0)); + jobject arg1_bItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "b", "Ljava/lang/Boolean;", arg1_bItem_0); + request.arg1.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_bItem_0)); + jobject arg1_cItem_0; + chip::JniReferences::GetInstance().GetObjectField( + arg1, "c", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;", arg1_cItem_0); + jobject arg1_cItem_0_aItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "a", "Ljava/lang/Integer;", arg1_cItem_0_aItem_1); + request.arg1.c.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_aItem_1)); + jobject arg1_cItem_0_bItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "b", "Ljava/lang/Boolean;", arg1_cItem_0_bItem_1); + request.arg1.c.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_cItem_0_bItem_1)); + jobject arg1_cItem_0_cItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "c", "Ljava/lang/Integer;", arg1_cItem_0_cItem_1); + request.arg1.c.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_cItem_1)); + jobject arg1_cItem_0_dItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "d", "[B", arg1_cItem_0_dItem_1); + auto arg1_cItem_0_dItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_dItem_1)); + cleanupByteArrays.push_back(arg1_cItem_0_dItem_1Jni); + request.arg1.c.d = arg1_cItem_0_dItem_1Jni->byteSpan(); + jobject arg1_cItem_0_eItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "e", "Ljava/lang/String;", arg1_cItem_0_eItem_1); + auto arg1_cItem_0_eItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_eItem_1)); + cleanupStrings.push_back(arg1_cItem_0_eItem_1Jni); + request.arg1.c.e = arg1_cItem_0_eItem_1Jni->charSpan(); + jobject arg1_cItem_0_fItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "f", "Ljava/lang/Integer;", arg1_cItem_0_fItem_1); + request.arg1.c.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_fItem_1)); + jobject arg1_cItem_0_gItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "g", "Ljava/lang/Float;", arg1_cItem_0_gItem_1); + request.arg1.c.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(arg1_cItem_0_gItem_1)); + jobject arg1_cItem_0_hItem_1; + chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "h", "Ljava/lang/Double;", arg1_cItem_0_hItem_1); + request.arg1.c.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(arg1_cItem_0_hItem_1)); + jobject arg1_dItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "d", "Ljava/util/ArrayList;", arg1_dItem_0); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + jint arg1_dItem_0Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1_dItem_0, arg1_dItem_0Size); + if (arg1_dItem_0Size != 0) + { + auto * listHolder_1 = new ListHolder(arg1_dItem_0Size); + listFreer.add(listHolder_1); + + for (size_t i_1 = 0; i_1 < static_cast(arg1_dItem_0Size); ++i_1) + { + jobject element_1; + chip::JniReferences::GetInstance().GetArrayListItem(arg1_dItem_0, i_1, element_1); + jobject element_1_aItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "a", "Ljava/lang/Integer;", element_1_aItem_2); + listHolder_1->mList[i_1].a = static_castmList[i_1].a)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_1_aItem_2)); + jobject element_1_bItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "b", "Ljava/lang/Boolean;", element_1_bItem_2); + listHolder_1->mList[i_1].b = static_castmList[i_1].b)>>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_1_bItem_2)); + jobject element_1_cItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "c", "Ljava/lang/Integer;", element_1_cItem_2); + listHolder_1->mList[i_1].c = static_castmList[i_1].c)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_1_cItem_2)); + jobject element_1_dItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "d", "[B", element_1_dItem_2); + auto element_1_dItem_2Jni = + chip::Platform::New(env, static_cast(element_1_dItem_2)); + cleanupByteArrays.push_back(element_1_dItem_2Jni); + listHolder_1->mList[i_1].d = element_1_dItem_2Jni->byteSpan(); + jobject element_1_eItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "e", "Ljava/lang/String;", element_1_eItem_2); + auto element_1_eItem_2Jni = chip::Platform::New(env, static_cast(element_1_eItem_2)); + cleanupStrings.push_back(element_1_eItem_2Jni); + listHolder_1->mList[i_1].e = element_1_eItem_2Jni->charSpan(); + jobject element_1_fItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "f", "Ljava/lang/Integer;", element_1_fItem_2); + listHolder_1->mList[i_1].f = static_castmList[i_1].f)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_1_fItem_2)); + jobject element_1_gItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "g", "Ljava/lang/Float;", element_1_gItem_2); + listHolder_1->mList[i_1].g = static_castmList[i_1].g)>>( + chip::JniReferences::GetInstance().FloatToPrimitive(element_1_gItem_2)); + jobject element_1_hItem_2; + chip::JniReferences::GetInstance().GetObjectField(element_1, "h", "Ljava/lang/Double;", element_1_hItem_2); + listHolder_1->mList[i_1].h = static_castmList[i_1].h)>>( + chip::JniReferences::GetInstance().DoubleToPrimitive(element_1_hItem_2)); + } + request.arg1.d = ListType_1(listHolder_1->mList, arg1_dItem_0Size); + } + else + { + request.arg1.d = ListType_1(); + } + } + jobject arg1_eItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "e", "Ljava/util/ArrayList;", arg1_eItem_0); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + jint arg1_eItem_0Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1_eItem_0, arg1_eItem_0Size); + if (arg1_eItem_0Size != 0) + { + auto * listHolder_1 = new ListHolder(arg1_eItem_0Size); + listFreer.add(listHolder_1); + + for (size_t i_1 = 0; i_1 < static_cast(arg1_eItem_0Size); ++i_1) + { + jobject element_1; + chip::JniReferences::GetInstance().GetArrayListItem(arg1_eItem_0, i_1, element_1); + listHolder_1->mList[i_1] = static_castmList[i_1])>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_1)); + } + request.arg1.e = ListType_1(listHolder_1->mList, arg1_eItem_0Size); + } + else + { + request.arg1.e = ListType_1(); + } + } + jobject arg1_fItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "f", "Ljava/util/ArrayList;", arg1_fItem_0); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + jint arg1_fItem_0Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1_fItem_0, arg1_fItem_0Size); + if (arg1_fItem_0Size != 0) + { + auto * listHolder_1 = new ListHolder(arg1_fItem_0Size); + listFreer.add(listHolder_1); + + for (size_t i_1 = 0; i_1 < static_cast(arg1_fItem_0Size); ++i_1) + { + jobject element_1; + chip::JniReferences::GetInstance().GetArrayListItem(arg1_fItem_0, i_1, element_1); + auto element_1Jni = chip::Platform::New(env, static_cast(element_1)); + cleanupByteArrays.push_back(element_1Jni); + listHolder_1->mList[i_1] = element_1Jni->byteSpan(); + } + request.arg1.f = ListType_1(listHolder_1->mList, arg1_fItem_0Size); + } + else + { + request.arg1.f = ListType_1(); + } + } + jobject arg1_gItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "g", "Ljava/util/ArrayList;", arg1_gItem_0); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + jint arg1_gItem_0Size; + chip::JniReferences::GetInstance().GetArrayListSize(arg1_gItem_0, arg1_gItem_0Size); + if (arg1_gItem_0Size != 0) + { + auto * listHolder_1 = new ListHolder(arg1_gItem_0Size); + listFreer.add(listHolder_1); + + for (size_t i_1 = 0; i_1 < static_cast(arg1_gItem_0Size); ++i_1) + { + jobject element_1; + chip::JniReferences::GetInstance().GetArrayListItem(arg1_gItem_0, i_1, element_1); + listHolder_1->mList[i_1] = static_castmList[i_1])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_1)); + } + request.arg1.g = ListType_1(listHolder_1->mList, arg1_gItem_0Size); + } + else + { + request.arg1.g = ListType_1(); + } + } std::unique_ptr onSuccess(Platform::New(callback), @@ -19500,6 +25346,11 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19510,8 +25361,12 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -19544,6 +25399,11 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19554,16 +25414,27 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; - chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); - uint8_t arg1Value; + std::list cleanupByteArrays; + std::list cleanupStrings; if (arg1 != nullptr) { - arg1Value = chip::JniReferences::GetInstance().IntegerToPrimitive(arg1); + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(arg1, optionalValue_0); + auto & definedValue_0 = request.arg1.Emplace(); + if (optionalValue_0 == nullptr) + { + definedValue_0.SetNull(); + } + else + { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_0)); + } } - request.arg1 = chip::Optional>( - arg1 == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(arg1Value)); std::unique_ptr @@ -19600,6 +25471,11 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19610,11 +25486,19 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; - chip::JniReferences::GetInstance().GetOptionalValue(arg1, arg1); - request.arg1 = - chip::Optional(static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(arg1))); + std::list cleanupByteArrays; + std::list cleanupStrings; + if (arg1 != nullptr) + { + jobject optionalValue_0; + chip::JniReferences::GetInstance().GetOptionalValue(arg1, optionalValue_0); + auto & definedValue_0 = request.arg1.Emplace(); + definedValue_0 = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_0)); + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -19648,6 +25532,11 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19658,8 +25547,12 @@ JNI_METHOD(void, TestClusterCluster, testSpecific) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestSpecific::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), @@ -19695,20 +25588,60 @@ JNI_METHOD(void, TestClusterCluster, testSpecific) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, - jobject f, jobject g, jobject h, jobject timedInvokeTimeoutMs) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject arg1, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type request; - request.arg1 = chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type(); + std::list cleanupByteArrays; + std::list cleanupStrings; + jobject arg1_aItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); + request.arg1.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_aItem_0)); + jobject arg1_bItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "b", "Ljava/lang/Boolean;", arg1_bItem_0); + request.arg1.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(arg1_bItem_0)); + jobject arg1_cItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "c", "Ljava/lang/Integer;", arg1_cItem_0); + request.arg1.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0)); + jobject arg1_dItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "d", "[B", arg1_dItem_0); + auto arg1_dItem_0Jni = chip::Platform::New(env, static_cast(arg1_dItem_0)); + cleanupByteArrays.push_back(arg1_dItem_0Jni); + request.arg1.d = arg1_dItem_0Jni->byteSpan(); + jobject arg1_eItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "e", "Ljava/lang/String;", arg1_eItem_0); + auto arg1_eItem_0Jni = chip::Platform::New(env, static_cast(arg1_eItem_0)); + cleanupStrings.push_back(arg1_eItem_0Jni); + request.arg1.e = arg1_eItem_0Jni->charSpan(); + jobject arg1_fItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "f", "Ljava/lang/Integer;", arg1_fItem_0); + request.arg1.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_fItem_0)); + jobject arg1_gItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "g", "Ljava/lang/Float;", arg1_gItem_0); + request.arg1.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(arg1_gItem_0)); + jobject arg1_hItem_0; + chip::JniReferences::GetInstance().GetObjectField(arg1, "h", "Ljava/lang/Double;", arg1_hItem_0); + request.arg1.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(arg1_hItem_0)); std::unique_ptr onSuccess(Platform::New(callback), @@ -19744,6 +25677,11 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19754,8 +25692,12 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -19788,6 +25730,11 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -19798,8 +25745,12 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) CHIP_ERROR err = CHIP_NO_ERROR; TestClusterCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -19825,6 +25776,11 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -20790,6 +26746,121 @@ JNI_METHOD(void, TestClusterCluster, subscribeOctetStringAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, subscribeListInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterListInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TestClusterCluster, subscribeListOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterListOctetStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TestClusterCluster, subscribeListStructOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPTestClusterListStructOctetStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, subscribeLongOctetStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -21013,6 +27084,47 @@ JNI_METHOD(void, TestClusterCluster, subscribeVendorIdAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, subscribeListNullablesAndOptionalsStructAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, subscribeEnumAttrAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -21198,6 +27310,45 @@ JNI_METHOD(void, TestClusterCluster, subscribeRangeRestrictedInt16sAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, subscribeListLongOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterListLongOctetStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, subscribeTimedWriteBooleanAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -22504,6 +28655,44 @@ JNI_METHOD(void, TestClusterCluster, subscribeNullableRangeRestrictedInt16sAttri onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPTestClusterAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -22557,8 +28746,12 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) CHIP_ERROR err = CHIP_NO_ERROR; ThermostatCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -22591,6 +28784,11 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -22601,8 +28799,12 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) CHIP_ERROR err = CHIP_NO_ERROR; ThermostatCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess(Platform::New(callback), @@ -22638,6 +28840,11 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -22649,12 +28856,15 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) CHIP_ERROR err = CHIP_NO_ERROR; ThermostatCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type request; - request.daysToReturn = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(daysToReturn)); - request.modeToReturn = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeToReturn)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.daysToReturn = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(daysToReturn)); + request.modeToReturn = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(modeToReturn)); std::unique_ptr @@ -22691,6 +28901,11 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -22702,15 +28917,41 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) CHIP_ERROR err = CHIP_NO_ERROR; ThermostatCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type request; - request.numberOfTransitionsForSequence = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.numberOfTransitionsForSequence = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(numberOfTransitionsForSequence)); - request.dayOfWeekForSequence = static_cast( + request.dayOfWeekForSequence = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(dayOfWeekForSequence)); - request.modeForSequence = - static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(modeForSequence)); - request.payload = chip::app::DataModel::List(); + request.modeForSequence = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(modeForSequence)); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint payloadSize; + chip::JniReferences::GetInstance().GetArrayListSize(payload, payloadSize); + if (payloadSize != 0) + { + auto * listHolder_0 = new ListHolder(payloadSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(payloadSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(payload, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + request.payload = ListType_0(listHolder_0->mList, payloadSize); + } + else + { + request.payload = ListType_0(); + } + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -22744,6 +28985,11 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -22754,10 +29000,15 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) CHIP_ERROR err = CHIP_NO_ERROR; ThermostatCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type request; - request.mode = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(mode)); - request.amount = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(amount)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.mode = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(mode)); + request.amount = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(amount)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -22791,6 +29042,11 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -23415,7 +29671,45 @@ JNI_METHOD(void, ThermostatCluster, subscribeNumberOfDailyTransitionsAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThermostatCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPThermostatAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -23624,6 +29918,48 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeScheduleP onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatUserInterfaceConfigurationCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -23678,8 +30014,12 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) CHIP_ERROR err = CHIP_NO_ERROR; ThreadNetworkDiagnosticsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -23712,6 +30052,11 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -23976,6 +30321,87 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeOverrunCountAttribute onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeNeighborTableListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRouteTableListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribePartitionIdAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -25469,7 +31895,159 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDestAddrFilteredCou using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDuplicatedCountAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrNoFrameCountAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrUnknownNeighborCountAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrInvalidSrcAddrCountAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThreadNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -25483,7 +32061,7 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDestAddrFilteredCou onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDuplicatedCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrSecCountAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -25505,9 +32083,9 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDuplicatedCountAttr chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -25521,7 +32099,7 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxDuplicatedCountAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrNoFrameCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrFcsCountAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -25543,9 +32121,9 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrNoFrameCountAttr chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -25559,7 +32137,7 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrNoFrameCountAttr onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrUnknownNeighborCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrOtherCountAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -25581,9 +32159,9 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrUnknownNeighborC chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); @@ -25597,12 +32175,12 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrUnknownNeighborC onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrInvalidSrcAddrCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeActiveTimestampAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25619,15 +32197,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrInvalidSrcAddrCo chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25635,12 +32213,12 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrInvalidSrcAddrCo onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrSecCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribePendingTimestampAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25657,15 +32235,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrSecCountAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + CHIPInt64uAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25673,7 +32251,7 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrSecCountAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrFcsCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeDelayAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; @@ -25695,10 +32273,9 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrFcsCountAttribut chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, @@ -25711,12 +32288,14 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrFcsCountAttribut onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrOtherCountAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeSecurityPolicyAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25733,15 +32312,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrOtherCountAttrib chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; auto successFn = - chip::Callback::Callback::FromCancelable( + chip::Callback::Callback::FromCancelable( onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25749,12 +32328,12 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeRxErrOtherCountAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeActiveTimestampAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeChannelMaskAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25771,15 +32350,14 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeActiveTimestampAttrib chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25787,12 +32365,14 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeActiveTimestampAttrib onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribePendingTimestampAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeOperationalDatasetComponentsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25809,15 +32389,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribePendingTimestampAttri chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - auto successFn = - chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + auto successFn = chip::Callback::Callback< + CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponentsAttributeCallbackType>::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt64uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25825,12 +32405,14 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribePendingTimestampAttri onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeDelayAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeActiveNetworkFaultsListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25847,14 +32429,16 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeDelayAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPInt32uAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25862,12 +32446,14 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeDelayAttribute) onSuccess.release(); onFailure.release(); } -JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeChannelMaskAttribute) +JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeAttributeListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -25884,14 +32470,15 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, subscribeChannelMaskAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable( - onSuccess->Cancel()); + using TypeInfo = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, - static_cast(minInterval), static_cast(maxInterval), - CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); @@ -25992,6 +32579,44 @@ JNI_METHOD(jlong, UserLabelCluster, initWithDevice)(JNIEnv * env, jobject self, return reinterpret_cast(cppCluster); } +JNI_METHOD(void, UserLabelCluster, subscribeLabelListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + UserLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPUserLabelLabelListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, UserLabelCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -26075,6 +32700,44 @@ JNI_METHOD(void, WakeOnLanCluster, subscribeWakeOnLanMacAddressAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, WakeOnLanCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + WakeOnLanCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPWakeOnLanAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, WakeOnLanCluster, subscribeClusterRevisionAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -26128,8 +32791,12 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) CHIP_ERROR err = CHIP_NO_ERROR; WiFiNetworkDiagnosticsCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -26162,6 +32829,11 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26651,6 +33323,45 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeOverrunCountAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + WiFiNetworkDiagnosticsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -26742,8 +33453,12 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -26776,6 +33491,11 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26787,11 +33507,14 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type request; - request.liftPercentageValue = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.liftPercentageValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(liftPercentageValue)); - request.liftPercent100thsValue = static_cast( + request.liftPercent100thsValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(liftPercent100thsValue)); std::unique_ptr onSuccess( @@ -26826,6 +33549,11 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26836,9 +33564,13 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type request; - request.liftValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(liftValue)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.liftValue = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(liftValue)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -26872,6 +33604,11 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26883,11 +33620,14 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type request; - request.tiltPercentageValue = static_cast( + std::list cleanupByteArrays; + std::list cleanupStrings; + request.tiltPercentageValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(tiltPercentageValue)); - request.tiltPercent100thsValue = static_cast( + request.tiltPercent100thsValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(tiltPercent100thsValue)); std::unique_ptr onSuccess( @@ -26922,6 +33662,11 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26932,9 +33677,13 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type request; - request.tiltValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(tiltValue)); + std::list cleanupByteArrays; + std::list cleanupStrings; + request.tiltValue = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(tiltValue)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -26968,6 +33717,11 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -26978,8 +33732,12 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::StopMotion::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -27012,6 +33770,11 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -27022,8 +33785,12 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen) CHIP_ERROR err = CHIP_NO_ERROR; WindowCoveringCluster * cppCluster; + ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type request; + std::list cleanupByteArrays; + std::list cleanupStrings; + std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); std::unique_ptr onFailure( @@ -27056,6 +33823,11 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -27755,6 +34527,44 @@ JNI_METHOD(void, WindowCoveringCluster, subscribeSafetyStatusAttribute) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, WindowCoveringCluster, subscribeAttributeListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + WindowCoveringCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPWindowCoveringAttributeListAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, WindowCoveringCluster, subscribeFeatureMapAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index c54feb733f5e19..31fb89287a36ef 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -40,14 +41,311 @@ using namespace chip; using namespace chip::Controller; +JNI_METHOD(void, AccessControlCluster, writeAclAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_fabricIndexItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", + element_0_fabricIndexItem_1); + listHolder_0->mList[i_0].fabricIndex = + static_castmList[i_0].fabricIndex)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); + jobject element_0_privilegeItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "privilege", "Ljava/lang/Integer;", + element_0_privilegeItem_1); + listHolder_0->mList[i_0].privilege = + static_castmList[i_0].privilege)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_privilegeItem_1)); + jobject element_0_authModeItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "authMode", "Ljava/lang/Integer;", + element_0_authModeItem_1); + listHolder_0->mList[i_0].authMode = + static_castmList[i_0].authMode)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_authModeItem_1)); + jobject element_0_subjectsItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "subjects", "Ljava/util/ArrayList;", + element_0_subjectsItem_1); + if (element_0_subjectsItem_1 == nullptr) + { + listHolder_0->mList[i_0].subjects.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + jint element_0_subjectsItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_subjectsItem_1, element_0_subjectsItem_1Size); + if (element_0_subjectsItem_1Size != 0) + { + auto * listHolder_3 = new ListHolder(element_0_subjectsItem_1Size); + listFreer.add(listHolder_3); + + for (size_t i_3 = 0; i_3 < static_cast(element_0_subjectsItem_1Size); ++i_3) + { + jobject element_3; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_subjectsItem_1, i_3, element_3); + listHolder_3->mList[i_3] = static_castmList[i_3])>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_3)); + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_subjectsItem_1Size); + } + else + { + nonNullValue_2 = ListType_3(); + } + } + } + jobject element_0_targetsItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "targets", "Ljava/util/ArrayList;", + element_0_targetsItem_1); + if (element_0_targetsItem_1 == nullptr) + { + listHolder_0->mList[i_0].targets.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + jint element_0_targetsItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_targetsItem_1, element_0_targetsItem_1Size); + if (element_0_targetsItem_1Size != 0) + { + auto * listHolder_3 = new ListHolder(element_0_targetsItem_1Size); + listFreer.add(listHolder_3); + + for (size_t i_3 = 0; i_3 < static_cast(element_0_targetsItem_1Size); ++i_3) + { + jobject element_3; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_targetsItem_1, i_3, element_3); + jobject element_3_clusterItem_4; + chip::JniReferences::GetInstance().GetObjectField(element_3, "cluster", "Ljava/lang/Long;", + element_3_clusterItem_4); + if (element_3_clusterItem_4 == nullptr) + { + listHolder_3->mList[i_3].cluster.SetNull(); + } + else + { + auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); + nonNullValue_5 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(element_3_clusterItem_4)); + } + jobject element_3_endpointItem_4; + chip::JniReferences::GetInstance().GetObjectField(element_3, "endpoint", "Ljava/lang/Integer;", + element_3_endpointItem_4); + if (element_3_endpointItem_4 == nullptr) + { + listHolder_3->mList[i_3].endpoint.SetNull(); + } + else + { + auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); + nonNullValue_5 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_3_endpointItem_4)); + } + jobject element_3_deviceTypeItem_4; + chip::JniReferences::GetInstance().GetObjectField(element_3, "deviceType", "Ljava/lang/Long;", + element_3_deviceTypeItem_4); + if (element_3_deviceTypeItem_4 == nullptr) + { + listHolder_3->mList[i_3].deviceType.SetNull(); + } + else + { + auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); + nonNullValue_5 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(element_3_deviceTypeItem_4)); + } + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_targetsItem_1Size); + } + else + { + nonNullValue_2 = ListType_3(); + } + } + } + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, AccessControlCluster, writeExtensionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_fabricIndexItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", + element_0_fabricIndexItem_1); + listHolder_0->mList[i_0].fabricIndex = + static_castmList[i_0].fabricIndex)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); + jobject element_0_dataItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "data", "[B", element_0_dataItem_1); + auto element_0_dataItem_1Jni = + chip::Platform::New(env, static_cast(element_0_dataItem_1)); + cleanupByteArrays.push_back(element_0_dataItem_1Jni); + listHolder_0->mList[i_0].data = element_0_dataItem_1Jni->byteSpan(); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + AccessControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -83,6 +381,11 @@ JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -91,10 +394,16 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -130,6 +439,11 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -138,10 +452,15 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -177,6 +496,11 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -185,10 +509,15 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -224,6 +553,11 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -232,10 +566,15 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -271,6 +610,11 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -279,10 +623,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -318,6 +667,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -326,10 +680,15 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -365,6 +724,11 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -373,10 +737,15 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -412,6 +781,11 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -420,10 +794,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -459,6 +838,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -467,10 +851,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -506,6 +895,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -514,10 +908,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -553,6 +952,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -561,10 +965,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -600,6 +1009,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -608,10 +1022,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -647,6 +1066,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -655,10 +1079,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -694,6 +1123,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -702,10 +1136,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -741,6 +1180,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -749,10 +1193,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -788,6 +1237,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -796,10 +1250,15 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -835,6 +1294,11 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -843,10 +1307,15 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -882,6 +1351,11 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -890,10 +1364,14 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -929,6 +1407,11 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -937,10 +1420,16 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -976,6 +1465,11 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -984,10 +1478,14 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1023,6 +1521,11 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1031,10 +1534,15 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1070,6 +1578,11 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1078,10 +1591,15 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1117,6 +1635,11 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1125,10 +1648,15 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1164,6 +1692,11 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1172,10 +1705,15 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1211,6 +1749,11 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1219,10 +1762,15 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1258,6 +1806,11 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1266,10 +1819,14 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1305,6 +1862,11 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1313,10 +1875,15 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1352,6 +1919,11 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1360,10 +1932,15 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1399,6 +1976,11 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1407,10 +1989,15 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1446,6 +2033,11 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1454,15 +2046,23 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1498,6 +2098,11 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1506,15 +2111,23 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1550,6 +2163,11 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1558,15 +2176,23 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1602,6 +2228,11 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1610,15 +2241,23 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1654,6 +2293,11 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1662,15 +2306,23 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1706,6 +2358,11 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1714,10 +2371,16 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1753,6 +2416,11 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1761,10 +2429,15 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1800,6 +2473,11 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1808,10 +2486,15 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1847,6 +2530,106 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOtaProvidersAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_fabricIndexItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Integer;", + element_0_fabricIndexItem_1); + listHolder_0->mList[i_0].fabricIndex = + static_castmList[i_0].fabricIndex)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); + jobject element_0_providerNodeIDItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "providerNodeID", "Ljava/lang/Long;", + element_0_providerNodeIDItem_1); + listHolder_0->mList[i_0].providerNodeID = + static_castmList[i_0].providerNodeID)>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_0_providerNodeIDItem_1)); + jobject element_0_endpointItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "endpoint", "Ljava/lang/Integer;", + element_0_endpointItem_1); + listHolder_0->mList[i_0].endpoint = + static_castmList[i_0].endpoint)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_endpointItem_1)); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OtaSoftwareUpdateRequestorCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1855,10 +2638,15 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1894,6 +2682,11 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1902,10 +2695,15 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1941,6 +2739,11 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1949,10 +2752,15 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1988,6 +2796,11 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -1996,10 +2809,15 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2035,6 +2853,11 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2043,15 +2866,23 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - uint32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2087,6 +2918,11 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2095,15 +2931,23 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::Type cppValue; - uint32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2139,6 +2983,11 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2147,10 +2996,15 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2186,6 +3040,11 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2194,10 +3053,15 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2233,6 +3097,11 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2241,10 +3110,15 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2280,6 +3154,11 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2288,10 +3167,15 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2327,6 +3211,11 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2335,10 +3224,15 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2374,6 +3268,11 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2382,10 +3281,14 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2421,6 +3324,11 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2429,10 +3337,14 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2468,6 +3380,11 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2476,10 +3393,15 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2515,6 +3437,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2523,10 +3450,15 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2562,6 +3494,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2570,10 +3507,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2609,6 +3550,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2617,10 +3563,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2656,6 +3606,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2664,10 +3619,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2703,6 +3662,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2711,10 +3675,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2750,6 +3718,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2758,10 +3731,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2797,6 +3774,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2805,10 +3787,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2844,6 +3830,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2852,10 +3843,15 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2891,6 +3887,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2899,10 +3900,15 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2938,6 +3944,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2946,10 +3957,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2985,6 +4000,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -2993,10 +4013,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3032,6 +4056,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3040,10 +4069,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3079,6 +4112,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3087,10 +4125,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3126,6 +4168,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3134,10 +4181,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3173,6 +4224,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3181,10 +4237,14 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3220,6 +4280,11 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3228,10 +4293,15 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3267,6 +4337,11 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3275,10 +4350,15 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3314,6 +4394,11 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3322,10 +4407,14 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().FloatToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().FloatToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3361,6 +4450,11 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3369,10 +4463,15 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().DoubleToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().DoubleToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3408,6 +4507,11 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3416,10 +4520,265 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniByteArray(env, static_cast(value)).byteSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupByteArrays.push_back(valueJni); + cppValue = valueJni->byteSpan(); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeListInt8uAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListInt8u::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0)); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeListOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListOctetString::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + auto element_0Jni = chip::Platform::New(env, static_cast(element_0)); + cleanupByteArrays.push_back(element_0Jni); + listHolder_0->mList[i_0] = element_0Jni->byteSpan(); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeListStructOctetStringAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_fabricIndexItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "fabricIndex", "Ljava/lang/Long;", + element_0_fabricIndexItem_1); + listHolder_0->mList[i_0].fabricIndex = + static_castmList[i_0].fabricIndex)>>( + chip::JniReferences::GetInstance().LongToPrimitive(element_0_fabricIndexItem_1)); + jobject element_0_operationalCertItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "operationalCert", "[B", + element_0_operationalCertItem_1); + auto element_0_operationalCertItem_1Jni = + chip::Platform::New(env, static_cast(element_0_operationalCertItem_1)); + cleanupByteArrays.push_back(element_0_operationalCertItem_1Jni); + listHolder_0->mList[i_0].operationalCert = element_0_operationalCertItem_1Jni->byteSpan(); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3455,6 +4814,11 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3463,10 +4827,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniByteArray(env, static_cast(value)).byteSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupByteArrays.push_back(valueJni); + cppValue = valueJni->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3502,6 +4872,11 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3510,10 +4885,16 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3549,6 +4930,11 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3557,10 +4943,16 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; TypeInfo::Type cppValue; - cppValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + cppValue = valueJni->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3596,6 +4988,11 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3604,10 +5001,14 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3643,6 +5044,11 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3651,10 +5057,14 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3690,6 +5100,11 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3698,10 +5113,462 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_nullableIntItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableInt", "Ljava/lang/Integer;", + element_0_nullableIntItem_1); + if (element_0_nullableIntItem_1 == nullptr) + { + listHolder_0->mList[i_0].nullableInt.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); + nonNullValue_2 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableIntItem_1)); + } + jobject element_0_optionalIntItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalInt", "Ljava/util/Optional;", + element_0_optionalIntItem_1); + if (element_0_optionalIntItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalIntItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); + definedValue_2 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); + } + jobject element_0_nullableOptionalIntItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalInt", "Ljava/util/Optional;", + element_0_nullableOptionalIntItem_1); + if (element_0_nullableOptionalIntItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalIntItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); + } + } + jobject element_0_nullableStringItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableString", "Ljava/lang/String;", + element_0_nullableStringItem_1); + if (element_0_nullableStringItem_1 == nullptr) + { + listHolder_0->mList[i_0].nullableString.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); + auto element_0_nullableStringItem_1Jni = + chip::Platform::New(env, static_cast(element_0_nullableStringItem_1)); + cleanupStrings.push_back(element_0_nullableStringItem_1Jni); + nonNullValue_2 = element_0_nullableStringItem_1Jni->charSpan(); + } + jobject element_0_optionalStringItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalString", "Ljava/util/Optional;", + element_0_optionalStringItem_1); + if (element_0_optionalStringItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalStringItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); + auto optionalValue_2Jni = chip::Platform::New(env, static_cast(optionalValue_2)); + cleanupStrings.push_back(optionalValue_2Jni); + definedValue_2 = optionalValue_2Jni->charSpan(); + } + jobject element_0_nullableOptionalStringItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalString", "Ljava/util/Optional;", + element_0_nullableOptionalStringItem_1); + if (element_0_nullableOptionalStringItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalStringItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + auto optionalValue_2Jni = + chip::Platform::New(env, static_cast(optionalValue_2)); + cleanupStrings.push_back(optionalValue_2Jni); + nonNullValue_3 = optionalValue_2Jni->charSpan(); + } + } + jobject element_0_nullableStructItem_1; + chip::JniReferences::GetInstance().GetObjectField( + element_0, "nullableStruct", "Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;", + element_0_nullableStructItem_1); + if (element_0_nullableStructItem_1 == nullptr) + { + listHolder_0->mList[i_0].nullableStruct.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); + jobject element_0_nullableStructItem_1_aItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "a", "Ljava/lang/Integer;", + element_0_nullableStructItem_1_aItem_3); + nonNullValue_2.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_aItem_3)); + jobject element_0_nullableStructItem_1_bItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "b", "Ljava/lang/Boolean;", + element_0_nullableStructItem_1_bItem_3); + nonNullValue_2.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_nullableStructItem_1_bItem_3)); + jobject element_0_nullableStructItem_1_cItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "c", "Ljava/lang/Integer;", + element_0_nullableStructItem_1_cItem_3); + nonNullValue_2.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_cItem_3)); + jobject element_0_nullableStructItem_1_dItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "d", "[B", + element_0_nullableStructItem_1_dItem_3); + auto element_0_nullableStructItem_1_dItem_3Jni = chip::Platform::New( + env, static_cast(element_0_nullableStructItem_1_dItem_3)); + cleanupByteArrays.push_back(element_0_nullableStructItem_1_dItem_3Jni); + nonNullValue_2.d = element_0_nullableStructItem_1_dItem_3Jni->byteSpan(); + jobject element_0_nullableStructItem_1_eItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "e", "Ljava/lang/String;", + element_0_nullableStructItem_1_eItem_3); + auto element_0_nullableStructItem_1_eItem_3Jni = + chip::Platform::New(env, static_cast(element_0_nullableStructItem_1_eItem_3)); + cleanupStrings.push_back(element_0_nullableStructItem_1_eItem_3Jni); + nonNullValue_2.e = element_0_nullableStructItem_1_eItem_3Jni->charSpan(); + jobject element_0_nullableStructItem_1_fItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "f", "Ljava/lang/Integer;", + element_0_nullableStructItem_1_fItem_3); + nonNullValue_2.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_nullableStructItem_1_fItem_3)); + jobject element_0_nullableStructItem_1_gItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "g", "Ljava/lang/Float;", + element_0_nullableStructItem_1_gItem_3); + nonNullValue_2.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(element_0_nullableStructItem_1_gItem_3)); + jobject element_0_nullableStructItem_1_hItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "h", "Ljava/lang/Double;", + element_0_nullableStructItem_1_hItem_3); + nonNullValue_2.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(element_0_nullableStructItem_1_hItem_3)); + } + jobject element_0_optionalStructItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalStruct", "Ljava/util/Optional;", + element_0_optionalStructItem_1); + if (element_0_optionalStructItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalStructItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); + jobject optionalValue_2_aItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "a", "Ljava/lang/Integer;", + optionalValue_2_aItem_3); + definedValue_2.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_aItem_3)); + jobject optionalValue_2_bItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "b", "Ljava/lang/Boolean;", + optionalValue_2_bItem_3); + definedValue_2.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2_bItem_3)); + jobject optionalValue_2_cItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "c", "Ljava/lang/Integer;", + optionalValue_2_cItem_3); + definedValue_2.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_3)); + jobject optionalValue_2_dItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_3); + auto optionalValue_2_dItem_3Jni = + chip::Platform::New(env, static_cast(optionalValue_2_dItem_3)); + cleanupByteArrays.push_back(optionalValue_2_dItem_3Jni); + definedValue_2.d = optionalValue_2_dItem_3Jni->byteSpan(); + jobject optionalValue_2_eItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", + optionalValue_2_eItem_3); + auto optionalValue_2_eItem_3Jni = + chip::Platform::New(env, static_cast(optionalValue_2_eItem_3)); + cleanupStrings.push_back(optionalValue_2_eItem_3Jni); + definedValue_2.e = optionalValue_2_eItem_3Jni->charSpan(); + jobject optionalValue_2_fItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", + optionalValue_2_fItem_3); + definedValue_2.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_fItem_3)); + jobject optionalValue_2_gItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "g", "Ljava/lang/Float;", + optionalValue_2_gItem_3); + definedValue_2.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(optionalValue_2_gItem_3)); + jobject optionalValue_2_hItem_3; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "h", "Ljava/lang/Double;", + optionalValue_2_hItem_3); + definedValue_2.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_2_hItem_3)); + } + jobject element_0_nullableOptionalStructItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalStruct", "Ljava/util/Optional;", + element_0_nullableOptionalStructItem_1); + if (element_0_nullableOptionalStructItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalStructItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + jobject optionalValue_2_aItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "a", "Ljava/lang/Integer;", + optionalValue_2_aItem_4); + nonNullValue_3.a = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_aItem_4)); + jobject optionalValue_2_bItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "b", "Ljava/lang/Boolean;", + optionalValue_2_bItem_4); + nonNullValue_3.b = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2_bItem_4)); + jobject optionalValue_2_cItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "c", "Ljava/lang/Integer;", + optionalValue_2_cItem_4); + nonNullValue_3.c = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_4)); + jobject optionalValue_2_dItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_4); + auto optionalValue_2_dItem_4Jni = + chip::Platform::New(env, static_cast(optionalValue_2_dItem_4)); + cleanupByteArrays.push_back(optionalValue_2_dItem_4Jni); + nonNullValue_3.d = optionalValue_2_dItem_4Jni->byteSpan(); + jobject optionalValue_2_eItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", + optionalValue_2_eItem_4); + auto optionalValue_2_eItem_4Jni = + chip::Platform::New(env, static_cast(optionalValue_2_eItem_4)); + cleanupStrings.push_back(optionalValue_2_eItem_4Jni); + nonNullValue_3.e = optionalValue_2_eItem_4Jni->charSpan(); + jobject optionalValue_2_fItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", + optionalValue_2_fItem_4); + nonNullValue_3.f = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_fItem_4)); + jobject optionalValue_2_gItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "g", "Ljava/lang/Float;", + optionalValue_2_gItem_4); + nonNullValue_3.g = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(optionalValue_2_gItem_4)); + jobject optionalValue_2_hItem_4; + chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "h", "Ljava/lang/Double;", + optionalValue_2_hItem_4); + nonNullValue_3.h = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(optionalValue_2_hItem_4)); + } + } + jobject element_0_nullableListItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableList", "Ljava/util/ArrayList;", + element_0_nullableListItem_1); + if (element_0_nullableListItem_1 == nullptr) + { + listHolder_0->mList[i_0].nullableList.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + jint element_0_nullableListItem_1Size; + chip::JniReferences::GetInstance().GetArrayListSize(element_0_nullableListItem_1, + element_0_nullableListItem_1Size); + if (element_0_nullableListItem_1Size != 0) + { + auto * listHolder_3 = new ListHolder(element_0_nullableListItem_1Size); + listFreer.add(listHolder_3); + + for (size_t i_3 = 0; i_3 < static_cast(element_0_nullableListItem_1Size); ++i_3) + { + jobject element_3; + chip::JniReferences::GetInstance().GetArrayListItem(element_0_nullableListItem_1, i_3, element_3); + listHolder_3->mList[i_3] = static_castmList[i_3])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_3)); + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0_nullableListItem_1Size); + } + else + { + nonNullValue_2 = ListType_3(); + } + } + } + jobject element_0_optionalListItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalList", "Ljava/util/Optional;", + element_0_optionalListItem_1); + if (element_0_optionalListItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalListItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + jint optionalValue_2Size; + chip::JniReferences::GetInstance().GetArrayListSize(optionalValue_2, optionalValue_2Size); + if (optionalValue_2Size != 0) + { + auto * listHolder_3 = new ListHolder(optionalValue_2Size); + listFreer.add(listHolder_3); + + for (size_t i_3 = 0; i_3 < static_cast(optionalValue_2Size); ++i_3) + { + jobject element_3; + chip::JniReferences::GetInstance().GetArrayListItem(optionalValue_2, i_3, element_3); + listHolder_3->mList[i_3] = static_castmList[i_3])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_3)); + } + definedValue_2 = ListType_3(listHolder_3->mList, optionalValue_2Size); + } + else + { + definedValue_2 = ListType_3(); + } + } + } + jobject element_0_nullableOptionalListItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalList", "Ljava/util/Optional;", + element_0_nullableOptionalListItem_1); + if (element_0_nullableOptionalListItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nullableOptionalListItem_1, optionalValue_2); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + jint optionalValue_2Size; + chip::JniReferences::GetInstance().GetArrayListSize(optionalValue_2, optionalValue_2Size); + if (optionalValue_2Size != 0) + { + auto * listHolder_4 = new ListHolder(optionalValue_2Size); + listFreer.add(listHolder_4); + + for (size_t i_4 = 0; i_4 < static_cast(optionalValue_2Size); ++i_4) + { + jobject element_4; + chip::JniReferences::GetInstance().GetArrayListItem(optionalValue_2, i_4, element_4); + listHolder_4->mList[i_4] = + static_castmList[i_4])>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_4)); + } + nonNullValue_3 = ListType_4(listHolder_4->mList, optionalValue_2Size); + } + else + { + nonNullValue_3 = ListType_4(); + } + } + } + } + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3737,6 +5604,11 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3745,10 +5617,15 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3784,6 +5661,11 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3792,10 +5674,15 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3831,6 +5718,11 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3839,10 +5731,15 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3878,6 +5775,11 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3886,10 +5788,15 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3925,6 +5832,11 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3933,10 +5845,15 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -3972,6 +5889,11 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -3980,10 +5902,15 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4012,6 +5939,11 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4020,10 +5952,15 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4059,6 +5996,11 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4067,15 +6009,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; TypeInfo::Type cppValue; - bool valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().BooleanToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4111,6 +6061,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4119,15 +6074,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4163,6 +6126,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4171,15 +6139,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4215,6 +6191,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4223,15 +6204,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; TypeInfo::Type cppValue; - uint32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4267,6 +6256,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4275,15 +6269,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; TypeInfo::Type cppValue; - uint64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4319,6 +6321,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4327,15 +6334,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4371,6 +6386,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4379,15 +6399,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4423,6 +6451,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4431,15 +6464,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; TypeInfo::Type cppValue; - uint32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4475,6 +6516,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4483,15 +6529,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; TypeInfo::Type cppValue; - uint32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4527,6 +6581,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4535,15 +6594,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; TypeInfo::Type cppValue; - uint64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4579,6 +6646,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4587,15 +6659,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; TypeInfo::Type cppValue; - uint64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4631,6 +6711,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4639,15 +6724,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; TypeInfo::Type cppValue; - uint64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4683,6 +6776,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4691,15 +6789,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; TypeInfo::Type cppValue; - uint64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4735,6 +6841,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4743,15 +6854,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; TypeInfo::Type cppValue; - int8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4787,6 +6906,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4795,15 +6919,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; TypeInfo::Type cppValue; - int16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4839,6 +6971,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4847,15 +6984,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; TypeInfo::Type cppValue; - int32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4891,6 +7036,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4899,15 +7049,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; TypeInfo::Type cppValue; - int32_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4943,6 +7101,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -4951,15 +7114,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; TypeInfo::Type cppValue; - int64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4995,6 +7166,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5003,15 +7179,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; TypeInfo::Type cppValue; - int64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5047,6 +7231,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5055,15 +7244,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; TypeInfo::Type cppValue; - int64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5099,6 +7296,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5107,15 +7309,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; TypeInfo::Type cppValue; - int64_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5151,6 +7361,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5159,15 +7374,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5203,6 +7426,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5211,15 +7439,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5255,6 +7491,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5263,15 +7504,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; TypeInfo::Type cppValue; - float valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().FloatToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().FloatToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5307,6 +7556,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5315,15 +7569,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; TypeInfo::Type cppValue; - double valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().DoubleToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().DoubleToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5359,6 +7621,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5367,16 +7634,24 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jbyteArray value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; TypeInfo::Type cppValue; - chip::ByteSpan valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniByteArray(env, static_cast(value)).byteSpan(); + auto & nonNullValue_0 = cppValue.SetNonNull(); + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupByteArrays.push_back(valueJni); + nonNullValue_0 = valueJni->byteSpan(); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5412,6 +7687,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5420,16 +7700,24 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jstring value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; TypeInfo::Type cppValue; - chip::CharSpan valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniUtfString(env, static_cast(value)).charSpan(); + auto & nonNullValue_0 = cppValue.SetNonNull(); + auto valueJni = chip::Platform::New(env, static_cast(value)); + cleanupStrings.push_back(valueJni); + nonNullValue_0 = valueJni->charSpan(); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5465,6 +7753,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5473,16 +7766,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; TypeInfo::Type cppValue; - decltype(cppValue)::UnderlyingType valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() - : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5518,6 +7818,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5526,15 +7831,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - uint8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5570,6 +7883,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5578,15 +7896,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - int8_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5622,6 +7948,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5630,15 +7961,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - uint16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5674,6 +8013,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5682,15 +8026,23 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - int16_t valueValue; - if (value != nullptr) + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else { - valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); } - cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5726,6 +8078,11 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5734,10 +8091,15 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5773,6 +8135,11 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5781,10 +8148,15 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5820,6 +8192,11 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5828,10 +8205,15 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5867,6 +8249,11 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5875,10 +8262,15 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5914,6 +8306,11 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5922,10 +8319,15 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -5961,6 +8363,11 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -5969,10 +8376,15 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6008,6 +8420,11 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6016,10 +8433,15 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6055,6 +8477,11 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6063,10 +8490,15 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6102,6 +8534,11 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6110,10 +8547,15 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6149,6 +8591,11 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6157,10 +8604,15 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6197,6 +8649,11 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6205,10 +8662,15 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6245,6 +8707,11 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6253,10 +8720,15 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6293,6 +8765,11 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6301,10 +8778,15 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeHourFormatAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6340,6 +8822,11 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeHourFormatAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6348,10 +8835,15 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeActiveCalendarTypeAttribute (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6387,6 +8879,100 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeActiveCalendarTypeAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::UserLabel::Attributes::LabelList::TypeInfo; + TypeInfo::Type cppValue; + + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetArrayListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (size_t i_0 = 0; i_0 < static_cast(valueSize); ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); + jobject element_0_labelItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "label", "Ljava/lang/String;", element_0_labelItem_1); + auto element_0_labelItem_1Jni = + chip::Platform::New(env, static_cast(element_0_labelItem_1)); + cleanupStrings.push_back(element_0_labelItem_1Jni); + listHolder_0->mList[i_0].label = element_0_labelItem_1Jni->charSpan(); + jobject element_0_valueItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "value", "Ljava/lang/String;", element_0_valueItem_1); + auto element_0_valueItem_1Jni = + chip::Platform::New(env, static_cast(element_0_valueItem_1)); + cleanupStrings.push_back(element_0_valueItem_1Jni); + listHolder_0->mList[i_0].value = element_0_valueItem_1Jni->charSpan(); + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + UserLabelCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } @@ -6395,10 +8981,15 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; + ListFreer listFreer; using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + std::vector cleanupByteArrays; + std::vector cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6434,6 +9025,11 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), + [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); + std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), + [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); + onSuccess.release(); onFailure.release(); } diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 0114899f78b617..cf56de473b7468 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -82,9 +82,7 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject setupPIN; - - chip::UtfString setupPINUtfString(env, dataResponse.setupPIN); - setupPIN = setupPINUtfString.jniValue(); + setupPIN = env->NewStringUTF(std::string(dataResponse.setupPIN.data(), dataResponse.setupPIN.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, setupPIN); } @@ -143,15 +141,12 @@ void CHIPApplicationLauncherClusterLauncherResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject data; - - chip::UtfString dataUtfString(env, dataResponse.data); - data = dataUtfString.jniValue(); + data = env->NewStringUTF(std::string(dataResponse.data.data(), dataResponse.data.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } @@ -203,18 +198,53 @@ void CHIPChannelClusterChangeChannelResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$ChannelClusterChannelInfo;Ljava/lang/Integer;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject channelMatch; - - channelMatch = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ + jobject channelMatch_majorNumber; + std::string channelMatch_majorNumberClassName = "java/lang/Integer"; + std::string channelMatch_majorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(channelMatch_majorNumberClassName.c_str(), + channelMatch_majorNumberCtorSignature.c_str(), + dataResponse.channelMatch.majorNumber, channelMatch_majorNumber); + jobject channelMatch_minorNumber; + std::string channelMatch_minorNumberClassName = "java/lang/Integer"; + std::string channelMatch_minorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(channelMatch_minorNumberClassName.c_str(), + channelMatch_minorNumberCtorSignature.c_str(), + dataResponse.channelMatch.minorNumber, channelMatch_minorNumber); + jobject channelMatch_name; + channelMatch_name = + env->NewStringUTF(std::string(dataResponse.channelMatch.name.data(), dataResponse.channelMatch.name.size()).c_str()); + jobject channelMatch_callSign; + channelMatch_callSign = env->NewStringUTF( + std::string(dataResponse.channelMatch.callSign.data(), dataResponse.channelMatch.callSign.size()).c_str()); + jobject channelMatch_affiliateCallSign; + channelMatch_affiliateCallSign = env->NewStringUTF( + std::string(dataResponse.channelMatch.affiliateCallSign.data(), dataResponse.channelMatch.affiliateCallSign.size()) + .c_str()); + + jclass channelInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", + channelInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfo")); + chip::JniClass structJniClass(channelInfoStructClass); + jmethodID channelInfoStructCtor = + env->GetMethodID(channelInfoStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(channelInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor")); + + channelMatch = env->NewObject(channelInfoStructClass, channelInfoStructCtor, channelMatch_majorNumber, channelMatch_minorNumber, + channelMatch_name, channelMatch_callSign, channelMatch_affiliateCallSign); jobject errorType; - std::string errorTypeClassName = "java/lang/Integer"; std::string errorTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - errorTypeClassName.c_str(), errorTypeCtorSignature.c_str(), dataResponse.errorType, errorType); + chip::JniReferences::GetInstance().CreateBoxedObject(errorTypeClassName.c_str(), errorTypeCtorSignature.c_str(), + static_cast(dataResponse.errorType), errorType); env->CallVoidMethod(javaCallbackRef, javaMethod, channelMatch, errorType); } @@ -271,15 +301,12 @@ void CHIPContentLauncherClusterLaunchResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject data; - - chip::UtfString dataUtfString(env, dataResponse.data); - data = dataUtfString.jniValue(); + data = env->NewStringUTF(std::string(dataResponse.data.data(), dataResponse.data.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } @@ -337,23 +364,21 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject content; - - chip::ByteArray contentByteArray(env, dataResponse.content); - content = contentByteArray.jniValue(); + jbyteArray contentByteArray = env->NewByteArray(static_cast(dataResponse.content.size())); + env->SetByteArrayRegion(contentByteArray, 0, static_cast(dataResponse.content.size()), + reinterpret_cast(dataResponse.content.data())); + content = contentByteArray; jobject timeStamp; - std::string timeStampClassName = "java/lang/Long"; std::string timeStampCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(timeStampClassName.c_str(), timeStampCtorSignature.c_str(), dataResponse.timeStamp, timeStamp); jobject timeSinceBoot; - std::string timeSinceBootClassName = "java/lang/Long"; std::string timeSinceBootCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject( @@ -416,24 +441,35 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject credentialExists; - std::string credentialExistsClassName = "java/lang/Boolean"; std::string credentialExistsCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject( credentialExistsClassName.c_str(), credentialExistsCtorSignature.c_str(), dataResponse.credentialExists, credentialExists); jobject userIndex; - - std::string userIndexClassName = "java/lang/Integer"; - std::string userIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), userIndex); + if (dataResponse.userIndex.IsNull()) + { + userIndex = nullptr; + } + else + { + std::string userIndexClassName = "java/lang/Integer"; + std::string userIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), + dataResponse.userIndex.Value(), userIndex); + } jobject nextCredentialIndex; - - std::string nextCredentialIndexClassName = "java/lang/Integer"; - std::string nextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(nextCredentialIndexClassName.c_str(), - nextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), nextCredentialIndex); + if (dataResponse.nextCredentialIndex.IsNull()) + { + nextCredentialIndex = nullptr; + } + else + { + std::string nextCredentialIndexClassName = "java/lang/Integer"; + std::string nextCredentialIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + nextCredentialIndexClassName.c_str(), nextCredentialIndexCtorSignature.c_str(), + dataResponse.nextCredentialIndex.Value(), nextCredentialIndex); + } env->CallVoidMethod(javaCallbackRef, javaMethod, credentialExists, userIndex, nextCredentialIndex); } @@ -487,64 +523,146 @@ void CHIPDoorLockClusterGetUserResponseCallback::CallbackFn( err = JniReferences::GetInstance().FindMethod( env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/" + "ArrayList;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject userIndex; - std::string userIndexClassName = "java/lang/Integer"; std::string userIndexCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), dataResponse.userIndex, userIndex); jobject userName; - - chip::UtfString userNameUtfString(env, dataResponse.userName.Value()); - userName = userNameUtfString.jniValue(); + if (dataResponse.userName.IsNull()) + { + userName = nullptr; + } + else + { + userName = + env->NewStringUTF(std::string(dataResponse.userName.Value().data(), dataResponse.userName.Value().size()).c_str()); + } jobject userUniqueId; - - std::string userUniqueIdClassName = "java/lang/Long"; - std::string userUniqueIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userUniqueIdClassName.c_str(), userUniqueIdCtorSignature.c_str(), - dataResponse.userUniqueId.Value(), userUniqueId); + if (dataResponse.userUniqueId.IsNull()) + { + userUniqueId = nullptr; + } + else + { + std::string userUniqueIdClassName = "java/lang/Long"; + std::string userUniqueIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + userUniqueIdClassName.c_str(), userUniqueIdCtorSignature.c_str(), dataResponse.userUniqueId.Value(), userUniqueId); + } jobject userStatus; - - std::string userStatusClassName = "java/lang/Integer"; - std::string userStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - userStatusClassName.c_str(), userStatusCtorSignature.c_str(), dataResponse.userStatus.Value(), userStatus); + if (dataResponse.userStatus.IsNull()) + { + userStatus = nullptr; + } + else + { + std::string userStatusClassName = "java/lang/Integer"; + std::string userStatusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(userStatusClassName.c_str(), userStatusCtorSignature.c_str(), + static_cast(dataResponse.userStatus.Value()), + userStatus); + } jobject userType; - - std::string userTypeClassName = "java/lang/Integer"; - std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType.Value(), userType); + if (dataResponse.userType.IsNull()) + { + userType = nullptr; + } + else + { + std::string userTypeClassName = "java/lang/Integer"; + std::string userTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), + static_cast(dataResponse.userType.Value()), + userType); + } jobject credentialRule; - - std::string credentialRuleClassName = "java/lang/Integer"; - std::string credentialRuleCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - credentialRuleClassName.c_str(), credentialRuleCtorSignature.c_str(), dataResponse.credentialRule.Value(), credentialRule); + if (dataResponse.credentialRule.IsNull()) + { + credentialRule = nullptr; + } + else + { + std::string credentialRuleClassName = "java/lang/Integer"; + std::string credentialRuleCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + credentialRuleClassName.c_str(), credentialRuleCtorSignature.c_str(), + static_cast(dataResponse.credentialRule.Value()), credentialRule); + } jobject credentials; + if (dataResponse.credentials.IsNull()) + { + credentials = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(credentials); - credentials = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_credentials_1 = dataResponse.credentials.Value().begin(); + while (iter_credentials_1.Next()) + { + auto & entry_1 = iter_credentials_1.GetValue(); + jobject newElement_1; + jobject newElement_1_credentialType; + std::string newElement_1_credentialTypeClassName = "java/lang/Integer"; + std::string newElement_1_credentialTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_credentialTypeClassName.c_str(), newElement_1_credentialTypeCtorSignature.c_str(), + static_cast(entry_1.credentialType), newElement_1_credentialType); + jobject newElement_1_credentialIndex; + std::string newElement_1_credentialIndexClassName = "java/lang/Integer"; + std::string newElement_1_credentialIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_credentialIndexClassName.c_str(), + newElement_1_credentialIndexCtorSignature.c_str(), + entry_1.credentialIndex, newElement_1_credentialIndex); + + jclass dlCredentialStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DoorLockClusterDlCredential", dlCredentialStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterDlCredential")); + chip::JniClass structJniClass(dlCredentialStructClass); + jmethodID dlCredentialStructCtor = + env->GetMethodID(dlCredentialStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(dlCredentialStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterDlCredential constructor")); + + newElement_1 = env->NewObject(dlCredentialStructClass, dlCredentialStructCtor, newElement_1_credentialType, + newElement_1_credentialIndex); + chip::JniReferences::GetInstance().AddToArrayList(credentials, newElement_1); + } + } jobject creatorFabricIndex; - - std::string creatorFabricIndexClassName = "java/lang/Integer"; - std::string creatorFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - creatorFabricIndexClassName.c_str(), creatorFabricIndexCtorSignature.c_str(), dataResponse.creatorFabricIndex.Value(), - creatorFabricIndex); + if (dataResponse.creatorFabricIndex.IsNull()) + { + creatorFabricIndex = nullptr; + } + else + { + std::string creatorFabricIndexClassName = "java/lang/Integer"; + std::string creatorFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(creatorFabricIndexClassName.c_str(), + creatorFabricIndexCtorSignature.c_str(), + dataResponse.creatorFabricIndex.Value(), creatorFabricIndex); + } jobject lastModifiedFabricIndex; - - std::string lastModifiedFabricIndexClassName = "java/lang/Integer"; - std::string lastModifiedFabricIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - lastModifiedFabricIndexClassName.c_str(), lastModifiedFabricIndexCtorSignature.c_str(), - dataResponse.lastModifiedFabricIndex.Value(), lastModifiedFabricIndex); + if (dataResponse.lastModifiedFabricIndex.IsNull()) + { + lastModifiedFabricIndex = nullptr; + } + else + { + std::string lastModifiedFabricIndexClassName = "java/lang/Integer"; + std::string lastModifiedFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + lastModifiedFabricIndexClassName.c_str(), lastModifiedFabricIndexCtorSignature.c_str(), + dataResponse.lastModifiedFabricIndex.Value(), lastModifiedFabricIndex); + } jobject nextUserIndex; - std::string nextUserIndexClassName = "java/lang/Integer"; std::string nextUserIndexCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( @@ -606,24 +724,35 @@ void CHIPDoorLockClusterSetCredentialResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject userIndex; - - std::string userIndexClassName = "java/lang/Integer"; - std::string userIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), - dataResponse.userIndex.Value(), userIndex); + if (dataResponse.userIndex.IsNull()) + { + userIndex = nullptr; + } + else + { + std::string userIndexClassName = "java/lang/Integer"; + std::string userIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), + dataResponse.userIndex.Value(), userIndex); + } jobject nextCredentialIndex; - - std::string nextCredentialIndexClassName = "java/lang/Integer"; - std::string nextCredentialIndexCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(nextCredentialIndexClassName.c_str(), - nextCredentialIndexCtorSignature.c_str(), - dataResponse.nextCredentialIndex.Value(), nextCredentialIndex); + if (dataResponse.nextCredentialIndex.IsNull()) + { + nextCredentialIndex = nullptr; + } + else + { + std::string nextCredentialIndexClassName = "java/lang/Integer"; + std::string nextCredentialIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + nextCredentialIndexClassName.c_str(), nextCredentialIndexCtorSignature.c_str(), + dataResponse.nextCredentialIndex.Value(), nextCredentialIndex); + } env->CallVoidMethod(javaCallbackRef, javaMethod, status, userIndex, nextCredentialIndex); } @@ -682,15 +811,12 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), errorCode); jobject debugText; - - chip::UtfString debugTextUtfString(env, dataResponse.debugText); - debugText = debugTextUtfString.jniValue(); + debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -751,15 +877,12 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), errorCode); jobject debugText; - - chip::UtfString debugTextUtfString(env, dataResponse.debugText); - debugText = debugTextUtfString.jniValue(); + debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -820,15 +943,12 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject errorCode; - std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), + static_cast(dataResponse.errorCode), errorCode); jobject debugText; - - chip::UtfString debugTextUtfString(env, dataResponse.debugText); - debugText = debugTextUtfString.jniValue(); + debugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -884,12 +1004,23 @@ void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::Callback // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "()V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject groupKeySetIDs; + chip::JniReferences::GetInstance().CreateArrayList(groupKeySetIDs); - groupKeySetIDs = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_groupKeySetIDs_0 = dataResponse.groupKeySetIDs.begin(); + while (iter_groupKeySetIDs_0.Next()) + { + auto & entry_0 = iter_groupKeySetIDs_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(groupKeySetIDs, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, groupKeySetIDs); } @@ -943,12 +1074,74 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "()V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Lchip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySet;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject groupKeySet; - - groupKeySet = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ + jobject groupKeySet_groupKeySetID; + std::string groupKeySet_groupKeySetIDClassName = "java/lang/Integer"; + std::string groupKeySet_groupKeySetIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + groupKeySet_groupKeySetIDClassName.c_str(), groupKeySet_groupKeySetIDCtorSignature.c_str(), + dataResponse.groupKeySet.groupKeySetID, groupKeySet_groupKeySetID); + jobject groupKeySet_securityPolicy; + std::string groupKeySet_securityPolicyClassName = "java/lang/Integer"; + std::string groupKeySet_securityPolicyCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + groupKeySet_securityPolicyClassName.c_str(), groupKeySet_securityPolicyCtorSignature.c_str(), + static_cast(dataResponse.groupKeySet.securityPolicy), groupKeySet_securityPolicy); + jobject groupKeySet_epochKey0; + jbyteArray groupKeySet_epochKey0ByteArray = env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey0.size())); + env->SetByteArrayRegion(groupKeySet_epochKey0ByteArray, 0, static_cast(dataResponse.groupKeySet.epochKey0.size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey0.data())); + groupKeySet_epochKey0 = groupKeySet_epochKey0ByteArray; + jobject groupKeySet_epochStartTime0; + std::string groupKeySet_epochStartTime0ClassName = "java/lang/Long"; + std::string groupKeySet_epochStartTime0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + groupKeySet_epochStartTime0ClassName.c_str(), groupKeySet_epochStartTime0CtorSignature.c_str(), + dataResponse.groupKeySet.epochStartTime0, groupKeySet_epochStartTime0); + jobject groupKeySet_epochKey1; + jbyteArray groupKeySet_epochKey1ByteArray = env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey1.size())); + env->SetByteArrayRegion(groupKeySet_epochKey1ByteArray, 0, static_cast(dataResponse.groupKeySet.epochKey1.size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey1.data())); + groupKeySet_epochKey1 = groupKeySet_epochKey1ByteArray; + jobject groupKeySet_epochStartTime1; + std::string groupKeySet_epochStartTime1ClassName = "java/lang/Long"; + std::string groupKeySet_epochStartTime1CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + groupKeySet_epochStartTime1ClassName.c_str(), groupKeySet_epochStartTime1CtorSignature.c_str(), + dataResponse.groupKeySet.epochStartTime1, groupKeySet_epochStartTime1); + jobject groupKeySet_epochKey2; + jbyteArray groupKeySet_epochKey2ByteArray = env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey2.size())); + env->SetByteArrayRegion(groupKeySet_epochKey2ByteArray, 0, static_cast(dataResponse.groupKeySet.epochKey2.size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey2.data())); + groupKeySet_epochKey2 = groupKeySet_epochKey2ByteArray; + jobject groupKeySet_epochStartTime2; + std::string groupKeySet_epochStartTime2ClassName = "java/lang/Long"; + std::string groupKeySet_epochStartTime2CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + groupKeySet_epochStartTime2ClassName.c_str(), groupKeySet_epochStartTime2CtorSignature.c_str(), + dataResponse.groupKeySet.epochStartTime2, groupKeySet_epochStartTime2); + + jclass groupKeySetStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySet", groupKeySetStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeySet")); + chip::JniClass structJniClass(groupKeySetStructClass); + jmethodID groupKeySetStructCtor = + env->GetMethodID(groupKeySetStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;[BLjava/lang/Long;[BLjava/lang/Long;)V"); + VerifyOrReturn(groupKeySetStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeySet constructor")); + + groupKeySet = + env->NewObject(groupKeySetStructClass, groupKeySetStructCtor, groupKeySet_groupKeySetID, groupKeySet_securityPolicy, + groupKeySet_epochKey0, groupKeySet_epochStartTime0, groupKeySet_epochKey1, groupKeySet_epochStartTime1, + groupKeySet_epochKey2, groupKeySet_epochStartTime2); env->CallVoidMethod(javaCallbackRef, javaMethod, groupKeySet); } @@ -1005,13 +1198,11 @@ void CHIPGroupsClusterAddGroupResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), @@ -1068,18 +1259,29 @@ void CHIPGroupsClusterGetGroupMembershipResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject capacity; - std::string capacityClassName = "java/lang/Integer"; std::string capacityCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(capacityClassName.c_str(), capacityCtorSignature.c_str(), dataResponse.capacity, capacity); jobject groupList; + chip::JniReferences::GetInstance().CreateArrayList(groupList); - groupList = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_groupList_0 = dataResponse.groupList.begin(); + while (iter_groupList_0.Next()) + { + auto & entry_0 = iter_groupList_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(groupList, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, capacity, groupList); } @@ -1136,13 +1338,11 @@ void CHIPGroupsClusterRemoveGroupResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), @@ -1203,21 +1403,17 @@ void CHIPGroupsClusterViewGroupResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject groupName; - - chip::UtfString groupNameUtfString(env, dataResponse.groupName); - groupName = groupNameUtfString.jniValue(); + groupName = env->NewStringUTF(std::string(dataResponse.groupName.data(), dataResponse.groupName.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId, groupName); } @@ -1273,7 +1469,6 @@ void CHIPIdentifyClusterIdentifyQueryResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject timeout; - std::string timeoutClassName = "java/lang/Integer"; std::string timeoutCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(timeoutClassName.c_str(), timeoutCtorSignature.c_str(), @@ -1333,11 +1528,10 @@ void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1393,11 +1587,10 @@ void CHIPMediaPlaybackClusterPlaybackResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1456,17 +1649,14 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), dataResponse.networkingStatus, NetworkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), + static_cast(dataResponse.networkingStatus), NetworkingStatus); jobject DebugText; - - chip::UtfString DebugTextUtfString(env, dataResponse.debugText); - DebugText = DebugTextUtfString.jniValue(); + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); jobject ErrorValue; - std::string ErrorValueClassName = "java/lang/Long"; std::string ErrorValueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), @@ -1529,15 +1719,13 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), dataResponse.networkingStatus, NetworkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), + static_cast(dataResponse.networkingStatus), NetworkingStatus); jobject DebugText; - - chip::UtfString DebugTextUtfString(env, dataResponse.debugText); - DebugText = DebugTextUtfString.jniValue(); + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText); } @@ -1591,20 +1779,19 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; std::string NetworkingStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), dataResponse.networkingStatus, NetworkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), + static_cast(dataResponse.networkingStatus), NetworkingStatus); jobject DebugText; - - chip::UtfString DebugTextUtfString(env, dataResponse.debugText); - DebugText = DebugTextUtfString.jniValue(); + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); jobject WiFiScanResults; if (!dataResponse.wiFiScanResults.HasValue()) { @@ -1612,9 +1799,67 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( } else { + chip::JniReferences::GetInstance().CreateArrayList(WiFiScanResults); - WiFiScanResults = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ - chip::JniReferences::GetInstance().CreateOptional(WiFiScanResults, WiFiScanResults); + auto iter_WiFiScanResults_1 = dataResponse.wiFiScanResults.Value().begin(); + while (iter_WiFiScanResults_1.Next()) + { + auto & entry_1 = iter_WiFiScanResults_1.GetValue(); + jobject newElement_1; + jobject newElement_1_security; + std::string newElement_1_securityClassName = "java/lang/Integer"; + std::string newElement_1_securityCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), + newElement_1_securityCtorSignature.c_str(), + entry_1.security, newElement_1_security); + jobject newElement_1_ssid; + jbyteArray newElement_1_ssidByteArray = env->NewByteArray(static_cast(entry_1.ssid.size())); + env->SetByteArrayRegion(newElement_1_ssidByteArray, 0, static_cast(entry_1.ssid.size()), + reinterpret_cast(entry_1.ssid.data())); + newElement_1_ssid = newElement_1_ssidByteArray; + jobject newElement_1_bssid; + jbyteArray newElement_1_bssidByteArray = env->NewByteArray(static_cast(entry_1.bssid.size())); + env->SetByteArrayRegion(newElement_1_bssidByteArray, 0, static_cast(entry_1.bssid.size()), + reinterpret_cast(entry_1.bssid.data())); + newElement_1_bssid = newElement_1_bssidByteArray; + jobject newElement_1_channel; + std::string newElement_1_channelClassName = "java/lang/Integer"; + std::string newElement_1_channelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + entry_1.channel, newElement_1_channel); + jobject newElement_1_wiFiBand; + std::string newElement_1_wiFiBandClassName = "java/lang/Integer"; + std::string newElement_1_wiFiBandCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_wiFiBandClassName.c_str(), newElement_1_wiFiBandCtorSignature.c_str(), + static_cast(entry_1.wiFiBand), newElement_1_wiFiBand); + jobject newElement_1_rssi; + std::string newElement_1_rssiClassName = "java/lang/Integer"; + std::string newElement_1_rssiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_rssiClassName.c_str(), newElement_1_rssiCtorSignature.c_str(), entry_1.rssi, newElement_1_rssi); + + jclass wiFiInterfaceScanResultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult", + wiFiInterfaceScanResultStructClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult")); + chip::JniClass structJniClass(wiFiInterfaceScanResultStructClass); + jmethodID wiFiInterfaceScanResultStructCtor = + env->GetMethodID(wiFiInterfaceScanResultStructClass, "", + "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn( + wiFiInterfaceScanResultStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResult constructor")); + + newElement_1 = env->NewObject(wiFiInterfaceScanResultStructClass, wiFiInterfaceScanResultStructCtor, + newElement_1_security, newElement_1_ssid, newElement_1_bssid, newElement_1_channel, + newElement_1_wiFiBand, newElement_1_rssi); + chip::JniReferences::GetInstance().AddToArrayList(WiFiScanResults, newElement_1); + } } jobject ThreadScanResults; if (!dataResponse.threadScanResults.HasValue()) @@ -1623,9 +1868,78 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( } else { + chip::JniReferences::GetInstance().CreateArrayList(ThreadScanResults); - ThreadScanResults = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ - chip::JniReferences::GetInstance().CreateOptional(ThreadScanResults, ThreadScanResults); + auto iter_ThreadScanResults_1 = dataResponse.threadScanResults.Value().begin(); + while (iter_ThreadScanResults_1.Next()) + { + auto & entry_1 = iter_ThreadScanResults_1.GetValue(); + jobject newElement_1; + jobject newElement_1_panId; + std::string newElement_1_panIdClassName = "java/lang/Long"; + std::string newElement_1_panIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_panIdClassName.c_str(), newElement_1_panIdCtorSignature.c_str(), entry_1.panId, newElement_1_panId); + jobject newElement_1_extendedPanId; + std::string newElement_1_extendedPanIdClassName = "java/lang/Long"; + std::string newElement_1_extendedPanIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), + newElement_1_extendedPanIdCtorSignature.c_str(), + entry_1.extendedPanId, newElement_1_extendedPanId); + jobject newElement_1_networkName; + newElement_1_networkName = + env->NewStringUTF(std::string(entry_1.networkName.data(), entry_1.networkName.size()).c_str()); + jobject newElement_1_channel; + std::string newElement_1_channelClassName = "java/lang/Integer"; + std::string newElement_1_channelCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + entry_1.channel, newElement_1_channel); + jobject newElement_1_version; + std::string newElement_1_versionClassName = "java/lang/Integer"; + std::string newElement_1_versionCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), + newElement_1_versionCtorSignature.c_str(), + entry_1.version, newElement_1_version); + jobject newElement_1_extendedAddress; + std::string newElement_1_extendedAddressClassName = "java/lang/Long"; + std::string newElement_1_extendedAddressCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedAddressClassName.c_str(), + newElement_1_extendedAddressCtorSignature.c_str(), + entry_1.extendedAddress, newElement_1_extendedAddress); + jobject newElement_1_rssi; + std::string newElement_1_rssiClassName = "java/lang/Integer"; + std::string newElement_1_rssiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_rssiClassName.c_str(), newElement_1_rssiCtorSignature.c_str(), entry_1.rssi, newElement_1_rssi); + jobject newElement_1_lqi; + std::string newElement_1_lqiClassName = "java/lang/Integer"; + std::string newElement_1_lqiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), entry_1.lqi, newElement_1_lqi); + + jclass threadInterfaceScanResultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult", + threadInterfaceScanResultStructClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult")); + chip::JniClass structJniClass(threadInterfaceScanResultStructClass); + jmethodID threadInterfaceScanResultStructCtor = + env->GetMethodID(threadInterfaceScanResultStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn( + threadInterfaceScanResultStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResult constructor")); + + newElement_1 = + env->NewObject(threadInterfaceScanResultStructClass, threadInterfaceScanResultStructCtor, newElement_1_panId, + newElement_1_extendedPanId, newElement_1_networkName, newElement_1_channel, newElement_1_version, + newElement_1_extendedAddress, newElement_1_rssi, newElement_1_lqi); + chip::JniReferences::GetInstance().AddToArrayList(ThreadScanResults, newElement_1); + } } env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, WiFiScanResults, ThreadScanResults); @@ -1686,13 +2000,11 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject action; - std::string actionClassName = "java/lang/Integer"; std::string actionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - actionClassName.c_str(), actionCtorSignature.c_str(), dataResponse.action, action); + chip::JniReferences::GetInstance().CreateBoxedObject(actionClassName.c_str(), actionCtorSignature.c_str(), + static_cast(dataResponse.action), action); jobject delayedActionTime; - std::string delayedActionTimeClassName = "java/lang/Long"; std::string delayedActionTimeCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(delayedActionTimeClassName.c_str(), @@ -1760,11 +2072,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject delayedActionTime; if (!dataResponse.delayedActionTime.HasValue()) { @@ -1772,13 +2083,11 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - std::string delayedActionTimeClassName = "java/lang/Long"; std::string delayedActionTimeCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(delayedActionTimeClassName.c_str(), delayedActionTimeCtorSignature.c_str(), dataResponse.delayedActionTime.Value(), delayedActionTime); - chip::JniReferences::GetInstance().CreateOptional(delayedActionTime, delayedActionTime); } jobject imageURI; if (!dataResponse.imageURI.HasValue()) @@ -1787,10 +2096,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - - chip::UtfString imageURIUtfString(env, dataResponse.imageURI.Value()); - imageURI = imageURIUtfString.jniValue(); - chip::JniReferences::GetInstance().CreateOptional(imageURI, imageURI); + imageURI = + env->NewStringUTF(std::string(dataResponse.imageURI.Value().data(), dataResponse.imageURI.Value().size()).c_str()); } jobject softwareVersion; if (!dataResponse.softwareVersion.HasValue()) @@ -1799,13 +2106,11 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - std::string softwareVersionClassName = "java/lang/Long"; std::string softwareVersionCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(softwareVersionClassName.c_str(), softwareVersionCtorSignature.c_str(), dataResponse.softwareVersion.Value(), softwareVersion); - chip::JniReferences::GetInstance().CreateOptional(softwareVersion, softwareVersion); } jobject softwareVersionString; if (!dataResponse.softwareVersionString.HasValue()) @@ -1814,10 +2119,9 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - - chip::UtfString softwareVersionStringUtfString(env, dataResponse.softwareVersionString.Value()); - softwareVersionString = softwareVersionStringUtfString.jniValue(); - chip::JniReferences::GetInstance().CreateOptional(softwareVersionString, softwareVersionString); + softwareVersionString = env->NewStringUTF( + std::string(dataResponse.softwareVersionString.Value().data(), dataResponse.softwareVersionString.Value().size()) + .c_str()); } jobject updateToken; if (!dataResponse.updateToken.HasValue()) @@ -1826,10 +2130,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - - chip::ByteArray updateTokenByteArray(env, dataResponse.updateToken.Value()); - updateToken = updateTokenByteArray.jniValue(); - chip::JniReferences::GetInstance().CreateOptional(updateToken, updateToken); + jbyteArray updateTokenByteArray = env->NewByteArray(static_cast(dataResponse.updateToken.Value().size())); + env->SetByteArrayRegion(updateTokenByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), + reinterpret_cast(dataResponse.updateToken.Value().data())); + updateToken = updateTokenByteArray; } jobject userConsentNeeded; if (!dataResponse.userConsentNeeded.HasValue()) @@ -1838,13 +2142,11 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - std::string userConsentNeededClassName = "java/lang/Boolean"; std::string userConsentNeededCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject(userConsentNeededClassName.c_str(), userConsentNeededCtorSignature.c_str(), dataResponse.userConsentNeeded.Value(), userConsentNeeded); - chip::JniReferences::GetInstance().CreateOptional(userConsentNeeded, userConsentNeeded); } jobject metadataForRequestor; if (!dataResponse.metadataForRequestor.HasValue()) @@ -1853,10 +2155,12 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( } else { - - chip::ByteArray metadataForRequestorByteArray(env, dataResponse.metadataForRequestor.Value()); - metadataForRequestor = metadataForRequestorByteArray.jniValue(); - chip::JniReferences::GetInstance().CreateOptional(metadataForRequestor, metadataForRequestor); + jbyteArray metadataForRequestorByteArray = + env->NewByteArray(static_cast(dataResponse.metadataForRequestor.Value().size())); + env->SetByteArrayRegion(metadataForRequestorByteArray, 0, + static_cast(dataResponse.metadataForRequestor.Value().size()), + reinterpret_cast(dataResponse.metadataForRequestor.Value().data())); + metadataForRequestor = metadataForRequestorByteArray; } env->CallVoidMethod(javaCallbackRef, javaMethod, status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, @@ -1916,13 +2220,15 @@ void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject AttestationElements; - - chip::ByteArray AttestationElementsByteArray(env, dataResponse.attestationElements); - AttestationElements = AttestationElementsByteArray.jniValue(); + jbyteArray AttestationElementsByteArray = env->NewByteArray(static_cast(dataResponse.attestationElements.size())); + env->SetByteArrayRegion(AttestationElementsByteArray, 0, static_cast(dataResponse.attestationElements.size()), + reinterpret_cast(dataResponse.attestationElements.data())); + AttestationElements = AttestationElementsByteArray; jobject Signature; - - chip::ByteArray SignatureByteArray(env, dataResponse.signature); - Signature = SignatureByteArray.jniValue(); + jbyteArray SignatureByteArray = env->NewByteArray(static_cast(dataResponse.signature.size())); + env->SetByteArrayRegion(SignatureByteArray, 0, static_cast(dataResponse.signature.size()), + reinterpret_cast(dataResponse.signature.data())); + Signature = SignatureByteArray; env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, Signature); } @@ -1982,9 +2288,10 @@ void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::Callback VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Certificate; - - chip::ByteArray CertificateByteArray(env, dataResponse.certificate); - Certificate = CertificateByteArray.jniValue(); + jbyteArray CertificateByteArray = env->NewByteArray(static_cast(dataResponse.certificate.size())); + env->SetByteArrayRegion(CertificateByteArray, 0, static_cast(dataResponse.certificate.size()), + reinterpret_cast(dataResponse.certificate.data())); + Certificate = CertificateByteArray; env->CallVoidMethod(javaCallbackRef, javaMethod, Certificate); } @@ -2042,21 +2349,17 @@ void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject StatusCode; - std::string StatusCodeClassName = "java/lang/Integer"; std::string StatusCodeCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), dataResponse.statusCode, StatusCode); jobject FabricIndex; - std::string FabricIndexClassName = "java/lang/Integer"; std::string FabricIndexCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexClassName.c_str(), FabricIndexCtorSignature.c_str(), dataResponse.fabricIndex, FabricIndex); jobject DebugText; - - chip::UtfString DebugTextUtfString(env, dataResponse.debugText); - DebugText = DebugTextUtfString.jniValue(); + DebugText = env->NewStringUTF(std::string(dataResponse.debugText.data(), dataResponse.debugText.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, StatusCode, FabricIndex, DebugText); } @@ -2114,13 +2417,15 @@ void CHIPOperationalCredentialsClusterOpCSRResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject NOCSRElements; - - chip::ByteArray NOCSRElementsByteArray(env, dataResponse.NOCSRElements); - NOCSRElements = NOCSRElementsByteArray.jniValue(); + jbyteArray NOCSRElementsByteArray = env->NewByteArray(static_cast(dataResponse.NOCSRElements.size())); + env->SetByteArrayRegion(NOCSRElementsByteArray, 0, static_cast(dataResponse.NOCSRElements.size()), + reinterpret_cast(dataResponse.NOCSRElements.data())); + NOCSRElements = NOCSRElementsByteArray; jobject AttestationSignature; - - chip::ByteArray AttestationSignatureByteArray(env, dataResponse.attestationSignature); - AttestationSignature = AttestationSignatureByteArray.jniValue(); + jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); + env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), + reinterpret_cast(dataResponse.attestationSignature.data())); + AttestationSignature = AttestationSignatureByteArray; env->CallVoidMethod(javaCallbackRef, javaMethod, NOCSRElements, AttestationSignature); } @@ -2177,19 +2482,16 @@ void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject sceneId; - std::string sceneIdClassName = "java/lang/Integer"; std::string sceneIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(sceneIdClassName.c_str(), sceneIdCtorSignature.c_str(), @@ -2246,38 +2548,45 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject capacity; - std::string capacityClassName = "java/lang/Integer"; std::string capacityCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(capacityClassName.c_str(), capacityCtorSignature.c_str(), dataResponse.capacity, capacity); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject sceneCount; - std::string sceneCountClassName = "java/lang/Integer"; std::string sceneCountCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(sceneCountClassName.c_str(), sceneCountCtorSignature.c_str(), dataResponse.sceneCount, sceneCount); jobject sceneList; + chip::JniReferences::GetInstance().CreateArrayList(sceneList); - sceneList = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_sceneList_0 = dataResponse.sceneList.begin(); + while (iter_sceneList_0.Next()) + { + auto & entry_0 = iter_sceneList_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(sceneList, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, status, capacity, groupId, sceneCount, sceneList); } @@ -2334,13 +2643,11 @@ void CHIPScenesClusterRemoveAllScenesResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), @@ -2401,19 +2708,16 @@ void CHIPScenesClusterRemoveSceneResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject sceneId; - std::string sceneIdClassName = "java/lang/Integer"; std::string sceneIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(sceneIdClassName.c_str(), sceneIdCtorSignature.c_str(), @@ -2474,19 +2778,16 @@ void CHIPScenesClusterStoreSceneResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject sceneId; - std::string sceneIdClassName = "java/lang/Integer"; std::string sceneIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(sceneIdClassName.c_str(), sceneIdCtorSignature.c_str(), @@ -2544,40 +2845,72 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( err = JniReferences::GetInstance().FindMethod( env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/ArrayList;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject groupId; - std::string groupIdClassName = "java/lang/Integer"; std::string groupIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(groupIdClassName.c_str(), groupIdCtorSignature.c_str(), dataResponse.groupId, groupId); jobject sceneId; - std::string sceneIdClassName = "java/lang/Integer"; std::string sceneIdCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(sceneIdClassName.c_str(), sceneIdCtorSignature.c_str(), dataResponse.sceneId, sceneId); jobject transitionTime; - std::string transitionTimeClassName = "java/lang/Integer"; std::string transitionTimeCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( transitionTimeClassName.c_str(), transitionTimeCtorSignature.c_str(), dataResponse.transitionTime, transitionTime); jobject sceneName; - - chip::UtfString sceneNameUtfString(env, dataResponse.sceneName); - sceneName = sceneNameUtfString.jniValue(); + sceneName = env->NewStringUTF(std::string(dataResponse.sceneName.data(), dataResponse.sceneName.size()).c_str()); jobject extensionFieldSets; - - extensionFieldSets = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + chip::JniReferences::GetInstance().CreateArrayList(extensionFieldSets); + + auto iter_extensionFieldSets_0 = dataResponse.extensionFieldSets.begin(); + while (iter_extensionFieldSets_0.Next()) + { + auto & entry_0 = iter_extensionFieldSets_0.GetValue(); + jobject newElement_0; + jobject newElement_0_clusterId; + std::string newElement_0_clusterIdClassName = "java/lang/Long"; + std::string newElement_0_clusterIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_clusterIdClassName.c_str(), + newElement_0_clusterIdCtorSignature.c_str(), + entry_0.clusterId, newElement_0_clusterId); + jobject newElement_0_length; + std::string newElement_0_lengthClassName = "java/lang/Integer"; + std::string newElement_0_lengthCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_lengthClassName.c_str(), newElement_0_lengthCtorSignature.c_str(), entry_0.length, newElement_0_length); + jobject newElement_0_value; + std::string newElement_0_valueClassName = "java/lang/Integer"; + std::string newElement_0_valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_valueClassName.c_str(), newElement_0_valueCtorSignature.c_str(), entry_0.value, newElement_0_value); + + jclass sceneExtensionFieldSetStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneExtensionFieldSet", sceneExtensionFieldSetStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneExtensionFieldSet")); + chip::JniClass structJniClass(sceneExtensionFieldSetStructClass); + jmethodID sceneExtensionFieldSetStructCtor = env->GetMethodID(sceneExtensionFieldSetStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(sceneExtensionFieldSetStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneExtensionFieldSet constructor")); + + newElement_0 = env->NewObject(sceneExtensionFieldSetStructClass, sceneExtensionFieldSetStructCtor, newElement_0_clusterId, + newElement_0_length, newElement_0_value); + chip::JniReferences::GetInstance().AddToArrayList(extensionFieldSets, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId, sceneId, transitionTime, sceneName, extensionFieldSets); } @@ -2636,15 +2969,12 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject status; - std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), + static_cast(dataResponse.status), status); jobject data; - - chip::UtfString dataUtfString(env, dataResponse.data); - data = dataUtfString.jniValue(); + data = env->NewStringUTF(std::string(dataResponse.data.data(), dataResponse.data.size()).c_str()); env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } @@ -2700,7 +3030,6 @@ void CHIPTestClusterClusterBooleanResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject value; - std::string valueClassName = "java/lang/Boolean"; std::string valueCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), @@ -2757,12 +3086,62 @@ void CHIPTestClusterClusterSimpleStructResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "()V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject arg1; - - arg1 = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ + jobject arg1_a; + std::string arg1_aClassName = "java/lang/Integer"; + std::string arg1_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_aClassName.c_str(), arg1_aCtorSignature.c_str(), + dataResponse.arg1.a, arg1_a); + jobject arg1_b; + std::string arg1_bClassName = "java/lang/Boolean"; + std::string arg1_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_bClassName.c_str(), arg1_bCtorSignature.c_str(), + dataResponse.arg1.b, arg1_b); + jobject arg1_c; + std::string arg1_cClassName = "java/lang/Integer"; + std::string arg1_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_cClassName.c_str(), arg1_cCtorSignature.c_str(), + static_cast(dataResponse.arg1.c), arg1_c); + jobject arg1_d; + jbyteArray arg1_dByteArray = env->NewByteArray(static_cast(dataResponse.arg1.d.size())); + env->SetByteArrayRegion(arg1_dByteArray, 0, static_cast(dataResponse.arg1.d.size()), + reinterpret_cast(dataResponse.arg1.d.data())); + arg1_d = arg1_dByteArray; + jobject arg1_e; + arg1_e = env->NewStringUTF(std::string(dataResponse.arg1.e.data(), dataResponse.arg1.e.size()).c_str()); + jobject arg1_f; + std::string arg1_fClassName = "java/lang/Integer"; + std::string arg1_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_fClassName.c_str(), arg1_fCtorSignature.c_str(), + dataResponse.arg1.f.Raw(), arg1_f); + jobject arg1_g; + std::string arg1_gClassName = "java/lang/Float"; + std::string arg1_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_gClassName.c_str(), arg1_gCtorSignature.c_str(), + dataResponse.arg1.g, arg1_g); + jobject arg1_h; + std::string arg1_hClassName = "java/lang/Double"; + std::string arg1_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(arg1_hClassName.c_str(), arg1_hCtorSignature.c_str(), + dataResponse.arg1.h, arg1_h); + + jclass simpleStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", + simpleStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct")); + chip::JniClass structJniClass(simpleStructStructClass); + jmethodID simpleStructStructCtor = env->GetMethodID(simpleStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/" + "String;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + VerifyOrReturn(simpleStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor")); + + arg1 = env->NewObject(simpleStructStructClass, simpleStructStructCtor, arg1_a, arg1_b, arg1_c, arg1_d, arg1_e, arg1_f, arg1_g, + arg1_h); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1); } @@ -2820,7 +3199,6 @@ void CHIPTestClusterClusterTestAddArgumentsResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; std::string returnValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), @@ -2882,7 +3260,6 @@ void CHIPTestClusterClusterTestEmitTestEventResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject value; - std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), @@ -2943,17 +3320,15 @@ void CHIPTestClusterClusterTestEnumsResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject arg1; - std::string arg1ClassName = "java/lang/Integer"; std::string arg1CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), - dataResponse.arg1, arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(arg1ClassName.c_str(), arg1CtorSignature.c_str(), + static_cast(dataResponse.arg1), arg1); jobject arg2; - std::string arg2ClassName = "java/lang/Integer"; std::string arg2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - arg2ClassName.c_str(), arg2CtorSignature.c_str(), dataResponse.arg2, arg2); + chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), + static_cast(dataResponse.arg2), arg2); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2); } @@ -3007,12 +3382,23 @@ void CHIPTestClusterClusterTestListInt8UReverseResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "()V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject arg1; + chip::JniReferences::GetInstance().CreateArrayList(arg1); - arg1 = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_arg1_0 = dataResponse.arg1.begin(); + while (iter_arg1_0.Next()) + { + auto & entry_0 = iter_arg1_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arg1, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, arg1); } @@ -3072,7 +3458,6 @@ void CHIPTestClusterClusterTestNullableOptionalResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject wasPresent; - std::string wasPresentClassName = "java/lang/Boolean"; std::string wasPresentCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject(wasPresentClassName.c_str(), wasPresentCtorSignature.c_str(), @@ -3084,12 +3469,10 @@ void CHIPTestClusterClusterTestNullableOptionalResponseCallback::CallbackFn( } else { - std::string wasNullClassName = "java/lang/Boolean"; std::string wasNullCtorSignature = "(Z)V"; chip::JniReferences::GetInstance().CreateBoxedObject(wasNullClassName.c_str(), wasNullCtorSignature.c_str(), dataResponse.wasNull.Value(), wasNull); - chip::JniReferences::GetInstance().CreateOptional(wasNull, wasNull); } jobject value; if (!dataResponse.value.HasValue()) @@ -3098,12 +3481,10 @@ void CHIPTestClusterClusterTestNullableOptionalResponseCallback::CallbackFn( } else { - std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), dataResponse.value.Value(), value); - chip::JniReferences::GetInstance().CreateOptional(value, value); } jobject originalValue; if (!dataResponse.originalValue.HasValue()) @@ -3114,17 +3495,15 @@ void CHIPTestClusterClusterTestNullableOptionalResponseCallback::CallbackFn( { if (dataResponse.originalValue.Value().IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, originalValue); + originalValue = nullptr; } else { - std::string originalValueClassName = "java/lang/Integer"; std::string originalValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( originalValueClassName.c_str(), originalValueCtorSignature.c_str(), dataResponse.originalValue.Value().Value(), originalValue); - chip::JniReferences::GetInstance().CreateOptional(originalValue, originalValue); } } @@ -3183,7 +3562,6 @@ void CHIPTestClusterClusterTestSpecificResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject returnValue; - std::string returnValueClassName = "java/lang/Integer"; std::string returnValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(returnValueClassName.c_str(), returnValueCtorSignature.c_str(), @@ -3248,38 +3626,32 @@ void CHIPThermostatClusterGetRelayStatusLogResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject timeOfDay; - std::string timeOfDayClassName = "java/lang/Integer"; std::string timeOfDayCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(timeOfDayClassName.c_str(), timeOfDayCtorSignature.c_str(), dataResponse.timeOfDay, timeOfDay); jobject relayStatus; - std::string relayStatusClassName = "java/lang/Integer"; std::string relayStatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(relayStatusClassName.c_str(), relayStatusCtorSignature.c_str(), dataResponse.relayStatus, relayStatus); jobject localTemperature; - std::string localTemperatureClassName = "java/lang/Integer"; std::string localTemperatureCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( localTemperatureClassName.c_str(), localTemperatureCtorSignature.c_str(), dataResponse.localTemperature, localTemperature); jobject humidityInPercentage; - std::string humidityInPercentageClassName = "java/lang/Integer"; std::string humidityInPercentageCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(humidityInPercentageClassName.c_str(), humidityInPercentageCtorSignature.c_str(), dataResponse.humidityInPercentage, humidityInPercentage); jobject setpoint; - std::string setpointClassName = "java/lang/Integer"; std::string setpointCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(setpointClassName.c_str(), setpointCtorSignature.c_str(), dataResponse.setpoint, setpoint); jobject unreadEntries; - std::string unreadEntriesClassName = "java/lang/Integer"; std::string unreadEntriesCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( @@ -3338,33 +3710,43 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject numberOfTransitionsForSequence; - std::string numberOfTransitionsForSequenceClassName = "java/lang/Integer"; std::string numberOfTransitionsForSequenceCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( numberOfTransitionsForSequenceClassName.c_str(), numberOfTransitionsForSequenceCtorSignature.c_str(), dataResponse.numberOfTransitionsForSequence, numberOfTransitionsForSequence); jobject dayOfWeekForSequence; - std::string dayOfWeekForSequenceClassName = "java/lang/Integer"; std::string dayOfWeekForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject>( - dayOfWeekForSequenceClassName.c_str(), dayOfWeekForSequenceCtorSignature.c_str(), dataResponse.dayOfWeekForSequence, - dayOfWeekForSequence); + chip::JniReferences::GetInstance().CreateBoxedObject(dayOfWeekForSequenceClassName.c_str(), + dayOfWeekForSequenceCtorSignature.c_str(), + dataResponse.dayOfWeekForSequence.Raw(), dayOfWeekForSequence); jobject modeForSequence; - std::string modeForSequenceClassName = "java/lang/Integer"; std::string modeForSequenceCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject>( - modeForSequenceClassName.c_str(), modeForSequenceCtorSignature.c_str(), dataResponse.modeForSequence, modeForSequence); + chip::JniReferences::GetInstance().CreateBoxedObject(modeForSequenceClassName.c_str(), + modeForSequenceCtorSignature.c_str(), + dataResponse.modeForSequence.Raw(), modeForSequence); jobject payload; + chip::JniReferences::GetInstance().CreateArrayList(payload); - payload = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ + auto iter_payload_0 = dataResponse.payload.begin(); + while (iter_payload_0.Next()) + { + auto & entry_0 = iter_payload_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(payload, newElement_0); + } env->CallVoidMethod(javaCallbackRef, javaMethod, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, payload); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 047e921fb05a78..c750510db1111f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -720,88 +720,145 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$AccessControlCluster$AclAttribute", attributeClass); - VerifyOrReturn(err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$AccessControlCluster$AclAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find AclAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_privilege; + std::string newElement_0_privilegeClassName = "java/lang/Integer"; + std::string newElement_0_privilegeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_privilegeClassName.c_str(), newElement_0_privilegeCtorSignature.c_str(), + static_cast(entry_0.privilege), newElement_0_privilege); + jobject newElement_0_authMode; + std::string newElement_0_authModeClassName = "java/lang/Integer"; + std::string newElement_0_authModeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_authModeClassName.c_str(), newElement_0_authModeCtorSignature.c_str(), + static_cast(entry_0.authMode), newElement_0_authMode); + 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_NaN = entry_0.subjects.Value().begin(); + while (iter_newElement_0_subjects_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_subjects_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Long"; + std::string newElement_NaNCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaNClassName.c_str(), newElement_NaNCtorSignature.c_str(), entry_NaN, newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_subjects, newElement_NaN); + } } - - bool privilegeNull = false; - bool privilegeHasValue = true; - - chip::app::Clusters::AccessControl::Privilege privilegeValue = entry.privilege; - - jobject privilege = nullptr; - if (!privilegeNull && privilegeHasValue) + jobject newElement_0_targets; + if (entry_0.targets.IsNull()) { - jclass privilegeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", privilegeEntryCls); - chip::JniClass privilegeJniClass(privilegeEntryCls); - jmethodID privilegeEntryTypeCtor = env->GetMethodID(privilegeEntryCls, "", "(I)V"); - privilege = env->NewObject(privilegeEntryCls, privilegeEntryTypeCtor, privilegeValue); + newElement_0_targets = nullptr; } - - bool authModeNull = false; - bool authModeHasValue = true; - - chip::app::Clusters::AccessControl::AuthMode authModeValue = entry.authMode; - - jobject authMode = nullptr; - if (!authModeNull && authModeHasValue) + else { - jclass authModeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", authModeEntryCls); - chip::JniClass authModeJniClass(authModeEntryCls); - jmethodID authModeEntryTypeCtor = env->GetMethodID(authModeEntryCls, "", "(I)V"); - authMode = env->NewObject(authModeEntryCls, authModeEntryTypeCtor, authModeValue); + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); + + auto iter_newElement_0_targets_NaN = entry_0.targets.Value().begin(); + while (iter_newElement_0_targets_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_targets_NaN.GetValue(); + jobject newElement_NaN; + jobject newElement_NaN_cluster; + if (entry_NaN.cluster.IsNull()) + { + newElement_NaN_cluster = nullptr; + } + else + { + std::string newElement_NaN_clusterClassName = "java/lang/Long"; + std::string newElement_NaN_clusterCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaN_clusterClassName.c_str(), newElement_NaN_clusterCtorSignature.c_str(), + entry_NaN.cluster.Value(), newElement_NaN_cluster); + } + jobject newElement_NaN_endpoint; + if (entry_NaN.endpoint.IsNull()) + { + newElement_NaN_endpoint = nullptr; + } + else + { + std::string newElement_NaN_endpointClassName = "java/lang/Integer"; + std::string newElement_NaN_endpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaN_endpointClassName.c_str(), newElement_NaN_endpointCtorSignature.c_str(), + entry_NaN.endpoint.Value(), newElement_NaN_endpoint); + } + jobject newElement_NaN_deviceType; + if (entry_NaN.deviceType.IsNull()) + { + newElement_NaN_deviceType = nullptr; + } + else + { + std::string newElement_NaN_deviceTypeClassName = "java/lang/Long"; + std::string newElement_NaN_deviceTypeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaN_deviceTypeClassName.c_str(), newElement_NaN_deviceTypeCtorSignature.c_str(), + entry_NaN.deviceType.Value(), newElement_NaN_deviceType); + } + + jclass targetStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterTarget", targetStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterTarget")); + chip::JniClass structJniClass(targetStructClass); + jmethodID targetStructCtor = + env->GetMethodID(targetStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V"); + VerifyOrReturn(targetStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterTarget constructor")); + + newElement_NaN = env->NewObject(targetStructClass, targetStructCtor, newElement_NaN_cluster, + newElement_NaN_endpoint, newElement_NaN_deviceType); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_targets, newElement_NaN); + } } - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, privilege, authMode); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create AclAttribute object")); + jclass accessControlEntryStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntry", accessControlEntryStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntry")); + chip::JniClass structJniClass(accessControlEntryStructClass); + jmethodID accessControlEntryStructCtor = + env->GetMethodID(accessControlEntryStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Lchip/" + "devicecontroller/ChipStructs$AccessControlClusterTarget;)V"); + VerifyOrReturn(accessControlEntryStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntry constructor")); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + newElement_0 = env->NewObject(accessControlEntryStructClass, accessControlEntryStructCtor, newElement_0_fabricIndex, + newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, newElement_0_targets); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AclAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -854,70 +911,44 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$AccessControlCluster$ExtensionAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$AccessControlCluster$ExtensionAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;[B)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ExtensionAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool dataNull = false; - bool dataHasValue = true; - - chip::ByteSpan dataValue = entry.data; - - jbyteArray data = nullptr; - if (!dataNull && dataHasValue) - { - data = env->NewByteArray(dataValue.size()); - env->SetByteArrayRegion(data, 0, dataValue.size(), reinterpret_cast(dataValue.data())); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, data); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ExtensionAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_data; + jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast(entry_0.data.size())); + env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast(entry_0.data.size()), + reinterpret_cast(entry_0.data.data())); + newElement_0_data = newElement_0_dataByteArray; + + jclass extensionEntryStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterExtensionEntry", extensionEntryStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterExtensionEntry")); + chip::JniClass structJniClass(extensionEntryStructClass); + jmethodID extensionEntryStructCtor = env->GetMethodID(extensionEntryStructClass, "", "(Ljava/lang/Integer;[B)V"); + VerifyOrReturn(extensionEntryStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterExtensionEntry constructor")); + + newElement_0 = + env->NewObject(extensionEntryStructClass, extensionEntryStructCtor, newElement_0_fabricIndex, newElement_0_data); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ExtensionAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -971,43 +1002,24 @@ void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1061,43 +1073,24 @@ void CHIPAccountLoginAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1154,11 +1147,10 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), - javaValueCtorSignature.c_str(), value, javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value, + javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -1211,43 +1203,24 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1301,43 +1274,24 @@ void CHIPApplicationBasicAllowedVendorListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::VendorId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AllowedVendorListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1391,43 +1345,24 @@ void CHIPApplicationBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1481,43 +1416,24 @@ void CHIPApplicationLauncherApplicationLauncherListAttributeCallback::CallbackFn VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint16_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ApplicationLauncherListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1571,43 +1487,24 @@ void CHIPApplicationLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1662,87 +1559,46 @@ void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$AudioOutputCluster$AudioOutputListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find AudioOutputListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool indexNull = false; - bool indexHasValue = true; - - uint8_t indexValue = entry.index; - - jobject index = nullptr; - if (!indexNull && indexHasValue) - { - jclass indexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); - chip::JniClass indexJniClass(indexEntryCls); - jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); - index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); - } - - bool outputTypeNull = false; - bool outputTypeHasValue = true; - - chip::app::Clusters::AudioOutput::OutputTypeEnum outputTypeValue = entry.outputType; - - jobject outputType = nullptr; - if (!outputTypeNull && outputTypeHasValue) - { - jclass outputTypeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", outputTypeEntryCls); - chip::JniClass outputTypeJniClass(outputTypeEntryCls); - jmethodID outputTypeEntryTypeCtor = env->GetMethodID(outputTypeEntryCls, "", "(I)V"); - outputType = env->NewObject(outputTypeEntryCls, outputTypeEntryTypeCtor, outputTypeValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, outputType, name); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create AudioOutputListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jobject newElement_0_outputType; + std::string newElement_0_outputTypeClassName = "java/lang/Integer"; + std::string newElement_0_outputTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_outputTypeClassName.c_str(), newElement_0_outputTypeCtorSignature.c_str(), + static_cast(entry_0.outputType), newElement_0_outputType); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + + jclass outputInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfo", + outputInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfo")); + chip::JniClass structJniClass(outputInfoStructClass); + jmethodID outputInfoStructCtor = + env->GetMethodID(outputInfoStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); + VerifyOrReturn(outputInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfo constructor")); + + newElement_0 = env->NewObject(outputInfoStructClass, outputInfoStructCtor, newElement_0_index, newElement_0_outputType, + newElement_0_name); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AudioOutputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1794,43 +1650,24 @@ void CHIPAudioOutputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1884,43 +1721,24 @@ void CHIPBarrierControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -1975,11 +1793,10 @@ void CHIPBasicVendorIDAttributeCallback::CallbackFn(void * context, chip::Vendor VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value, javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -2030,43 +1847,24 @@ void CHIPBasicAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2120,43 +1918,24 @@ void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2208,43 +1987,24 @@ void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2298,43 +2058,24 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2387,133 +2128,68 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$ActionListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ActionListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool actionIDNull = false; - bool actionIDHasValue = true; - - uint16_t actionIDValue = entry.actionID; - - jobject actionID = nullptr; - if (!actionIDNull && actionIDHasValue) - { - jclass actionIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", actionIDEntryCls); - chip::JniClass actionIDJniClass(actionIDEntryCls); - jmethodID actionIDEntryTypeCtor = env->GetMethodID(actionIDEntryCls, "", "(I)V"); - actionID = env->NewObject(actionIDEntryCls, actionIDEntryTypeCtor, actionIDValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool typeNull = false; - bool typeHasValue = true; - - chip::app::Clusters::BridgedActions::ActionTypeEnum typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - bool endpointListIDNull = false; - bool endpointListIDHasValue = true; - - uint16_t endpointListIDValue = entry.endpointListID; - - jobject endpointListID = nullptr; - if (!endpointListIDNull && endpointListIDHasValue) - { - jclass endpointListIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); - chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); - jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); - endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); - } - - bool supportedCommandsNull = false; - bool supportedCommandsHasValue = true; - - uint16_t supportedCommandsValue = entry.supportedCommands; - - jobject supportedCommands = nullptr; - if (!supportedCommandsNull && supportedCommandsHasValue) - { - jclass supportedCommandsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", supportedCommandsEntryCls); - chip::JniClass supportedCommandsJniClass(supportedCommandsEntryCls); - jmethodID supportedCommandsEntryTypeCtor = env->GetMethodID(supportedCommandsEntryCls, "", "(I)V"); - supportedCommands = env->NewObject(supportedCommandsEntryCls, supportedCommandsEntryTypeCtor, supportedCommandsValue); - } - - bool statusNull = false; - bool statusHasValue = true; - - chip::app::Clusters::BridgedActions::ActionStateEnum statusValue = entry.status; - - jobject status = nullptr; - if (!statusNull && statusHasValue) - { - jclass statusEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", statusEntryCls); - chip::JniClass statusJniClass(statusEntryCls); - jmethodID statusEntryTypeCtor = env->GetMethodID(statusEntryCls, "", "(I)V"); - status = env->NewObject(statusEntryCls, statusEntryTypeCtor, statusValue); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, actionID, name, type, endpointListID, supportedCommands, status); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ActionListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_actionID; + std::string newElement_0_actionIDClassName = "java/lang/Integer"; + std::string newElement_0_actionIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), + newElement_0_actionIDCtorSignature.c_str(), entry_0.actionID, + newElement_0_actionID); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + static_cast(entry_0.type), newElement_0_type); + jobject newElement_0_endpointListID; + std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; + std::string newElement_0_endpointListIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + entry_0.endpointListID, newElement_0_endpointListID); + jobject newElement_0_supportedCommands; + std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; + std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_supportedCommandsClassName.c_str(), + newElement_0_supportedCommandsCtorSignature.c_str(), + entry_0.supportedCommands, newElement_0_supportedCommands); + jobject newElement_0_status; + std::string newElement_0_statusClassName = "java/lang/Integer"; + std::string newElement_0_statusCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_statusClassName.c_str(), + newElement_0_statusCtorSignature.c_str(), + static_cast(entry_0.status), newElement_0_status); + + jclass actionStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$BridgedActionsClusterActionStruct", actionStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$BridgedActionsClusterActionStruct")); + chip::JniClass structJniClass(actionStructStructClass); + jmethodID actionStructStructCtor = env->GetMethodID( + actionStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(actionStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$BridgedActionsClusterActionStruct constructor")); + + newElement_0 = + env->NewObject(actionStructStructClass, actionStructStructCtor, newElement_0_actionID, newElement_0_name, + newElement_0_type, newElement_0_endpointListID, newElement_0_supportedCommands, newElement_0_status); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActionListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2569,86 +2245,63 @@ void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$BridgedActionsCluster$EndpointListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find EndpointListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool endpointListIDNull = false; - bool endpointListIDHasValue = true; - - uint16_t endpointListIDValue = entry.endpointListID; - - jobject endpointListID = nullptr; - if (!endpointListIDNull && endpointListIDHasValue) - { - jclass endpointListIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointListIDEntryCls); - chip::JniClass endpointListIDJniClass(endpointListIDEntryCls); - jmethodID endpointListIDEntryTypeCtor = env->GetMethodID(endpointListIDEntryCls, "", "(I)V"); - endpointListID = env->NewObject(endpointListIDEntryCls, endpointListIDEntryTypeCtor, endpointListIDValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool typeNull = false; - bool typeHasValue = true; - - chip::app::Clusters::BridgedActions::EndpointListTypeEnum typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, endpointListID, name, type); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create EndpointListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_endpointListID; + std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; + std::string newElement_0_endpointListIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + entry_0.endpointListID, newElement_0_endpointListID); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + static_cast(entry_0.type), newElement_0_type); + jobject newElement_0_endpoints; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); + + auto iter_newElement_0_endpoints_NaN = entry_0.endpoints.begin(); + while (iter_newElement_0_endpoints_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_endpoints_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Integer"; + std::string newElement_NaNCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaNClassName.c_str(), newElement_NaNCtorSignature.c_str(), entry_NaN, newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_endpoints, newElement_NaN); + } + + jclass endpointListStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$BridgedActionsClusterEndpointListStruct", endpointListStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$BridgedActionsClusterEndpointListStruct")); + chip::JniClass structJniClass(endpointListStructStructClass); + jmethodID endpointListStructStructCtor = + env->GetMethodID(endpointListStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + VerifyOrReturn(endpointListStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$BridgedActionsClusterEndpointListStruct constructor")); + + newElement_0 = env->NewObject(endpointListStructStructClass, endpointListStructStructCtor, newElement_0_endpointListID, + newElement_0_name, newElement_0_type, newElement_0_endpoints); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding EndpointListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2702,43 +2355,24 @@ void CHIPBridgedActionsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2792,43 +2426,24 @@ void CHIPBridgedDeviceBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -2881,112 +2496,54 @@ void CHIPChannelChannelListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ChannelCluster$ChannelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$ChannelCluster$ChannelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ChannelListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool majorNumberNull = false; - bool majorNumberHasValue = true; - - uint16_t majorNumberValue = entry.majorNumber; - - jobject majorNumber = nullptr; - if (!majorNumberNull && majorNumberHasValue) - { - jclass majorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", majorNumberEntryCls); - chip::JniClass majorNumberJniClass(majorNumberEntryCls); - jmethodID majorNumberEntryTypeCtor = env->GetMethodID(majorNumberEntryCls, "", "(I)V"); - majorNumber = env->NewObject(majorNumberEntryCls, majorNumberEntryTypeCtor, majorNumberValue); - } - - bool minorNumberNull = false; - bool minorNumberHasValue = true; - - uint16_t minorNumberValue = entry.minorNumber; - - jobject minorNumber = nullptr; - if (!minorNumberNull && minorNumberHasValue) - { - jclass minorNumberEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", minorNumberEntryCls); - chip::JniClass minorNumberJniClass(minorNumberEntryCls); - jmethodID minorNumberEntryTypeCtor = env->GetMethodID(minorNumberEntryCls, "", "(I)V"); - minorNumber = env->NewObject(minorNumberEntryCls, minorNumberEntryTypeCtor, minorNumberValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool callSignNull = false; - bool callSignHasValue = true; - - chip::CharSpan callSignValue = entry.callSign; - - jstring callSign = nullptr; - chip::UtfString callSignStr(env, callSignValue); - if (!callSignNull && callSignHasValue) - { - callSign = jstring(callSignStr.jniValue()); - } - - bool affiliateCallSignNull = false; - bool affiliateCallSignHasValue = true; - - chip::CharSpan affiliateCallSignValue = entry.affiliateCallSign; - - jstring affiliateCallSign = nullptr; - chip::UtfString affiliateCallSignStr(env, affiliateCallSignValue); - if (!affiliateCallSignNull && affiliateCallSignHasValue) - { - affiliateCallSign = jstring(affiliateCallSignStr.jniValue()); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, majorNumber, minorNumber, name, callSign, affiliateCallSign); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ChannelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_majorNumber; + std::string newElement_0_majorNumberClassName = "java/lang/Integer"; + std::string newElement_0_majorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_majorNumberClassName.c_str(), + newElement_0_majorNumberCtorSignature.c_str(), + entry_0.majorNumber, newElement_0_majorNumber); + jobject newElement_0_minorNumber; + std::string newElement_0_minorNumberClassName = "java/lang/Integer"; + std::string newElement_0_minorNumberCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minorNumberClassName.c_str(), + newElement_0_minorNumberCtorSignature.c_str(), + entry_0.minorNumber, newElement_0_minorNumber); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_callSign; + newElement_0_callSign = env->NewStringUTF(std::string(entry_0.callSign.data(), entry_0.callSign.size()).c_str()); + jobject newElement_0_affiliateCallSign; + newElement_0_affiliateCallSign = + env->NewStringUTF(std::string(entry_0.affiliateCallSign.data(), entry_0.affiliateCallSign.size()).c_str()); + + jclass channelInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfo", + channelInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfo")); + chip::JniClass structJniClass(channelInfoStructClass); + jmethodID channelInfoStructCtor = + env->GetMethodID(channelInfoStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(channelInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfo constructor")); + + newElement_0 = + env->NewObject(channelInfoStructClass, channelInfoStructCtor, newElement_0_majorNumber, newElement_0_minorNumber, + newElement_0_name, newElement_0_callSign, newElement_0_affiliateCallSign); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ChannelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3038,43 +2595,24 @@ void CHIPChannelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3128,43 +2666,24 @@ void CHIPColorControlAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3218,40 +2737,21 @@ void CHIPContentLauncherAcceptHeaderListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::CharSpan entryValue = entry; - - jstring entryObject = nullptr; - chip::UtfString entryStr(env, entryValue); - if (!entryNull) - { - entryObject = jstring(entryStr.jniValue()); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + newElement_0 = env->NewStringUTF(std::string(entry_0.data(), entry_0.size()).c_str()); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AcceptHeaderListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3305,43 +2805,24 @@ void CHIPContentLauncherAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3394,77 +2875,47 @@ void CHIPDescriptorDeviceListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$DescriptorCluster$DeviceListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find DeviceListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool typeNull = false; - bool typeHasValue = true; + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Long"; + std::string newElement_0_typeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), entry_0.type, newElement_0_type); + jobject newElement_0_revision; + std::string newElement_0_revisionClassName = "java/lang/Integer"; + std::string newElement_0_revisionCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), + newElement_0_revisionCtorSignature.c_str(), entry_0.revision, + newElement_0_revision); + + jclass deviceTypeStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceType", + deviceTypeStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceType")); + chip::JniClass structJniClass(deviceTypeStructClass); + jmethodID deviceTypeStructCtor = + env->GetMethodID(deviceTypeStructClass, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V"); + VerifyOrReturn(deviceTypeStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceType constructor")); + + newElement_0 = env->NewObject(deviceTypeStructClass, deviceTypeStructCtor, newElement_0_type, newElement_0_revision); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); + } - chip::DeviceTypeId typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(J)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - bool revisionNull = false; - bool revisionHasValue = true; - - uint16_t revisionValue = entry.revision; - - jobject revision = nullptr; - if (!revisionNull && revisionHasValue) - { - jclass revisionEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", revisionEntryCls); - chip::JniClass revisionJniClass(revisionEntryCls); - jmethodID revisionEntryTypeCtor = env->GetMethodID(revisionEntryCls, "", "(I)V"); - revision = env->NewObject(revisionEntryCls, revisionEntryTypeCtor, revisionValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, type, revision); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create DeviceListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); - } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding DeviceListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) @@ -3512,42 +2963,24 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ClusterId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ServerListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3599,42 +3032,24 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ClusterId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ClientListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3686,42 +3101,24 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::EndpointId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding PartsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3773,43 +3170,24 @@ void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3863,43 +3241,24 @@ void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -3955,11 +3314,17 @@ void CHIPDoorLockLockStateAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value.Value()), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -4014,11 +3379,17 @@ void CHIPDoorLockDoorStateAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value.Value()), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -4069,43 +3440,24 @@ void CHIPDoorLockAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4159,43 +3511,24 @@ void CHIPElectricalMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4249,43 +3582,24 @@ void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4338,67 +3652,36 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$FixedLabelCluster$LabelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find LabelListAttribute constructor")); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter = list.begin(); - while (iter.Next()) + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - bool valueNull = false; - bool valueHasValue = true; - - chip::CharSpan valueValue = entry.value; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); + jobject newElement_0_value; + newElement_0_value = env->NewStringUTF(std::string(entry_0.value.data(), entry_0.value.size()).c_str()); - jstring value = nullptr; - chip::UtfString valueStr(env, valueValue); - if (!valueNull && valueHasValue) - { - value = jstring(valueStr.jniValue()); - } + jclass labelStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", + labelStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct")); + chip::JniClass structJniClass(labelStructStructClass); + jmethodID labelStructStructCtor = + env->GetMethodID(labelStructStructClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(labelStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor")); - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, value); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create LabelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + newElement_0 = env->NewObject(labelStructStructClass, labelStructStructCtor, newElement_0_label, newElement_0_value); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding LabelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4450,43 +3733,24 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4540,43 +3804,24 @@ void CHIPFlowMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4633,62 +3878,42 @@ void CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback::Callba VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class " - "chip/devicecontroller/ChipClusters$GeneralCommissioningCluster$BasicCommissioningInfoListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find BasicCommissioningInfoListAttribute constructor")); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter = list.begin(); - while (iter.Next()) + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool failSafeExpiryLengthMsNull = false; - bool failSafeExpiryLengthMsHasValue = true; - - uint32_t failSafeExpiryLengthMsValue = entry.failSafeExpiryLengthMs; - - jobject failSafeExpiryLengthMs = nullptr; - if (!failSafeExpiryLengthMsNull && failSafeExpiryLengthMsHasValue) - { - jclass failSafeExpiryLengthMsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", failSafeExpiryLengthMsEntryCls); - chip::JniClass failSafeExpiryLengthMsJniClass(failSafeExpiryLengthMsEntryCls); - jmethodID failSafeExpiryLengthMsEntryTypeCtor = env->GetMethodID(failSafeExpiryLengthMsEntryCls, "", "(J)V"); - failSafeExpiryLengthMs = - env->NewObject(failSafeExpiryLengthMsEntryCls, failSafeExpiryLengthMsEntryTypeCtor, failSafeExpiryLengthMsValue); - } + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_failSafeExpiryLengthMs; + std::string newElement_0_failSafeExpiryLengthMsClassName = "java/lang/Long"; + std::string newElement_0_failSafeExpiryLengthMsCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_failSafeExpiryLengthMsClassName.c_str(), newElement_0_failSafeExpiryLengthMsCtorSignature.c_str(), + entry_0.failSafeExpiryLengthMs, newElement_0_failSafeExpiryLengthMs); - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, failSafeExpiryLengthMs); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create BasicCommissioningInfoListAttribute object")); + jclass basicCommissioningInfoTypeStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GeneralCommissioningClusterBasicCommissioningInfoType", + basicCommissioningInfoTypeStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$GeneralCommissioningClusterBasicCommissioningInfoType")); + chip::JniClass structJniClass(basicCommissioningInfoTypeStructClass); + jmethodID basicCommissioningInfoTypeStructCtor = + env->GetMethodID(basicCommissioningInfoTypeStructClass, "", "(Ljava/lang/Long;)V"); + VerifyOrReturn( + basicCommissioningInfoTypeStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$GeneralCommissioningClusterBasicCommissioningInfoType constructor")); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + newElement_0 = env->NewObject(basicCommissioningInfoTypeStructClass, basicCommissioningInfoTypeStructCtor, + newElement_0_failSafeExpiryLengthMs); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding BasicCommissioningInfoListAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4742,43 +3967,24 @@ void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -4834,139 +4040,71 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, "Could not find class chip/devicecontroller/ChipClusters$GeneralDiagnosticsCluster$NetworkInterfacesAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NetworkInterfacesAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool fabricConnectedNull = false; - bool fabricConnectedHasValue = true; - - bool fabricConnectedValue = entry.fabricConnected; - - jobject fabricConnected = nullptr; - if (!fabricConnectedNull && fabricConnectedHasValue) - { - jclass fabricConnectedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fabricConnectedEntryCls); - chip::JniClass fabricConnectedJniClass(fabricConnectedEntryCls); - jmethodID fabricConnectedEntryTypeCtor = env->GetMethodID(fabricConnectedEntryCls, "", "(Z)V"); - fabricConnected = env->NewObject(fabricConnectedEntryCls, fabricConnectedEntryTypeCtor, fabricConnectedValue); - } - - bool offPremiseServicesReachableIPv4Null = false; - bool offPremiseServicesReachableIPv4HasValue = true; - - bool offPremiseServicesReachableIPv4Value = entry.offPremiseServicesReachableIPv4; - - jobject offPremiseServicesReachableIPv4 = nullptr; - if (!offPremiseServicesReachableIPv4Null && offPremiseServicesReachableIPv4HasValue) - { - jclass offPremiseServicesReachableIPv4EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv4EntryCls); - chip::JniClass offPremiseServicesReachableIPv4JniClass(offPremiseServicesReachableIPv4EntryCls); - jmethodID offPremiseServicesReachableIPv4EntryTypeCtor = - env->GetMethodID(offPremiseServicesReachableIPv4EntryCls, "", "(Z)V"); - offPremiseServicesReachableIPv4 = - env->NewObject(offPremiseServicesReachableIPv4EntryCls, offPremiseServicesReachableIPv4EntryTypeCtor, - offPremiseServicesReachableIPv4Value); - } - - bool offPremiseServicesReachableIPv6Null = false; - bool offPremiseServicesReachableIPv6HasValue = true; - - bool offPremiseServicesReachableIPv6Value = entry.offPremiseServicesReachableIPv6; - - jobject offPremiseServicesReachableIPv6 = nullptr; - if (!offPremiseServicesReachableIPv6Null && offPremiseServicesReachableIPv6HasValue) - { - jclass offPremiseServicesReachableIPv6EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", offPremiseServicesReachableIPv6EntryCls); - chip::JniClass offPremiseServicesReachableIPv6JniClass(offPremiseServicesReachableIPv6EntryCls); - jmethodID offPremiseServicesReachableIPv6EntryTypeCtor = - env->GetMethodID(offPremiseServicesReachableIPv6EntryCls, "", "(Z)V"); - offPremiseServicesReachableIPv6 = - env->NewObject(offPremiseServicesReachableIPv6EntryCls, offPremiseServicesReachableIPv6EntryTypeCtor, - offPremiseServicesReachableIPv6Value); - } - - bool hardwareAddressNull = false; - bool hardwareAddressHasValue = true; - - chip::ByteSpan hardwareAddressValue = entry.hardwareAddress; - - jbyteArray hardwareAddress = nullptr; - if (!hardwareAddressNull && hardwareAddressHasValue) - { - hardwareAddress = env->NewByteArray(hardwareAddressValue.size()); - env->SetByteArrayRegion(hardwareAddress, 0, hardwareAddressValue.size(), - reinterpret_cast(hardwareAddressValue.data())); - } - - bool typeNull = false; - bool typeHasValue = true; - - chip::app::Clusters::GeneralDiagnostics::InterfaceType typeValue = entry.type; - - jobject type = nullptr; - if (!typeNull && typeHasValue) - { - jclass typeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", typeEntryCls); - chip::JniClass typeJniClass(typeEntryCls); - jmethodID typeEntryTypeCtor = env->GetMethodID(typeEntryCls, "", "(I)V"); - type = env->NewObject(typeEntryCls, typeEntryTypeCtor, typeValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, name, fabricConnected, offPremiseServicesReachableIPv4, - offPremiseServicesReachableIPv6, hardwareAddress, type); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NetworkInterfacesAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_fabricConnected; + std::string newElement_0_fabricConnectedClassName = "java/lang/Boolean"; + std::string newElement_0_fabricConnectedCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricConnectedClassName.c_str(), + newElement_0_fabricConnectedCtorSignature.c_str(), + entry_0.fabricConnected, newElement_0_fabricConnected); + jobject newElement_0_offPremiseServicesReachableIPv4; + std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; + std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), + newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), entry_0.offPremiseServicesReachableIPv4, + newElement_0_offPremiseServicesReachableIPv4); + jobject newElement_0_offPremiseServicesReachableIPv6; + std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; + std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), + newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), entry_0.offPremiseServicesReachableIPv6, + newElement_0_offPremiseServicesReachableIPv6); + jobject newElement_0_hardwareAddress; + jbyteArray newElement_0_hardwareAddressByteArray = env->NewByteArray(static_cast(entry_0.hardwareAddress.size())); + env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, static_cast(entry_0.hardwareAddress.size()), + reinterpret_cast(entry_0.hardwareAddress.data())); + newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_typeClassName.c_str(), + newElement_0_typeCtorSignature.c_str(), + static_cast(entry_0.type), newElement_0_type); + + jclass networkInterfaceTypeStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterfaceType", + networkInterfaceTypeStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterfaceType")); + chip::JniClass structJniClass(networkInterfaceTypeStructClass); + jmethodID networkInterfaceTypeStructCtor = + env->GetMethodID(networkInterfaceTypeStructClass, "", + "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/lang/Integer;)V"); + VerifyOrReturn(networkInterfaceTypeStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterfaceType constructor")); + + newElement_0 = + env->NewObject(networkInterfaceTypeStructClass, networkInterfaceTypeStructCtor, newElement_0_name, + newElement_0_fabricConnected, newElement_0_offPremiseServicesReachableIPv4, + newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, newElement_0_type); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NetworkInterfacesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5020,43 +4158,24 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveHardwareFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5110,43 +4229,24 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn(void * VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveRadioFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5200,43 +4300,24 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5290,43 +4371,24 @@ void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5381,90 +4443,52 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeyMapAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupKeyMapAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupKeyMapAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool groupIdNull = false; - bool groupIdHasValue = true; - - uint16_t groupIdValue = entry.groupId; - - jobject groupId = nullptr; - if (!groupIdNull && groupIdHasValue) - { - jclass groupIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupIdEntryCls); - chip::JniClass groupIdJniClass(groupIdEntryCls); - jmethodID groupIdEntryTypeCtor = env->GetMethodID(groupIdEntryCls, "", "(I)V"); - groupId = env->NewObject(groupIdEntryCls, groupIdEntryTypeCtor, groupIdValue); - } - - bool groupKeySetIDNull = false; - bool groupKeySetIDHasValue = true; - - uint16_t groupKeySetIDValue = entry.groupKeySetID; - - jobject groupKeySetID = nullptr; - if (!groupKeySetIDNull && groupKeySetIDHasValue) - { - jclass groupKeySetIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupKeySetIDEntryCls); - chip::JniClass groupKeySetIDJniClass(groupKeySetIDEntryCls); - jmethodID groupKeySetIDEntryTypeCtor = env->GetMethodID(groupKeySetIDEntryCls, "", "(I)V"); - groupKeySetID = env->NewObject(groupKeySetIDEntryCls, groupKeySetIDEntryTypeCtor, groupKeySetIDValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, groupId, groupKeySetID); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupKeyMapAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, + newElement_0_groupId); + jobject newElement_0_groupKeySetID; + std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; + std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), + newElement_0_groupKeySetIDCtorSignature.c_str(), + entry_0.groupKeySetID, newElement_0_groupKeySetID); + + jclass groupKeyStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKey", groupKeyStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKey")); + chip::JniClass structJniClass(groupKeyStructClass); + jmethodID groupKeyStructCtor = + env->GetMethodID(groupKeyStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(groupKeyStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKey constructor")); + + newElement_0 = env->NewObject(groupKeyStructClass, groupKeyStructCtor, newElement_0_fabricIndex, newElement_0_groupId, + newElement_0_groupKeySetID); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding GroupKeyMapAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5519,86 +4543,62 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupTableAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$GroupKeyManagementCluster$GroupTableAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find GroupTableAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - uint16_t fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool groupIdNull = false; - bool groupIdHasValue = true; - - uint16_t groupIdValue = entry.groupId; - - jobject groupId = nullptr; - if (!groupIdNull && groupIdHasValue) - { - jclass groupIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", groupIdEntryCls); - chip::JniClass groupIdJniClass(groupIdEntryCls); - jmethodID groupIdEntryTypeCtor = env->GetMethodID(groupIdEntryCls, "", "(I)V"); - groupId = env->NewObject(groupIdEntryCls, groupIdEntryTypeCtor, groupIdValue); - } - - bool groupNameNull = false; - bool groupNameHasValue = true; - - chip::CharSpan groupNameValue = entry.groupName; - - jstring groupName = nullptr; - chip::UtfString groupNameStr(env, groupNameValue); - if (!groupNameNull && groupNameHasValue) - { - groupName = jstring(groupNameStr.jniValue()); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, groupId, groupName); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create GroupTableAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), entry_0.groupId, + newElement_0_groupId); + jobject newElement_0_endpoints; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); + + auto iter_newElement_0_endpoints_NaN = entry_0.endpoints.begin(); + while (iter_newElement_0_endpoints_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_endpoints_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Integer"; + std::string newElement_NaNCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_NaNClassName.c_str(), newElement_NaNCtorSignature.c_str(), entry_NaN, newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_endpoints, newElement_NaN); + } + jobject newElement_0_groupName; + newElement_0_groupName = env->NewStringUTF(std::string(entry_0.groupName.data(), entry_0.groupName.size()).c_str()); + + jclass groupInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfo", groupInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfo")); + chip::JniClass structJniClass(groupInfoStructClass); + jmethodID groupInfoStructCtor = env->GetMethodID( + groupInfoStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/lang/String;)V"); + VerifyOrReturn(groupInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfo constructor")); + + newElement_0 = env->NewObject(groupInfoStructClass, groupInfoStructCtor, newElement_0_fabricIndex, newElement_0_groupId, + newElement_0_endpoints, newElement_0_groupName); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding GroupTableAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5652,43 +4652,24 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5740,43 +4721,24 @@ void CHIPGroupsAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5828,43 +4790,24 @@ void CHIPIdentifyAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -5922,11 +4865,17 @@ void CHIPIlluminanceMeasurementMeasuredValueAttributeCallback::CallbackFn(void * VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -5983,11 +4932,17 @@ void CHIPIlluminanceMeasurementMinMeasuredValueAttributeCallback::CallbackFn(voi VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6044,11 +4999,17 @@ void CHIPIlluminanceMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(voi VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6105,11 +5066,17 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6162,43 +5129,24 @@ void CHIPIlluminanceMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -6250,43 +5198,24 @@ void CHIPKeypadInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -6341,11 +5270,17 @@ void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6402,11 +5337,17 @@ void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * contex VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6463,11 +5404,17 @@ void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * conte VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6524,11 +5471,17 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6585,11 +5538,17 @@ void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * con VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6642,43 +5601,24 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -6732,40 +5672,21 @@ void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::CharSpan entryValue = entry; - - jstring entryObject = nullptr; - chip::UtfString entryStr(env, entryValue); - if (!entryNull) - { - entryObject = jstring(entryStr.jniValue()); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + newElement_0 = env->NewStringUTF(std::string(entry_0.data(), entry_0.size()).c_str()); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedLocalesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -6817,43 +5738,24 @@ void CHIPLowPowerAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -6906,99 +5808,48 @@ void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$MediaInputCluster$MediaInputListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find MediaInputListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool indexNull = false; - bool indexHasValue = true; - - uint8_t indexValue = entry.index; - - jobject index = nullptr; - if (!indexNull && indexHasValue) - { - jclass indexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", indexEntryCls); - chip::JniClass indexJniClass(indexEntryCls); - jmethodID indexEntryTypeCtor = env->GetMethodID(indexEntryCls, "", "(I)V"); - index = env->NewObject(indexEntryCls, indexEntryTypeCtor, indexValue); - } - - bool inputTypeNull = false; - bool inputTypeHasValue = true; - - chip::app::Clusters::MediaInput::InputTypeEnum inputTypeValue = entry.inputType; - - jobject inputType = nullptr; - if (!inputTypeNull && inputTypeHasValue) - { - jclass inputTypeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", inputTypeEntryCls); - chip::JniClass inputTypeJniClass(inputTypeEntryCls); - jmethodID inputTypeEntryTypeCtor = env->GetMethodID(inputTypeEntryCls, "", "(I)V"); - inputType = env->NewObject(inputTypeEntryCls, inputTypeEntryTypeCtor, inputTypeValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool descriptionNull = false; - bool descriptionHasValue = true; - - chip::CharSpan descriptionValue = entry.description; - - jstring description = nullptr; - chip::UtfString descriptionStr(env, descriptionValue); - if (!descriptionNull && descriptionHasValue) - { - description = jstring(descriptionStr.jniValue()); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, index, inputType, name, description); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create MediaInputListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_index; + std::string newElement_0_indexClassName = "java/lang/Integer"; + std::string newElement_0_indexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_indexClassName.c_str(), newElement_0_indexCtorSignature.c_str(), entry_0.index, newElement_0_index); + jobject newElement_0_inputType; + std::string newElement_0_inputTypeClassName = "java/lang/Integer"; + std::string newElement_0_inputTypeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_inputTypeClassName.c_str(), newElement_0_inputTypeCtorSignature.c_str(), + static_cast(entry_0.inputType), newElement_0_inputType); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_description; + newElement_0_description = env->NewStringUTF(std::string(entry_0.description.data(), entry_0.description.size()).c_str()); + + jclass inputInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfo", + inputInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfo")); + chip::JniClass structJniClass(inputInfoStructClass); + jmethodID inputInfoStructCtor = env->GetMethodID( + inputInfoStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(inputInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfo constructor")); + + newElement_0 = env->NewObject(inputInfoStructClass, inputInfoStructCtor, newElement_0_index, newElement_0_inputType, + newElement_0_name, newElement_0_description); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding MediaInputListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7050,43 +5901,24 @@ void CHIPMediaInputAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7140,43 +5972,24 @@ void CHIPMediaPlaybackAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7229,87 +6042,47 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$ModeSelectCluster$SupportedModesAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SupportedModesAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - bool modeNull = false; - bool modeHasValue = true; - - uint8_t modeValue = entry.mode; - - jobject mode = nullptr; - if (!modeNull && modeHasValue) - { - jclass modeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", modeEntryCls); - chip::JniClass modeJniClass(modeEntryCls); - jmethodID modeEntryTypeCtor = env->GetMethodID(modeEntryCls, "", "(I)V"); - mode = env->NewObject(modeEntryCls, modeEntryTypeCtor, modeValue); - } - - bool semanticTagNull = false; - bool semanticTagHasValue = true; - - uint32_t semanticTagValue = entry.semanticTag; - - jobject semanticTag = nullptr; - if (!semanticTagNull && semanticTagHasValue) - { - jclass semanticTagEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", semanticTagEntryCls); - chip::JniClass semanticTagJniClass(semanticTagEntryCls); - jmethodID semanticTagEntryTypeCtor = env->GetMethodID(semanticTagEntryCls, "", "(J)V"); - semanticTag = env->NewObject(semanticTagEntryCls, semanticTagEntryTypeCtor, semanticTagValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, mode, semanticTag); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SupportedModesAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), entry_0.mode, newElement_0_mode); + jobject newElement_0_semanticTag; + std::string newElement_0_semanticTagClassName = "java/lang/Long"; + std::string newElement_0_semanticTagCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_semanticTagClassName.c_str(), + newElement_0_semanticTagCtorSignature.c_str(), + entry_0.semanticTag, newElement_0_semanticTag); + + jclass modeOptionStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct")); + chip::JniClass structJniClass(modeOptionStructStructClass); + jmethodID modeOptionStructStructCtor = + env->GetMethodID(modeOptionStructStructClass, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V"); + VerifyOrReturn(modeOptionStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor")); + + newElement_0 = env->NewObject(modeOptionStructStructClass, modeOptionStructStructCtor, newElement_0_label, + newElement_0_mode, newElement_0_semanticTag); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedModesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7361,43 +6134,24 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7453,70 +6207,44 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$NetworkCommissioningCluster$NetworksAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$NetworkCommissioningCluster$NetworksAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "([BLjava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NetworksAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool networkIDNull = false; - bool networkIDHasValue = true; - - chip::ByteSpan networkIDValue = entry.networkID; - - jbyteArray networkID = nullptr; - if (!networkIDNull && networkIDHasValue) - { - networkID = env->NewByteArray(networkIDValue.size()); - env->SetByteArrayRegion(networkID, 0, networkIDValue.size(), reinterpret_cast(networkIDValue.data())); - } - - bool connectedNull = false; - bool connectedHasValue = true; - - bool connectedValue = entry.connected; - - jobject connected = nullptr; - if (!connectedNull && connectedHasValue) - { - jclass connectedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", connectedEntryCls); - chip::JniClass connectedJniClass(connectedEntryCls); - jmethodID connectedEntryTypeCtor = env->GetMethodID(connectedEntryCls, "", "(Z)V"); - connected = env->NewObject(connectedEntryCls, connectedEntryTypeCtor, connectedValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, networkID, connected); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NetworksAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_networkID; + jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast(entry_0.networkID.size())); + env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast(entry_0.networkID.size()), + reinterpret_cast(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"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), + newElement_0_connectedCtorSignature.c_str(), entry_0.connected, + newElement_0_connected); + + jclass networkInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfo", networkInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfo")); + chip::JniClass structJniClass(networkInfoStructClass); + jmethodID networkInfoStructCtor = env->GetMethodID(networkInfoStructClass, "", "([BLjava/lang/Boolean;)V"); + VerifyOrReturn(networkInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfo constructor")); + + newElement_0 = + env->NewObject(networkInfoStructClass, networkInfoStructCtor, newElement_0_networkID, newElement_0_connected); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NetworksAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7570,43 +6298,24 @@ void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7663,92 +6372,54 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersAttributeCallback::Callbac VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$OtaSoftwareUpdateRequestorCluster$DefaultOtaProvidersAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class " - "chip/devicecontroller/ChipClusters$OtaSoftwareUpdateRequestorCluster$DefaultOtaProvidersAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find DefaultOtaProvidersAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool providerNodeIDNull = false; - bool providerNodeIDHasValue = true; - - chip::NodeId providerNodeIDValue = entry.providerNodeID; - - jobject providerNodeID = nullptr; - if (!providerNodeIDNull && providerNodeIDHasValue) - { - jclass providerNodeIDEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", providerNodeIDEntryCls); - chip::JniClass providerNodeIDJniClass(providerNodeIDEntryCls); - jmethodID providerNodeIDEntryTypeCtor = env->GetMethodID(providerNodeIDEntryCls, "", "(J)V"); - providerNodeID = env->NewObject(providerNodeIDEntryCls, providerNodeIDEntryTypeCtor, providerNodeIDValue); - } - - bool endpointNull = false; - bool endpointHasValue = true; - - chip::EndpointId endpointValue = entry.endpoint; - - jobject endpoint = nullptr; - if (!endpointNull && endpointHasValue) - { - jclass endpointEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", endpointEntryCls); - chip::JniClass endpointJniClass(endpointEntryCls); - jmethodID endpointEntryTypeCtor = env->GetMethodID(endpointEntryCls, "", "(I)V"); - endpoint = env->NewObject(endpointEntryCls, endpointEntryTypeCtor, endpointValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, providerNodeID, endpoint); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create DefaultOtaProvidersAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_providerNodeID; + std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; + std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), + newElement_0_providerNodeIDCtorSignature.c_str(), + entry_0.providerNodeID, newElement_0_providerNodeID); + jobject newElement_0_endpoint; + std::string newElement_0_endpointClassName = "java/lang/Integer"; + std::string newElement_0_endpointCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), + newElement_0_endpointCtorSignature.c_str(), entry_0.endpoint, + newElement_0_endpoint); + + jclass providerLocationStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", + providerLocationStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation")); + chip::JniClass structJniClass(providerLocationStructClass); + jmethodID providerLocationStructCtor = + env->GetMethodID(providerLocationStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V"); + VerifyOrReturn( + providerLocationStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor")); + + newElement_0 = env->NewObject(providerLocationStructClass, providerLocationStructCtor, newElement_0_fabricIndex, + newElement_0_providerNodeID, newElement_0_endpoint); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding DefaultOtaProvidersAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7807,11 +6478,17 @@ void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::Callbac VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -7864,43 +6541,24 @@ void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -7954,43 +6612,24 @@ void CHIPOccupancySensingAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8042,43 +6681,24 @@ void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8132,43 +6752,24 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8224,82 +6825,49 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;[B[B)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NOCsAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool nocNull = false; - bool nocHasValue = true; - - chip::ByteSpan nocValue = entry.noc; - - jbyteArray noc = nullptr; - if (!nocNull && nocHasValue) - { - noc = env->NewByteArray(nocValue.size()); - env->SetByteArrayRegion(noc, 0, nocValue.size(), reinterpret_cast(nocValue.data())); - } - - bool icacNull = false; - bool icacHasValue = true; - - chip::ByteSpan icacValue = entry.icac; - - jbyteArray icac = nullptr; - if (!icacNull && icacHasValue) - { - icac = env->NewByteArray(icacValue.size()); - env->SetByteArrayRegion(icac, 0, icacValue.size(), reinterpret_cast(icacValue.data())); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, noc, icac); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NOCsAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_noc; + jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); + env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), + reinterpret_cast(entry_0.noc.data())); + newElement_0_noc = newElement_0_nocByteArray; + jobject newElement_0_icac; + jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.size())); + env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.size()), + reinterpret_cast(entry_0.icac.data())); + newElement_0_icac = newElement_0_icacByteArray; + + jclass NOCStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct")); + chip::JniClass structJniClass(NOCStructStructClass); + jmethodID NOCStructStructCtor = env->GetMethodID(NOCStructStructClass, "", "(Ljava/lang/Integer;[B[B)V"); + VerifyOrReturn(NOCStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor")); + + newElement_0 = env->NewObject(NOCStructStructClass, NOCStructStructCtor, newElement_0_fabricIndex, newElement_0_noc, + newElement_0_icac); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NOCsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8355,131 +6923,66 @@ void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$FabricsListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", "(Ljava/lang/Integer;[BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find FabricsListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - chip::FabricIndex fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool rootPublicKeyNull = false; - bool rootPublicKeyHasValue = true; - - chip::ByteSpan rootPublicKeyValue = entry.rootPublicKey; - - jbyteArray rootPublicKey = nullptr; - if (!rootPublicKeyNull && rootPublicKeyHasValue) - { - rootPublicKey = env->NewByteArray(rootPublicKeyValue.size()); - env->SetByteArrayRegion(rootPublicKey, 0, rootPublicKeyValue.size(), - reinterpret_cast(rootPublicKeyValue.data())); - } - - bool vendorIdNull = false; - bool vendorIdHasValue = true; - - uint16_t vendorIdValue = entry.vendorId; - - jobject vendorId = nullptr; - if (!vendorIdNull && vendorIdHasValue) - { - jclass vendorIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", vendorIdEntryCls); - chip::JniClass vendorIdJniClass(vendorIdEntryCls); - jmethodID vendorIdEntryTypeCtor = env->GetMethodID(vendorIdEntryCls, "", "(I)V"); - vendorId = env->NewObject(vendorIdEntryCls, vendorIdEntryTypeCtor, vendorIdValue); - } - - bool fabricIdNull = false; - bool fabricIdHasValue = true; - - chip::FabricId fabricIdValue = entry.fabricId; - - jobject fabricId = nullptr; - if (!fabricIdNull && fabricIdHasValue) - { - jclass fabricIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIdEntryCls); - chip::JniClass fabricIdJniClass(fabricIdEntryCls); - jmethodID fabricIdEntryTypeCtor = env->GetMethodID(fabricIdEntryCls, "", "(J)V"); - fabricId = env->NewObject(fabricIdEntryCls, fabricIdEntryTypeCtor, fabricIdValue); - } - - bool nodeIdNull = false; - bool nodeIdHasValue = true; - - chip::NodeId nodeIdValue = entry.nodeId; - - jobject nodeId = nullptr; - if (!nodeIdNull && nodeIdHasValue) - { - jclass nodeIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", nodeIdEntryCls); - chip::JniClass nodeIdJniClass(nodeIdEntryCls); - jmethodID nodeIdEntryTypeCtor = env->GetMethodID(nodeIdEntryCls, "", "(J)V"); - nodeId = env->NewObject(nodeIdEntryCls, nodeIdEntryTypeCtor, nodeIdValue); - } - - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, fabricIndex, rootPublicKey, vendorId, fabricId, nodeId, label); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create FabricsListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_rootPublicKey; + jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); + env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), + reinterpret_cast(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"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIdClassName.c_str(), + newElement_0_vendorIdCtorSignature.c_str(), entry_0.vendorId, + newElement_0_vendorId); + jobject newElement_0_fabricId; + std::string newElement_0_fabricIdClassName = "java/lang/Long"; + std::string newElement_0_fabricIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIdClassName.c_str(), + newElement_0_fabricIdCtorSignature.c_str(), entry_0.fabricId, + newElement_0_fabricId); + jobject newElement_0_nodeId; + std::string newElement_0_nodeIdClassName = "java/lang/Long"; + std::string newElement_0_nodeIdCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nodeIdClassName.c_str(), newElement_0_nodeIdCtorSignature.c_str(), entry_0.nodeId, newElement_0_nodeId); + jobject newElement_0_label; + newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); + + jclass fabricDescriptorStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptor", fabricDescriptorStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptor")); + chip::JniClass structJniClass(fabricDescriptorStructClass); + jmethodID fabricDescriptorStructCtor = + env->GetMethodID(fabricDescriptorStructClass, "", + "(Ljava/lang/Integer;[BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;)V"); + VerifyOrReturn(fabricDescriptorStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptor constructor")); + + newElement_0 = env->NewObject(fabricDescriptorStructClass, fabricDescriptorStructCtor, newElement_0_fabricIndex, + newElement_0_rootPublicKey, newElement_0_vendorId, newElement_0_fabricId, newElement_0_nodeId, + newElement_0_label); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding FabricsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8534,40 +7037,24 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; - - jbyteArray entryObject = nullptr; - if (!entryNull) - { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); - } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TrustedRootCertificatesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); + } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8624,11 +7111,10 @@ void CHIPOperationalCredentialsCurrentFabricIndexAttributeCallback::CallbackFn(v VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), - javaValueCtorSignature.c_str(), value, javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value, + javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -8681,43 +7167,24 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8771,43 +7238,24 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveBatteryFaultsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8859,43 +7307,24 @@ void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -8949,42 +7378,24 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn(void * con VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SourcesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9038,43 +7449,24 @@ void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9128,43 +7520,24 @@ void CHIPPressureMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9223,11 +7596,17 @@ void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::Callb VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -9285,11 +7664,17 @@ void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::Cal VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -9342,43 +7727,24 @@ void CHIPPumpConfigurationAndControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9432,43 +7798,24 @@ void CHIPRelativeHumidityMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9520,43 +7867,24 @@ void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9612,119 +7940,60 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$SoftwareDiagnosticsCluster$ThreadMetricsAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", "(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ThreadMetricsAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool idNull = false; - bool idHasValue = true; - - uint64_t idValue = entry.id; - - jobject id = nullptr; - if (!idNull && idHasValue) - { - jclass idEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", idEntryCls); - chip::JniClass idJniClass(idEntryCls); - jmethodID idEntryTypeCtor = env->GetMethodID(idEntryCls, "", "(J)V"); - id = env->NewObject(idEntryCls, idEntryTypeCtor, idValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - bool stackFreeCurrentNull = false; - bool stackFreeCurrentHasValue = true; - - uint32_t stackFreeCurrentValue = entry.stackFreeCurrent; - - jobject stackFreeCurrent = nullptr; - if (!stackFreeCurrentNull && stackFreeCurrentHasValue) - { - jclass stackFreeCurrentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeCurrentEntryCls); - chip::JniClass stackFreeCurrentJniClass(stackFreeCurrentEntryCls); - jmethodID stackFreeCurrentEntryTypeCtor = env->GetMethodID(stackFreeCurrentEntryCls, "", "(J)V"); - stackFreeCurrent = env->NewObject(stackFreeCurrentEntryCls, stackFreeCurrentEntryTypeCtor, stackFreeCurrentValue); - } - - bool stackFreeMinimumNull = false; - bool stackFreeMinimumHasValue = true; - - uint32_t stackFreeMinimumValue = entry.stackFreeMinimum; - - jobject stackFreeMinimum = nullptr; - if (!stackFreeMinimumNull && stackFreeMinimumHasValue) - { - jclass stackFreeMinimumEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackFreeMinimumEntryCls); - chip::JniClass stackFreeMinimumJniClass(stackFreeMinimumEntryCls); - jmethodID stackFreeMinimumEntryTypeCtor = env->GetMethodID(stackFreeMinimumEntryCls, "", "(J)V"); - stackFreeMinimum = env->NewObject(stackFreeMinimumEntryCls, stackFreeMinimumEntryTypeCtor, stackFreeMinimumValue); - } - - bool stackSizeNull = false; - bool stackSizeHasValue = true; - - uint32_t stackSizeValue = entry.stackSize; - - jobject stackSize = nullptr; - if (!stackSizeNull && stackSizeHasValue) - { - jclass stackSizeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", stackSizeEntryCls); - chip::JniClass stackSizeJniClass(stackSizeEntryCls); - jmethodID stackSizeEntryTypeCtor = env->GetMethodID(stackSizeEntryCls, "", "(J)V"); - stackSize = env->NewObject(stackSizeEntryCls, stackSizeEntryTypeCtor, stackSizeValue); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, id, name, stackFreeCurrent, stackFreeMinimum, stackSize); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ThreadMetricsAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_id; + std::string newElement_0_idClassName = "java/lang/Long"; + std::string newElement_0_idCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), entry_0.id, newElement_0_id); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); + jobject newElement_0_stackFreeCurrent; + std::string newElement_0_stackFreeCurrentClassName = "java/lang/Long"; + std::string newElement_0_stackFreeCurrentCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stackFreeCurrentClassName.c_str(), + newElement_0_stackFreeCurrentCtorSignature.c_str(), + entry_0.stackFreeCurrent, newElement_0_stackFreeCurrent); + jobject newElement_0_stackFreeMinimum; + std::string newElement_0_stackFreeMinimumClassName = "java/lang/Long"; + std::string newElement_0_stackFreeMinimumCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stackFreeMinimumClassName.c_str(), + newElement_0_stackFreeMinimumCtorSignature.c_str(), + entry_0.stackFreeMinimum, newElement_0_stackFreeMinimum); + jobject newElement_0_stackSize; + std::string newElement_0_stackSizeClassName = "java/lang/Long"; + std::string newElement_0_stackSizeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stackSizeClassName.c_str(), + newElement_0_stackSizeCtorSignature.c_str(), + entry_0.stackSize, newElement_0_stackSize); + + jclass threadMetricsStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetrics", threadMetricsStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetrics")); + chip::JniClass structJniClass(threadMetricsStructClass); + jmethodID threadMetricsStructCtor = + env->GetMethodID(threadMetricsStructClass, "", + "(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + VerifyOrReturn(threadMetricsStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetrics constructor")); + + newElement_0 = env->NewObject(threadMetricsStructClass, threadMetricsStructCtor, newElement_0_id, newElement_0_name, + newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, newElement_0_stackSize); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ThreadMetricsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9778,43 +8047,24 @@ void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9866,43 +8116,24 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -9957,72 +8188,41 @@ void CHIPTargetNavigatorTargetNavigatorListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, "Could not find class chip/devicecontroller/ChipClusters$TargetNavigatorCluster$TargetNavigatorListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find TargetNavigatorListAttribute constructor")); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter = list.begin(); - while (iter.Next()) + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool identifierNull = false; - bool identifierHasValue = true; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_identifier; + std::string newElement_0_identifierClassName = "java/lang/Integer"; + std::string newElement_0_identifierCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + entry_0.identifier, newElement_0_identifier); + jobject newElement_0_name; + newElement_0_name = env->NewStringUTF(std::string(entry_0.name.data(), entry_0.name.size()).c_str()); - uint8_t identifierValue = entry.identifier; + jclass targetInfoStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfo", targetInfoStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfo")); + chip::JniClass structJniClass(targetInfoStructClass); + jmethodID targetInfoStructCtor = + env->GetMethodID(targetInfoStructClass, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + VerifyOrReturn(targetInfoStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfo constructor")); - jobject identifier = nullptr; - if (!identifierNull && identifierHasValue) - { - jclass identifierEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", identifierEntryCls); - chip::JniClass identifierJniClass(identifierEntryCls); - jmethodID identifierEntryTypeCtor = env->GetMethodID(identifierEntryCls, "", "(I)V"); - identifier = env->NewObject(identifierEntryCls, identifierEntryTypeCtor, identifierValue); - } - - bool nameNull = false; - bool nameHasValue = true; - - chip::CharSpan nameValue = entry.name; - - jstring name = nullptr; - chip::UtfString nameStr(env, nameValue); - if (!nameNull && nameHasValue) - { - name = jstring(nameStr.jniValue()); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, identifier, name); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create TargetNavigatorListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + newElement_0 = env->NewObject(targetInfoStructClass, targetInfoStructCtor, newElement_0_identifier, newElement_0_name); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding TargetNavigatorListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10076,43 +8276,24 @@ void CHIPTargetNavigatorAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10166,43 +8347,24 @@ void CHIPTemperatureMeasurementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10254,42 +8416,24 @@ void CHIPTestClusterListInt8uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListInt8uAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10343,40 +8487,24 @@ void CHIPTestClusterListOctetStringAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; - - jbyteArray entryObject = nullptr; - if (!entryNull) - { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10431,73 +8559,45 @@ void CHIPTestClusterListStructOctetStringAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListStructOctetStringAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Long;[B)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find ListStructOctetStringAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool fabricIndexNull = false; - bool fabricIndexHasValue = true; - - uint64_t fabricIndexValue = entry.fabricIndex; - - jobject fabricIndex = nullptr; - if (!fabricIndexNull && fabricIndexHasValue) - { - jclass fabricIndexEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", fabricIndexEntryCls); - chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); - jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(J)V"); - fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); - } - - bool operationalCertNull = false; - bool operationalCertHasValue = true; - - chip::ByteSpan operationalCertValue = entry.operationalCert; - - jbyteArray operationalCert = nullptr; - if (!operationalCertNull && operationalCertHasValue) - { - operationalCert = env->NewByteArray(operationalCertValue.size()); - env->SetByteArrayRegion(operationalCert, 0, operationalCertValue.size(), - reinterpret_cast(operationalCertValue.data())); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, operationalCert); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create ListStructOctetStringAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Long"; + std::string newElement_0_fabricIndexCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + entry_0.fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_operationalCert; + jbyteArray newElement_0_operationalCertByteArray = env->NewByteArray(static_cast(entry_0.operationalCert.size())); + env->SetByteArrayRegion(newElement_0_operationalCertByteArray, 0, static_cast(entry_0.operationalCert.size()), + reinterpret_cast(entry_0.operationalCert.data())); + newElement_0_operationalCert = newElement_0_operationalCertByteArray; + + jclass testListStructOctetStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TestClusterClusterTestListStructOctet", testListStructOctetStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterTestListStructOctet")); + chip::JniClass structJniClass(testListStructOctetStructClass); + jmethodID testListStructOctetStructCtor = + env->GetMethodID(testListStructOctetStructClass, "", "(Ljava/lang/Long;[B)V"); + VerifyOrReturn(testListStructOctetStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterTestListStructOctet constructor")); + + newElement_0 = env->NewObject(testListStructOctetStructClass, testListStructOctetStructCtor, newElement_0_fabricIndex, + newElement_0_operationalCert); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListStructOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10552,11 +8652,10 @@ void CHIPTestClusterVendorIdAttributeCallback::CallbackFn(void * context, chip:: VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value, javaValue); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value), javaValue); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -10611,181 +8710,432 @@ void CHIPTestClusterListNullablesAndOptionalsStructAttributeCallback::CallbackFn VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$TestClusterCluster$ListNullablesAndOptionalsStructAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)V"); - VerifyOrReturn(attributeCtor != nullptr, - ChipLogError(Zcl, "Could not find ListNullablesAndOptionalsStructAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool nullableIntNull = false; - bool nullableIntHasValue = true; - uint16_t nullableIntValue; - nullableIntNull = entry.nullableInt.IsNull(); - if (!nullableIntNull) + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_nullableInt; + if (entry_0.nullableInt.IsNull()) { - nullableIntValue = entry.nullableInt.Value(); + newElement_0_nullableInt = nullptr; } - - jobject nullableInt = nullptr; - if (!nullableIntNull && nullableIntHasValue) + else { - jclass nullableIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableIntEntryCls); - chip::JniClass nullableIntJniClass(nullableIntEntryCls); - jmethodID nullableIntEntryTypeCtor = env->GetMethodID(nullableIntEntryCls, "", "(I)V"); - nullableInt = env->NewObject(nullableIntEntryCls, nullableIntEntryTypeCtor, nullableIntValue); + std::string newElement_0_nullableIntClassName = "java/lang/Integer"; + std::string newElement_0_nullableIntCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nullableIntClassName.c_str(), + newElement_0_nullableIntCtorSignature.c_str(), + entry_0.nullableInt.Value(), newElement_0_nullableInt); } - - bool optionalIntNull = false; - bool optionalIntHasValue = true; - - uint16_t optionalIntValue; - optionalIntHasValue = entry.optionalInt.HasValue(); - if (optionalIntHasValue) + jobject newElement_0_optionalInt; + if (!entry_0.optionalInt.HasValue()) { - optionalIntValue = entry.optionalInt.Value(); + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalInt); } - - jobject optionalInt = nullptr; - if (!optionalIntNull && optionalIntHasValue) + else { - jclass optionalIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", optionalIntEntryCls); - chip::JniClass optionalIntJniClass(optionalIntEntryCls); - jmethodID optionalIntEntryTypeCtor = env->GetMethodID(optionalIntEntryCls, "", "(I)V"); - optionalInt = env->NewObject(optionalIntEntryCls, optionalIntEntryTypeCtor, optionalIntValue); + std::string newElement_0_optionalIntClassName = "java/lang/Integer"; + std::string newElement_0_optionalIntCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_optionalIntClassName.c_str(), + newElement_0_optionalIntCtorSignature.c_str(), + entry_0.optionalInt.Value(), newElement_0_optionalInt); } - - jobject optionalIntOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(optionalInt, optionalIntOptional); - bool nullableOptionalIntNull = false; - bool nullableOptionalIntHasValue = true; - - uint16_t nullableOptionalIntValue; - nullableOptionalIntHasValue = entry.nullableOptionalInt.HasValue(); - if (nullableOptionalIntHasValue) + jobject newElement_0_nullableOptionalInt; + if (!entry_0.nullableOptionalInt.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalInt); + } + else { - auto nullableOptionalIntValueFromOptional = entry.nullableOptionalInt.Value(); - nullableOptionalIntNull = nullableOptionalIntValueFromOptional.IsNull(); - if (!nullableOptionalIntNull) + if (entry_0.nullableOptionalInt.Value().IsNull()) { - nullableOptionalIntValue = nullableOptionalIntValueFromOptional.Value(); + newElement_0_nullableOptionalInt = nullptr; + } + else + { + std::string newElement_0_nullableOptionalIntClassName = "java/lang/Integer"; + std::string newElement_0_nullableOptionalIntCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalIntClassName.c_str(), newElement_0_nullableOptionalIntCtorSignature.c_str(), + entry_0.nullableOptionalInt.Value().Value(), newElement_0_nullableOptionalInt); } } - - jobject nullableOptionalInt = nullptr; - if (!nullableOptionalIntNull && nullableOptionalIntHasValue) + jobject newElement_0_nullableString; + if (entry_0.nullableString.IsNull()) { - jclass nullableOptionalIntEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nullableOptionalIntEntryCls); - chip::JniClass nullableOptionalIntJniClass(nullableOptionalIntEntryCls); - jmethodID nullableOptionalIntEntryTypeCtor = env->GetMethodID(nullableOptionalIntEntryCls, "", "(I)V"); - nullableOptionalInt = - env->NewObject(nullableOptionalIntEntryCls, nullableOptionalIntEntryTypeCtor, nullableOptionalIntValue); + newElement_0_nullableString = nullptr; } - - jobject nullableOptionalIntOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(nullableOptionalInt, nullableOptionalIntOptional); - bool nullableStringNull = false; - bool nullableStringHasValue = true; - chip::CharSpan nullableStringValue; - nullableStringNull = entry.nullableString.IsNull(); - if (!nullableStringNull) + else { - nullableStringValue = entry.nullableString.Value(); + newElement_0_nullableString = env->NewStringUTF( + std::string(entry_0.nullableString.Value().data(), entry_0.nullableString.Value().size()).c_str()); } - - jstring nullableString = nullptr; - chip::UtfString nullableStringStr(env, nullableStringValue); - if (!nullableStringNull && nullableStringHasValue) + jobject newElement_0_optionalString; + if (!entry_0.optionalString.HasValue()) { - nullableString = jstring(nullableStringStr.jniValue()); + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalString); } - - bool optionalStringNull = false; - bool optionalStringHasValue = true; - - chip::CharSpan optionalStringValue; - optionalStringHasValue = entry.optionalString.HasValue(); - if (optionalStringHasValue) + else { - optionalStringValue = entry.optionalString.Value(); + newElement_0_optionalString = env->NewStringUTF( + std::string(entry_0.optionalString.Value().data(), entry_0.optionalString.Value().size()).c_str()); } - - jstring optionalString = nullptr; - chip::UtfString optionalStringStr(env, optionalStringValue); - if (!optionalStringNull && optionalStringHasValue) + jobject newElement_0_nullableOptionalString; + if (!entry_0.nullableOptionalString.HasValue()) { - optionalString = jstring(optionalStringStr.jniValue()); + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalString); } - - jobject optionalStringOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(optionalString, optionalStringOptional); - bool nullableOptionalStringNull = false; - bool nullableOptionalStringHasValue = true; - - chip::CharSpan nullableOptionalStringValue; - nullableOptionalStringHasValue = entry.nullableOptionalString.HasValue(); - if (nullableOptionalStringHasValue) + else { - auto nullableOptionalStringValueFromOptional = entry.nullableOptionalString.Value(); - nullableOptionalStringNull = nullableOptionalStringValueFromOptional.IsNull(); - if (!nullableOptionalStringNull) + if (entry_0.nullableOptionalString.Value().IsNull()) + { + newElement_0_nullableOptionalString = nullptr; + } + else { - nullableOptionalStringValue = nullableOptionalStringValueFromOptional.Value(); + newElement_0_nullableOptionalString = + env->NewStringUTF(std::string(entry_0.nullableOptionalString.Value().Value().data(), + entry_0.nullableOptionalString.Value().Value().size()) + .c_str()); } } - - jstring nullableOptionalString = nullptr; - chip::UtfString nullableOptionalStringStr(env, nullableOptionalStringValue); - if (!nullableOptionalStringNull && nullableOptionalStringHasValue) + 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"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_aClassName.c_str(), newElement_0_nullableStruct_aCtorSignature.c_str(), + entry_0.nullableStruct.Value().a, newElement_0_nullableStruct_a); + jobject newElement_0_nullableStruct_b; + std::string newElement_0_nullableStruct_bClassName = "java/lang/Boolean"; + std::string newElement_0_nullableStruct_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_bClassName.c_str(), newElement_0_nullableStruct_bCtorSignature.c_str(), + entry_0.nullableStruct.Value().b, newElement_0_nullableStruct_b); + jobject newElement_0_nullableStruct_c; + std::string newElement_0_nullableStruct_cClassName = "java/lang/Integer"; + std::string newElement_0_nullableStruct_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_cClassName.c_str(), newElement_0_nullableStruct_cCtorSignature.c_str(), + static_cast(entry_0.nullableStruct.Value().c), newElement_0_nullableStruct_c); + jobject newElement_0_nullableStruct_d; + jbyteArray newElement_0_nullableStruct_dByteArray = + env->NewByteArray(static_cast(entry_0.nullableStruct.Value().d.size())); + env->SetByteArrayRegion(newElement_0_nullableStruct_dByteArray, 0, + static_cast(entry_0.nullableStruct.Value().d.size()), + reinterpret_cast(entry_0.nullableStruct.Value().d.data())); + newElement_0_nullableStruct_d = newElement_0_nullableStruct_dByteArray; + jobject newElement_0_nullableStruct_e; + newElement_0_nullableStruct_e = env->NewStringUTF( + std::string(entry_0.nullableStruct.Value().e.data(), entry_0.nullableStruct.Value().e.size()).c_str()); + jobject newElement_0_nullableStruct_f; + std::string newElement_0_nullableStruct_fClassName = "java/lang/Integer"; + std::string newElement_0_nullableStruct_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_fClassName.c_str(), newElement_0_nullableStruct_fCtorSignature.c_str(), + entry_0.nullableStruct.Value().f.Raw(), newElement_0_nullableStruct_f); + jobject newElement_0_nullableStruct_g; + std::string newElement_0_nullableStruct_gClassName = "java/lang/Float"; + std::string newElement_0_nullableStruct_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_gClassName.c_str(), newElement_0_nullableStruct_gCtorSignature.c_str(), + entry_0.nullableStruct.Value().g, newElement_0_nullableStruct_g); + jobject newElement_0_nullableStruct_h; + std::string newElement_0_nullableStruct_hClassName = "java/lang/Double"; + std::string newElement_0_nullableStruct_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableStruct_hClassName.c_str(), newElement_0_nullableStruct_hCtorSignature.c_str(), + entry_0.nullableStruct.Value().h, newElement_0_nullableStruct_h); + + jclass simpleStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct")); + chip::JniClass structJniClass(simpleStructStructClass); + jmethodID simpleStructStructCtor = + env->GetMethodID(simpleStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + VerifyOrReturn(simpleStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor")); + + newElement_0_nullableStruct = env->NewObject( + simpleStructStructClass, simpleStructStructCtor, 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_optionalStruct_a; + std::string newElement_0_optionalStruct_aClassName = "java/lang/Integer"; + std::string newElement_0_optionalStruct_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_aClassName.c_str(), newElement_0_optionalStruct_aCtorSignature.c_str(), + entry_0.optionalStruct.Value().a, newElement_0_optionalStruct_a); + jobject newElement_0_optionalStruct_b; + std::string newElement_0_optionalStruct_bClassName = "java/lang/Boolean"; + std::string newElement_0_optionalStruct_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_bClassName.c_str(), newElement_0_optionalStruct_bCtorSignature.c_str(), + entry_0.optionalStruct.Value().b, newElement_0_optionalStruct_b); + jobject newElement_0_optionalStruct_c; + std::string newElement_0_optionalStruct_cClassName = "java/lang/Integer"; + std::string newElement_0_optionalStruct_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_cClassName.c_str(), newElement_0_optionalStruct_cCtorSignature.c_str(), + static_cast(entry_0.optionalStruct.Value().c), newElement_0_optionalStruct_c); + jobject newElement_0_optionalStruct_d; + jbyteArray newElement_0_optionalStruct_dByteArray = + env->NewByteArray(static_cast(entry_0.optionalStruct.Value().d.size())); + env->SetByteArrayRegion(newElement_0_optionalStruct_dByteArray, 0, + static_cast(entry_0.optionalStruct.Value().d.size()), + reinterpret_cast(entry_0.optionalStruct.Value().d.data())); + newElement_0_optionalStruct_d = newElement_0_optionalStruct_dByteArray; + jobject newElement_0_optionalStruct_e; + newElement_0_optionalStruct_e = env->NewStringUTF( + std::string(entry_0.optionalStruct.Value().e.data(), entry_0.optionalStruct.Value().e.size()).c_str()); + jobject newElement_0_optionalStruct_f; + std::string newElement_0_optionalStruct_fClassName = "java/lang/Integer"; + std::string newElement_0_optionalStruct_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_fClassName.c_str(), newElement_0_optionalStruct_fCtorSignature.c_str(), + entry_0.optionalStruct.Value().f.Raw(), newElement_0_optionalStruct_f); + jobject newElement_0_optionalStruct_g; + std::string newElement_0_optionalStruct_gClassName = "java/lang/Float"; + std::string newElement_0_optionalStruct_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_gClassName.c_str(), newElement_0_optionalStruct_gCtorSignature.c_str(), + entry_0.optionalStruct.Value().g, newElement_0_optionalStruct_g); + jobject newElement_0_optionalStruct_h; + std::string newElement_0_optionalStruct_hClassName = "java/lang/Double"; + std::string newElement_0_optionalStruct_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_optionalStruct_hClassName.c_str(), newElement_0_optionalStruct_hCtorSignature.c_str(), + entry_0.optionalStruct.Value().h, newElement_0_optionalStruct_h); + + jclass simpleStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct")); + chip::JniClass structJniClass(simpleStructStructClass); + jmethodID simpleStructStructCtor = + env->GetMethodID(simpleStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + VerifyOrReturn(simpleStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor")); + + newElement_0_optionalStruct = env->NewObject( + simpleStructStructClass, simpleStructStructCtor, newElement_0_optionalStruct_a, newElement_0_optionalStruct_b, + newElement_0_optionalStruct_c, newElement_0_optionalStruct_d, newElement_0_optionalStruct_e, + newElement_0_optionalStruct_f, newElement_0_optionalStruct_g, newElement_0_optionalStruct_h); + } + jobject newElement_0_nullableOptionalStruct; + if (!entry_0.nullableOptionalStruct.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalStruct); + } + else + { + if (entry_0.nullableOptionalStruct.Value().IsNull()) + { + newElement_0_nullableOptionalStruct = nullptr; + } + else + { + jobject newElement_0_nullableOptionalStruct_a; + std::string newElement_0_nullableOptionalStruct_aClassName = "java/lang/Integer"; + std::string newElement_0_nullableOptionalStruct_aCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_aClassName.c_str(), + newElement_0_nullableOptionalStruct_aCtorSignature.c_str(), entry_0.nullableOptionalStruct.Value().Value().a, + newElement_0_nullableOptionalStruct_a); + jobject newElement_0_nullableOptionalStruct_b; + std::string newElement_0_nullableOptionalStruct_bClassName = "java/lang/Boolean"; + std::string newElement_0_nullableOptionalStruct_bCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_bClassName.c_str(), + newElement_0_nullableOptionalStruct_bCtorSignature.c_str(), entry_0.nullableOptionalStruct.Value().Value().b, + newElement_0_nullableOptionalStruct_b); + jobject newElement_0_nullableOptionalStruct_c; + std::string newElement_0_nullableOptionalStruct_cClassName = "java/lang/Integer"; + std::string newElement_0_nullableOptionalStruct_cCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_cClassName.c_str(), + newElement_0_nullableOptionalStruct_cCtorSignature.c_str(), + static_cast(entry_0.nullableOptionalStruct.Value().Value().c), newElement_0_nullableOptionalStruct_c); + jobject newElement_0_nullableOptionalStruct_d; + jbyteArray newElement_0_nullableOptionalStruct_dByteArray = + env->NewByteArray(static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size())); + env->SetByteArrayRegion(newElement_0_nullableOptionalStruct_dByteArray, 0, + static_cast(entry_0.nullableOptionalStruct.Value().Value().d.size()), + reinterpret_cast(entry_0.nullableOptionalStruct.Value().Value().d.data())); + newElement_0_nullableOptionalStruct_d = newElement_0_nullableOptionalStruct_dByteArray; + jobject newElement_0_nullableOptionalStruct_e; + newElement_0_nullableOptionalStruct_e = + env->NewStringUTF(std::string(entry_0.nullableOptionalStruct.Value().Value().e.data(), + entry_0.nullableOptionalStruct.Value().Value().e.size()) + .c_str()); + jobject newElement_0_nullableOptionalStruct_f; + std::string newElement_0_nullableOptionalStruct_fClassName = "java/lang/Integer"; + std::string newElement_0_nullableOptionalStruct_fCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_fClassName.c_str(), + newElement_0_nullableOptionalStruct_fCtorSignature.c_str(), + entry_0.nullableOptionalStruct.Value().Value().f.Raw(), newElement_0_nullableOptionalStruct_f); + jobject newElement_0_nullableOptionalStruct_g; + std::string newElement_0_nullableOptionalStruct_gClassName = "java/lang/Float"; + std::string newElement_0_nullableOptionalStruct_gCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_gClassName.c_str(), + newElement_0_nullableOptionalStruct_gCtorSignature.c_str(), entry_0.nullableOptionalStruct.Value().Value().g, + newElement_0_nullableOptionalStruct_g); + jobject newElement_0_nullableOptionalStruct_h; + std::string newElement_0_nullableOptionalStruct_hClassName = "java/lang/Double"; + std::string newElement_0_nullableOptionalStruct_hCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nullableOptionalStruct_hClassName.c_str(), + newElement_0_nullableOptionalStruct_hCtorSignature.c_str(), entry_0.nullableOptionalStruct.Value().Value().h, + newElement_0_nullableOptionalStruct_h); + + jclass simpleStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct", simpleStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterSimpleStruct")); + chip::JniClass structJniClass(simpleStructStructClass); + jmethodID simpleStructStructCtor = + env->GetMethodID(simpleStructStructClass, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;)V"); + VerifyOrReturn(simpleStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterSimpleStruct constructor")); + + newElement_0_nullableOptionalStruct = + env->NewObject(simpleStructStructClass, simpleStructStructCtor, newElement_0_nullableOptionalStruct_a, + newElement_0_nullableOptionalStruct_b, newElement_0_nullableOptionalStruct_c, + newElement_0_nullableOptionalStruct_d, newElement_0_nullableOptionalStruct_e, + newElement_0_nullableOptionalStruct_f, newElement_0_nullableOptionalStruct_g, + newElement_0_nullableOptionalStruct_h); + } + } + jobject newElement_0_nullableList; + if (entry_0.nullableList.IsNull()) { - nullableOptionalString = jstring(nullableOptionalStringStr.jniValue()); + newElement_0_nullableList = nullptr; } + else + { + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableList); - jobject nullableOptionalStringOptional = nullptr; - chip::JniReferences::GetInstance().CreateOptional(nullableOptionalString, nullableOptionalStringOptional); + auto iter_newElement_0_nullableList_NaN = entry_0.nullableList.Value().begin(); + while (iter_newElement_0_nullableList_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_nullableList_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Integer"; + std::string newElement_NaNCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_NaNClassName.c_str(), + newElement_NaNCtorSignature.c_str(), + static_cast(entry_NaN), newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_nullableList, newElement_NaN); + } + } + jobject newElement_0_optionalList; + if (!entry_0.optionalList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_optionalList); + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_optionalList); - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, nullableInt, optionalIntOptional, nullableOptionalIntOptional, - nullableString, optionalStringOptional, nullableOptionalStringOptional); - VerifyOrReturn(attributeObj != nullptr, - ChipLogError(Zcl, "Could not create ListNullablesAndOptionalsStructAttribute object")); + auto iter_newElement_0_optionalList_NaN = entry_0.optionalList.Value().begin(); + while (iter_newElement_0_optionalList_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_optionalList_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Integer"; + std::string newElement_NaNCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_NaNClassName.c_str(), + newElement_NaNCtorSignature.c_str(), + static_cast(entry_NaN), newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_optionalList, newElement_NaN); + } + } + jobject newElement_0_nullableOptionalList; + if (!entry_0.nullableOptionalList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_nullableOptionalList); + } + else + { + if (entry_0.nullableOptionalList.Value().IsNull()) + { + newElement_0_nullableOptionalList = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_nullableOptionalList); + + auto iter_newElement_0_nullableOptionalList_NaN = entry_0.nullableOptionalList.Value().Value().begin(); + while (iter_newElement_0_nullableOptionalList_NaN.Next()) + { + auto & entry_NaN = iter_newElement_0_nullableOptionalList_NaN.GetValue(); + jobject newElement_NaN; + std::string newElement_NaNClassName = "java/lang/Integer"; + std::string newElement_NaNCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_NaNClassName.c_str(), + newElement_NaNCtorSignature.c_str(), + static_cast(entry_NaN), newElement_NaN); + chip::JniReferences::GetInstance().AddToArrayList(newElement_0_nullableOptionalList, newElement_NaN); + } + } + } - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jclass nullablesAndOptionalsStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TestClusterClusterNullablesAndOptionalsStruct", + nullablesAndOptionalsStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$TestClusterClusterNullablesAndOptionalsStruct")); + chip::JniClass structJniClass(nullablesAndOptionalsStructStructClass); + jmethodID nullablesAndOptionalsStructStructCtor = + env->GetMethodID(nullablesAndOptionalsStructStructClass, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/" + "Optional;Ljava/util/Optional;Lchip/devicecontroller/ChipStructs$TestClusterClusterSimpleStruct;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V"); + VerifyOrReturn(nullablesAndOptionalsStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$TestClusterClusterNullablesAndOptionalsStruct constructor")); + + newElement_0 = env->NewObject(nullablesAndOptionalsStructStructClass, nullablesAndOptionalsStructStructCtor, + 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().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListNullablesAndOptionalsStructAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10839,40 +9189,24 @@ void CHIPTestClusterListLongOctetStringAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::ByteSpan entryValue = entry; - - jbyteArray entryObject = nullptr; - if (!entryNull) - { - entryObject = env->NewByteArray(entryValue.size()); - env->SetByteArrayRegion(entryObject, 0, entryValue.size(), reinterpret_cast(entryValue.data())); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ListLongOctetStringAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -10929,11 +9263,17 @@ void CHIPTestClusterNullableBooleanAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -10990,11 +9330,17 @@ void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11051,11 +9397,17 @@ void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11112,11 +9464,17 @@ void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11173,11 +9531,17 @@ void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11232,11 +9596,17 @@ void CHIPTestClusterNullableInt8uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11293,11 +9663,17 @@ void CHIPTestClusterNullableInt16uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11354,11 +9730,17 @@ void CHIPTestClusterNullableInt24uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11415,11 +9797,17 @@ void CHIPTestClusterNullableInt32uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11476,11 +9864,17 @@ void CHIPTestClusterNullableInt40uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11537,11 +9931,17 @@ void CHIPTestClusterNullableInt48uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11598,11 +9998,17 @@ void CHIPTestClusterNullableInt56uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11659,11 +10065,17 @@ void CHIPTestClusterNullableInt64uAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11717,11 +10129,17 @@ void CHIPTestClusterNullableInt8sAttributeCallback::CallbackFn(void * context, c VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11778,11 +10196,17 @@ void CHIPTestClusterNullableInt16sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11839,11 +10263,17 @@ void CHIPTestClusterNullableInt24sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11900,11 +10330,17 @@ void CHIPTestClusterNullableInt32sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -11961,11 +10397,17 @@ void CHIPTestClusterNullableInt40sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12022,11 +10464,17 @@ void CHIPTestClusterNullableInt48sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12083,11 +10531,17 @@ void CHIPTestClusterNullableInt56sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12144,11 +10598,17 @@ void CHIPTestClusterNullableInt64sAttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12203,11 +10663,17 @@ void CHIPTestClusterNullableEnum8AttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12264,11 +10730,17 @@ void CHIPTestClusterNullableEnum16AttributeCallback::CallbackFn(void * context, VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12325,11 +10797,17 @@ void CHIPTestClusterNullableFloatSingleAttributeCallback::CallbackFn(void * cont VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Float"; - std::string javaValueCtorSignature = "(F)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Float"; + std::string javaValueCtorSignature = "(F)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12386,11 +10864,17 @@ void CHIPTestClusterNullableFloatDoubleAttributeCallback::CallbackFn(void * cont VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Double"; - std::string javaValueCtorSignature = "(D)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Double"; + std::string javaValueCtorSignature = "(D)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12447,9 +10931,17 @@ void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * cont VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - chip::ByteArray javaValueByteArray(env, value.Value()); - javaValue = javaValueByteArray.jniValue(); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12506,9 +10998,14 @@ void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * conte VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - chip::UtfString javaValueUtfString(env, value.Value()); - javaValue = javaValueUtfString.jniValue(); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + javaValue = env->NewStringUTF(std::string(value.Value().data(), value.Value().size()).c_str()); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12565,11 +11062,17 @@ void CHIPTestClusterNullableEnumAttrAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + static_cast(value.Value()), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12626,11 +11129,17 @@ void CHIPTestClusterNullableRangeRestrictedInt8uAttributeCallback::CallbackFn(vo VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12687,11 +11196,17 @@ void CHIPTestClusterNullableRangeRestrictedInt8sAttributeCallback::CallbackFn(vo VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12748,11 +11263,17 @@ void CHIPTestClusterNullableRangeRestrictedInt16uAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12809,11 +11330,17 @@ void CHIPTestClusterNullableRangeRestrictedInt16sAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -12864,43 +11391,24 @@ void CHIPTestClusterAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -12952,43 +11460,24 @@ void CHIPThermostatAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -13043,43 +11532,24 @@ void CHIPThermostatUserInterfaceConfigurationAttributeListAttributeCallback::Cal VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -13135,262 +11605,121 @@ void CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$NeighborTableListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NeighborTableListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool extAddressNull = false; - bool extAddressHasValue = true; - - uint64_t extAddressValue = entry.extAddress; - - jobject extAddress = nullptr; - if (!extAddressNull && extAddressHasValue) - { - jclass extAddressEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); - chip::JniClass extAddressJniClass(extAddressEntryCls); - jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); - extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); - } - - bool ageNull = false; - bool ageHasValue = true; - - uint32_t ageValue = entry.age; - - jobject age = nullptr; - if (!ageNull && ageHasValue) - { - jclass ageEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", ageEntryCls); - chip::JniClass ageJniClass(ageEntryCls); - jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(J)V"); - age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); - } - - bool rloc16Null = false; - bool rloc16HasValue = true; - - uint16_t rloc16Value = entry.rloc16; - - jobject rloc16 = nullptr; - if (!rloc16Null && rloc16HasValue) - { - jclass rloc16EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); - chip::JniClass rloc16JniClass(rloc16EntryCls); - jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); - rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); - } - - bool linkFrameCounterNull = false; - bool linkFrameCounterHasValue = true; - - uint32_t linkFrameCounterValue = entry.linkFrameCounter; - - jobject linkFrameCounter = nullptr; - if (!linkFrameCounterNull && linkFrameCounterHasValue) - { - jclass linkFrameCounterEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", linkFrameCounterEntryCls); - chip::JniClass linkFrameCounterJniClass(linkFrameCounterEntryCls); - jmethodID linkFrameCounterEntryTypeCtor = env->GetMethodID(linkFrameCounterEntryCls, "", "(J)V"); - linkFrameCounter = env->NewObject(linkFrameCounterEntryCls, linkFrameCounterEntryTypeCtor, linkFrameCounterValue); - } - - bool mleFrameCounterNull = false; - bool mleFrameCounterHasValue = true; - - uint32_t mleFrameCounterValue = entry.mleFrameCounter; - - jobject mleFrameCounter = nullptr; - if (!mleFrameCounterNull && mleFrameCounterHasValue) - { - jclass mleFrameCounterEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", mleFrameCounterEntryCls); - chip::JniClass mleFrameCounterJniClass(mleFrameCounterEntryCls); - jmethodID mleFrameCounterEntryTypeCtor = env->GetMethodID(mleFrameCounterEntryCls, "", "(J)V"); - mleFrameCounter = env->NewObject(mleFrameCounterEntryCls, mleFrameCounterEntryTypeCtor, mleFrameCounterValue); - } - - bool lqiNull = false; - bool lqiHasValue = true; - - uint8_t lqiValue = entry.lqi; - - jobject lqi = nullptr; - if (!lqiNull && lqiHasValue) - { - jclass lqiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lqiEntryCls); - chip::JniClass lqiJniClass(lqiEntryCls); - jmethodID lqiEntryTypeCtor = env->GetMethodID(lqiEntryCls, "", "(I)V"); - lqi = env->NewObject(lqiEntryCls, lqiEntryTypeCtor, lqiValue); - } - - bool averageRssiNull = false; - bool averageRssiHasValue = true; - - int8_t averageRssiValue = entry.averageRssi; - - jobject averageRssi = nullptr; - if (!averageRssiNull && averageRssiHasValue) - { - jclass averageRssiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", averageRssiEntryCls); - chip::JniClass averageRssiJniClass(averageRssiEntryCls); - jmethodID averageRssiEntryTypeCtor = env->GetMethodID(averageRssiEntryCls, "", "(I)V"); - averageRssi = env->NewObject(averageRssiEntryCls, averageRssiEntryTypeCtor, averageRssiValue); - } - - bool lastRssiNull = false; - bool lastRssiHasValue = true; - - int8_t lastRssiValue = entry.lastRssi; - - jobject lastRssi = nullptr; - if (!lastRssiNull && lastRssiHasValue) - { - jclass lastRssiEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", lastRssiEntryCls); - chip::JniClass lastRssiJniClass(lastRssiEntryCls); - jmethodID lastRssiEntryTypeCtor = env->GetMethodID(lastRssiEntryCls, "", "(I)V"); - lastRssi = env->NewObject(lastRssiEntryCls, lastRssiEntryTypeCtor, lastRssiValue); - } - - bool frameErrorRateNull = false; - bool frameErrorRateHasValue = true; - - uint8_t frameErrorRateValue = entry.frameErrorRate; - - jobject frameErrorRate = nullptr; - if (!frameErrorRateNull && frameErrorRateHasValue) - { - jclass frameErrorRateEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", frameErrorRateEntryCls); - chip::JniClass frameErrorRateJniClass(frameErrorRateEntryCls); - jmethodID frameErrorRateEntryTypeCtor = env->GetMethodID(frameErrorRateEntryCls, "", "(I)V"); - frameErrorRate = env->NewObject(frameErrorRateEntryCls, frameErrorRateEntryTypeCtor, frameErrorRateValue); - } - - bool messageErrorRateNull = false; - bool messageErrorRateHasValue = true; - - uint8_t messageErrorRateValue = entry.messageErrorRate; - - jobject messageErrorRate = nullptr; - if (!messageErrorRateNull && messageErrorRateHasValue) - { - jclass messageErrorRateEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", messageErrorRateEntryCls); - chip::JniClass messageErrorRateJniClass(messageErrorRateEntryCls); - jmethodID messageErrorRateEntryTypeCtor = env->GetMethodID(messageErrorRateEntryCls, "", "(I)V"); - messageErrorRate = env->NewObject(messageErrorRateEntryCls, messageErrorRateEntryTypeCtor, messageErrorRateValue); - } - - bool rxOnWhenIdleNull = false; - bool rxOnWhenIdleHasValue = true; - - bool rxOnWhenIdleValue = entry.rxOnWhenIdle; - - jobject rxOnWhenIdle = nullptr; - if (!rxOnWhenIdleNull && rxOnWhenIdleHasValue) - { - jclass rxOnWhenIdleEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", rxOnWhenIdleEntryCls); - chip::JniClass rxOnWhenIdleJniClass(rxOnWhenIdleEntryCls); - jmethodID rxOnWhenIdleEntryTypeCtor = env->GetMethodID(rxOnWhenIdleEntryCls, "", "(Z)V"); - rxOnWhenIdle = env->NewObject(rxOnWhenIdleEntryCls, rxOnWhenIdleEntryTypeCtor, rxOnWhenIdleValue); - } - - bool fullThreadDeviceNull = false; - bool fullThreadDeviceHasValue = true; - - bool fullThreadDeviceValue = entry.fullThreadDevice; - - jobject fullThreadDevice = nullptr; - if (!fullThreadDeviceNull && fullThreadDeviceHasValue) - { - jclass fullThreadDeviceEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullThreadDeviceEntryCls); - chip::JniClass fullThreadDeviceJniClass(fullThreadDeviceEntryCls); - jmethodID fullThreadDeviceEntryTypeCtor = env->GetMethodID(fullThreadDeviceEntryCls, "", "(Z)V"); - fullThreadDevice = env->NewObject(fullThreadDeviceEntryCls, fullThreadDeviceEntryTypeCtor, fullThreadDeviceValue); - } - - bool fullNetworkDataNull = false; - bool fullNetworkDataHasValue = true; - - bool fullNetworkDataValue = entry.fullNetworkData; - - jobject fullNetworkData = nullptr; - if (!fullNetworkDataNull && fullNetworkDataHasValue) - { - jclass fullNetworkDataEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", fullNetworkDataEntryCls); - chip::JniClass fullNetworkDataJniClass(fullNetworkDataEntryCls); - jmethodID fullNetworkDataEntryTypeCtor = env->GetMethodID(fullNetworkDataEntryCls, "", "(Z)V"); - fullNetworkData = env->NewObject(fullNetworkDataEntryCls, fullNetworkDataEntryTypeCtor, fullNetworkDataValue); - } - - bool isChildNull = false; - bool isChildHasValue = true; - - bool isChildValue = entry.isChild; - - jobject isChild = nullptr; - if (!isChildNull && isChildHasValue) - { - jclass isChildEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", isChildEntryCls); - chip::JniClass isChildJniClass(isChildEntryCls); - jmethodID isChildEntryTypeCtor = env->GetMethodID(isChildEntryCls, "", "(Z)V"); - isChild = env->NewObject(isChildEntryCls, isChildEntryTypeCtor, isChildValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, age, rloc16, linkFrameCounter, - mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, - rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NeighborTableListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_extAddress; + std::string newElement_0_extAddressClassName = "java/lang/Long"; + std::string newElement_0_extAddressCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + entry_0.extAddress, newElement_0_extAddress); + jobject newElement_0_age; + std::string newElement_0_ageClassName = "java/lang/Long"; + std::string newElement_0_ageCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jobject newElement_0_rloc16; + std::string newElement_0_rloc16ClassName = "java/lang/Integer"; + std::string newElement_0_rloc16CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), entry_0.rloc16, newElement_0_rloc16); + jobject newElement_0_linkFrameCounter; + std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; + std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_linkFrameCounterClassName.c_str(), + newElement_0_linkFrameCounterCtorSignature.c_str(), + entry_0.linkFrameCounter, newElement_0_linkFrameCounter); + jobject newElement_0_mleFrameCounter; + std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; + std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), + newElement_0_mleFrameCounterCtorSignature.c_str(), + entry_0.mleFrameCounter, newElement_0_mleFrameCounter); + jobject newElement_0_lqi; + std::string newElement_0_lqiClassName = "java/lang/Integer"; + std::string newElement_0_lqiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), entry_0.lqi, newElement_0_lqi); + jobject newElement_0_averageRssi; + std::string newElement_0_averageRssiClassName = "java/lang/Integer"; + std::string newElement_0_averageRssiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), + newElement_0_averageRssiCtorSignature.c_str(), + entry_0.averageRssi, newElement_0_averageRssi); + jobject newElement_0_lastRssi; + std::string newElement_0_lastRssiClassName = "java/lang/Integer"; + std::string newElement_0_lastRssiCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), + newElement_0_lastRssiCtorSignature.c_str(), entry_0.lastRssi, + newElement_0_lastRssi); + jobject newElement_0_frameErrorRate; + std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; + std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), + newElement_0_frameErrorRateCtorSignature.c_str(), + entry_0.frameErrorRate, newElement_0_frameErrorRate); + jobject newElement_0_messageErrorRate; + std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; + std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), + newElement_0_messageErrorRateCtorSignature.c_str(), + entry_0.messageErrorRate, newElement_0_messageErrorRate); + jobject newElement_0_rxOnWhenIdle; + std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; + std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), + newElement_0_rxOnWhenIdleCtorSignature.c_str(), + entry_0.rxOnWhenIdle, newElement_0_rxOnWhenIdle); + jobject newElement_0_fullThreadDevice; + std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; + std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullThreadDeviceClassName.c_str(), + newElement_0_fullThreadDeviceCtorSignature.c_str(), + entry_0.fullThreadDevice, newElement_0_fullThreadDevice); + jobject newElement_0_fullNetworkData; + std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; + std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fullNetworkDataClassName.c_str(), + newElement_0_fullNetworkDataCtorSignature.c_str(), + entry_0.fullNetworkData, newElement_0_fullNetworkData); + jobject newElement_0_isChild; + std::string newElement_0_isChildClassName = "java/lang/Boolean"; + std::string newElement_0_isChildCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), + newElement_0_isChildCtorSignature.c_str(), entry_0.isChild, + newElement_0_isChild); + + jclass neighborTableStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTable", neighborTableStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTable")); + chip::JniClass structJniClass(neighborTableStructClass); + jmethodID neighborTableStructCtor = + env->GetMethodID(neighborTableStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn(neighborTableStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTable constructor")); + + newElement_0 = env->NewObject(neighborTableStructClass, neighborTableStructCtor, 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().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding NeighborTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -13446,200 +11775,93 @@ void CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$RouteTableListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = - env->GetMethodID(attributeClass, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find RouteTableListAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool extAddressNull = false; - bool extAddressHasValue = true; - - uint64_t extAddressValue = entry.extAddress; - - jobject extAddress = nullptr; - if (!extAddressNull && extAddressHasValue) - { - jclass extAddressEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", extAddressEntryCls); - chip::JniClass extAddressJniClass(extAddressEntryCls); - jmethodID extAddressEntryTypeCtor = env->GetMethodID(extAddressEntryCls, "", "(J)V"); - extAddress = env->NewObject(extAddressEntryCls, extAddressEntryTypeCtor, extAddressValue); - } - - bool rloc16Null = false; - bool rloc16HasValue = true; - - uint16_t rloc16Value = entry.rloc16; - - jobject rloc16 = nullptr; - if (!rloc16Null && rloc16HasValue) - { - jclass rloc16EntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rloc16EntryCls); - chip::JniClass rloc16JniClass(rloc16EntryCls); - jmethodID rloc16EntryTypeCtor = env->GetMethodID(rloc16EntryCls, "", "(I)V"); - rloc16 = env->NewObject(rloc16EntryCls, rloc16EntryTypeCtor, rloc16Value); - } - - bool routerIdNull = false; - bool routerIdHasValue = true; - - uint8_t routerIdValue = entry.routerId; - - jobject routerId = nullptr; - if (!routerIdNull && routerIdHasValue) - { - jclass routerIdEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", routerIdEntryCls); - chip::JniClass routerIdJniClass(routerIdEntryCls); - jmethodID routerIdEntryTypeCtor = env->GetMethodID(routerIdEntryCls, "", "(I)V"); - routerId = env->NewObject(routerIdEntryCls, routerIdEntryTypeCtor, routerIdValue); - } - - bool nextHopNull = false; - bool nextHopHasValue = true; - - uint8_t nextHopValue = entry.nextHop; - - jobject nextHop = nullptr; - if (!nextHopNull && nextHopHasValue) - { - jclass nextHopEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", nextHopEntryCls); - chip::JniClass nextHopJniClass(nextHopEntryCls); - jmethodID nextHopEntryTypeCtor = env->GetMethodID(nextHopEntryCls, "", "(I)V"); - nextHop = env->NewObject(nextHopEntryCls, nextHopEntryTypeCtor, nextHopValue); - } - - bool pathCostNull = false; - bool pathCostHasValue = true; - - uint8_t pathCostValue = entry.pathCost; - - jobject pathCost = nullptr; - if (!pathCostNull && pathCostHasValue) - { - jclass pathCostEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", pathCostEntryCls); - chip::JniClass pathCostJniClass(pathCostEntryCls); - jmethodID pathCostEntryTypeCtor = env->GetMethodID(pathCostEntryCls, "", "(I)V"); - pathCost = env->NewObject(pathCostEntryCls, pathCostEntryTypeCtor, pathCostValue); - } - - bool LQIInNull = false; - bool LQIInHasValue = true; - - uint8_t LQIInValue = entry.LQIIn; - - jobject LQIIn = nullptr; - if (!LQIInNull && LQIInHasValue) - { - jclass LQIInEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIInEntryCls); - chip::JniClass LQIInJniClass(LQIInEntryCls); - jmethodID LQIInEntryTypeCtor = env->GetMethodID(LQIInEntryCls, "", "(I)V"); - LQIIn = env->NewObject(LQIInEntryCls, LQIInEntryTypeCtor, LQIInValue); - } - - bool LQIOutNull = false; - bool LQIOutHasValue = true; - - uint8_t LQIOutValue = entry.LQIOut; - - jobject LQIOut = nullptr; - if (!LQIOutNull && LQIOutHasValue) - { - jclass LQIOutEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", LQIOutEntryCls); - chip::JniClass LQIOutJniClass(LQIOutEntryCls); - jmethodID LQIOutEntryTypeCtor = env->GetMethodID(LQIOutEntryCls, "", "(I)V"); - LQIOut = env->NewObject(LQIOutEntryCls, LQIOutEntryTypeCtor, LQIOutValue); - } - - bool ageNull = false; - bool ageHasValue = true; - - uint8_t ageValue = entry.age; - - jobject age = nullptr; - if (!ageNull && ageHasValue) - { - jclass ageEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", ageEntryCls); - chip::JniClass ageJniClass(ageEntryCls); - jmethodID ageEntryTypeCtor = env->GetMethodID(ageEntryCls, "", "(I)V"); - age = env->NewObject(ageEntryCls, ageEntryTypeCtor, ageValue); - } - - bool allocatedNull = false; - bool allocatedHasValue = true; - - bool allocatedValue = entry.allocated; - - jobject allocated = nullptr; - if (!allocatedNull && allocatedHasValue) - { - jclass allocatedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", allocatedEntryCls); - chip::JniClass allocatedJniClass(allocatedEntryCls); - jmethodID allocatedEntryTypeCtor = env->GetMethodID(allocatedEntryCls, "", "(Z)V"); - allocated = env->NewObject(allocatedEntryCls, allocatedEntryTypeCtor, allocatedValue); - } - - bool linkEstablishedNull = false; - bool linkEstablishedHasValue = true; - - bool linkEstablishedValue = entry.linkEstablished; - - jobject linkEstablished = nullptr; - if (!linkEstablishedNull && linkEstablishedHasValue) - { - jclass linkEstablishedEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", linkEstablishedEntryCls); - chip::JniClass linkEstablishedJniClass(linkEstablishedEntryCls); - jmethodID linkEstablishedEntryTypeCtor = env->GetMethodID(linkEstablishedEntryCls, "", "(Z)V"); - linkEstablished = env->NewObject(linkEstablishedEntryCls, linkEstablishedEntryTypeCtor, linkEstablishedValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, - LQIOut, age, allocated, linkEstablished); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create RouteTableListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_extAddress; + std::string newElement_0_extAddressClassName = "java/lang/Long"; + std::string newElement_0_extAddressCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + entry_0.extAddress, newElement_0_extAddress); + jobject newElement_0_rloc16; + std::string newElement_0_rloc16ClassName = "java/lang/Integer"; + std::string newElement_0_rloc16CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_rloc16ClassName.c_str(), newElement_0_rloc16CtorSignature.c_str(), entry_0.rloc16, newElement_0_rloc16); + jobject newElement_0_routerId; + std::string newElement_0_routerIdClassName = "java/lang/Integer"; + std::string newElement_0_routerIdCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), + newElement_0_routerIdCtorSignature.c_str(), entry_0.routerId, + newElement_0_routerId); + jobject newElement_0_nextHop; + std::string newElement_0_nextHopClassName = "java/lang/Integer"; + std::string newElement_0_nextHopCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), + newElement_0_nextHopCtorSignature.c_str(), entry_0.nextHop, + newElement_0_nextHop); + jobject newElement_0_pathCost; + std::string newElement_0_pathCostClassName = "java/lang/Integer"; + std::string newElement_0_pathCostCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), + newElement_0_pathCostCtorSignature.c_str(), entry_0.pathCost, + newElement_0_pathCost); + jobject newElement_0_LQIIn; + std::string newElement_0_LQIInClassName = "java/lang/Integer"; + std::string newElement_0_LQIInCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_LQIInClassName.c_str(), newElement_0_LQIInCtorSignature.c_str(), entry_0.LQIIn, newElement_0_LQIIn); + jobject newElement_0_LQIOut; + std::string newElement_0_LQIOutClassName = "java/lang/Integer"; + std::string newElement_0_LQIOutCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_LQIOutClassName.c_str(), newElement_0_LQIOutCtorSignature.c_str(), entry_0.LQIOut, newElement_0_LQIOut); + jobject newElement_0_age; + std::string newElement_0_ageClassName = "java/lang/Integer"; + std::string newElement_0_ageCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), entry_0.age, newElement_0_age); + jobject newElement_0_allocated; + std::string newElement_0_allocatedClassName = "java/lang/Boolean"; + std::string newElement_0_allocatedCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), + newElement_0_allocatedCtorSignature.c_str(), entry_0.allocated, + newElement_0_allocated); + jobject newElement_0_linkEstablished; + std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; + std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_linkEstablishedClassName.c_str(), + newElement_0_linkEstablishedCtorSignature.c_str(), + entry_0.linkEstablished, newElement_0_linkEstablished); + + jclass routeTableStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTable", routeTableStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTable")); + chip::JniClass structJniClass(routeTableStructClass); + jmethodID routeTableStructCtor = + env->GetMethodID(routeTableStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn(routeTableStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTable constructor")); + + newElement_0 = env->NewObject(routeTableStructClass, routeTableStructCtor, 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().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding RouteTableListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -13695,76 +11917,45 @@ void CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError( - Zcl, - "Could not find class chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$SecurityPolicyAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find SecurityPolicyAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool rotationTimeNull = false; - bool rotationTimeHasValue = true; - - uint16_t rotationTimeValue = entry.rotationTime; - - jobject rotationTime = nullptr; - if (!rotationTimeNull && rotationTimeHasValue) - { - jclass rotationTimeEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", rotationTimeEntryCls); - chip::JniClass rotationTimeJniClass(rotationTimeEntryCls); - jmethodID rotationTimeEntryTypeCtor = env->GetMethodID(rotationTimeEntryCls, "", "(I)V"); - rotationTime = env->NewObject(rotationTimeEntryCls, rotationTimeEntryTypeCtor, rotationTimeValue); - } - - bool flagsNull = false; - bool flagsHasValue = true; - - uint16_t flagsValue = entry.flags; - - jobject flags = nullptr; - if (!flagsNull && flagsHasValue) - { - jclass flagsEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", flagsEntryCls); - chip::JniClass flagsJniClass(flagsEntryCls); - jmethodID flagsEntryTypeCtor = env->GetMethodID(flagsEntryCls, "", "(I)V"); - flags = env->NewObject(flagsEntryCls, flagsEntryTypeCtor, flagsValue); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, rotationTime, flags); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create SecurityPolicyAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_rotationTime; + std::string newElement_0_rotationTimeClassName = "java/lang/Integer"; + std::string newElement_0_rotationTimeCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rotationTimeClassName.c_str(), + newElement_0_rotationTimeCtorSignature.c_str(), + entry_0.rotationTime, newElement_0_rotationTime); + jobject newElement_0_flags; + std::string newElement_0_flagsClassName = "java/lang/Integer"; + std::string newElement_0_flagsCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_flagsClassName.c_str(), newElement_0_flagsCtorSignature.c_str(), entry_0.flags, newElement_0_flags); + + jclass securityPolicyStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy", securityPolicyStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy")); + chip::JniClass structJniClass(securityPolicyStructClass); + jmethodID securityPolicyStructCtor = + env->GetMethodID(securityPolicyStructClass, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + VerifyOrReturn(securityPolicyStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy constructor")); + + newElement_0 = + env->NewObject(securityPolicyStructClass, securityPolicyStructCtor, newElement_0_rotationTime, newElement_0_flags); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SecurityPolicyAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -13822,240 +12013,117 @@ void CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback:: VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute", - attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, - "Could not find class " - "chip/devicecontroller/ChipClusters$ThreadNetworkDiagnosticsCluster$OperationalDatasetComponentsAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID( - attributeClass, "", - "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" - "lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find OperationalDatasetComponentsAttribute constructor")); - - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - (void) entry; - bool activeTimestampPresentNull = false; - bool activeTimestampPresentHasValue = true; - - bool activeTimestampPresentValue = entry.activeTimestampPresent; - - jobject activeTimestampPresent = nullptr; - if (!activeTimestampPresentNull && activeTimestampPresentHasValue) - { - jclass activeTimestampPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", activeTimestampPresentEntryCls); - chip::JniClass activeTimestampPresentJniClass(activeTimestampPresentEntryCls); - jmethodID activeTimestampPresentEntryTypeCtor = env->GetMethodID(activeTimestampPresentEntryCls, "", "(Z)V"); - activeTimestampPresent = - env->NewObject(activeTimestampPresentEntryCls, activeTimestampPresentEntryTypeCtor, activeTimestampPresentValue); - } - - bool pendingTimestampPresentNull = false; - bool pendingTimestampPresentHasValue = true; - - bool pendingTimestampPresentValue = entry.pendingTimestampPresent; - - jobject pendingTimestampPresent = nullptr; - if (!pendingTimestampPresentNull && pendingTimestampPresentHasValue) - { - jclass pendingTimestampPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pendingTimestampPresentEntryCls); - chip::JniClass pendingTimestampPresentJniClass(pendingTimestampPresentEntryCls); - jmethodID pendingTimestampPresentEntryTypeCtor = env->GetMethodID(pendingTimestampPresentEntryCls, "", "(Z)V"); - pendingTimestampPresent = - env->NewObject(pendingTimestampPresentEntryCls, pendingTimestampPresentEntryTypeCtor, pendingTimestampPresentValue); - } - - bool masterKeyPresentNull = false; - bool masterKeyPresentHasValue = true; - - bool masterKeyPresentValue = entry.masterKeyPresent; - - jobject masterKeyPresent = nullptr; - if (!masterKeyPresentNull && masterKeyPresentHasValue) - { - jclass masterKeyPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", masterKeyPresentEntryCls); - chip::JniClass masterKeyPresentJniClass(masterKeyPresentEntryCls); - jmethodID masterKeyPresentEntryTypeCtor = env->GetMethodID(masterKeyPresentEntryCls, "", "(Z)V"); - masterKeyPresent = env->NewObject(masterKeyPresentEntryCls, masterKeyPresentEntryTypeCtor, masterKeyPresentValue); - } - - bool networkNamePresentNull = false; - bool networkNamePresentHasValue = true; - - bool networkNamePresentValue = entry.networkNamePresent; - - jobject networkNamePresent = nullptr; - if (!networkNamePresentNull && networkNamePresentHasValue) - { - jclass networkNamePresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", networkNamePresentEntryCls); - chip::JniClass networkNamePresentJniClass(networkNamePresentEntryCls); - jmethodID networkNamePresentEntryTypeCtor = env->GetMethodID(networkNamePresentEntryCls, "", "(Z)V"); - networkNamePresent = - env->NewObject(networkNamePresentEntryCls, networkNamePresentEntryTypeCtor, networkNamePresentValue); - } - - bool extendedPanIdPresentNull = false; - bool extendedPanIdPresentHasValue = true; - - bool extendedPanIdPresentValue = entry.extendedPanIdPresent; - - jobject extendedPanIdPresent = nullptr; - if (!extendedPanIdPresentNull && extendedPanIdPresentHasValue) - { - jclass extendedPanIdPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", extendedPanIdPresentEntryCls); - chip::JniClass extendedPanIdPresentJniClass(extendedPanIdPresentEntryCls); - jmethodID extendedPanIdPresentEntryTypeCtor = env->GetMethodID(extendedPanIdPresentEntryCls, "", "(Z)V"); - extendedPanIdPresent = - env->NewObject(extendedPanIdPresentEntryCls, extendedPanIdPresentEntryTypeCtor, extendedPanIdPresentValue); - } - - bool meshLocalPrefixPresentNull = false; - bool meshLocalPrefixPresentHasValue = true; - - bool meshLocalPrefixPresentValue = entry.meshLocalPrefixPresent; - - jobject meshLocalPrefixPresent = nullptr; - if (!meshLocalPrefixPresentNull && meshLocalPrefixPresentHasValue) - { - jclass meshLocalPrefixPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", meshLocalPrefixPresentEntryCls); - chip::JniClass meshLocalPrefixPresentJniClass(meshLocalPrefixPresentEntryCls); - jmethodID meshLocalPrefixPresentEntryTypeCtor = env->GetMethodID(meshLocalPrefixPresentEntryCls, "", "(Z)V"); - meshLocalPrefixPresent = - env->NewObject(meshLocalPrefixPresentEntryCls, meshLocalPrefixPresentEntryTypeCtor, meshLocalPrefixPresentValue); - } - - bool delayPresentNull = false; - bool delayPresentHasValue = true; - - bool delayPresentValue = entry.delayPresent; - - jobject delayPresent = nullptr; - if (!delayPresentNull && delayPresentHasValue) - { - jclass delayPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", delayPresentEntryCls); - chip::JniClass delayPresentJniClass(delayPresentEntryCls); - jmethodID delayPresentEntryTypeCtor = env->GetMethodID(delayPresentEntryCls, "", "(Z)V"); - delayPresent = env->NewObject(delayPresentEntryCls, delayPresentEntryTypeCtor, delayPresentValue); - } - - bool panIdPresentNull = false; - bool panIdPresentHasValue = true; - - bool panIdPresentValue = entry.panIdPresent; - - jobject panIdPresent = nullptr; - if (!panIdPresentNull && panIdPresentHasValue) - { - jclass panIdPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", panIdPresentEntryCls); - chip::JniClass panIdPresentJniClass(panIdPresentEntryCls); - jmethodID panIdPresentEntryTypeCtor = env->GetMethodID(panIdPresentEntryCls, "", "(Z)V"); - panIdPresent = env->NewObject(panIdPresentEntryCls, panIdPresentEntryTypeCtor, panIdPresentValue); - } - - bool channelPresentNull = false; - bool channelPresentHasValue = true; - - bool channelPresentValue = entry.channelPresent; - - jobject channelPresent = nullptr; - if (!channelPresentNull && channelPresentHasValue) - { - jclass channelPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelPresentEntryCls); - chip::JniClass channelPresentJniClass(channelPresentEntryCls); - jmethodID channelPresentEntryTypeCtor = env->GetMethodID(channelPresentEntryCls, "", "(Z)V"); - channelPresent = env->NewObject(channelPresentEntryCls, channelPresentEntryTypeCtor, channelPresentValue); - } - - bool pskcPresentNull = false; - bool pskcPresentHasValue = true; - - bool pskcPresentValue = entry.pskcPresent; - - jobject pskcPresent = nullptr; - if (!pskcPresentNull && pskcPresentHasValue) - { - jclass pskcPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", pskcPresentEntryCls); - chip::JniClass pskcPresentJniClass(pskcPresentEntryCls); - jmethodID pskcPresentEntryTypeCtor = env->GetMethodID(pskcPresentEntryCls, "", "(Z)V"); - pskcPresent = env->NewObject(pskcPresentEntryCls, pskcPresentEntryTypeCtor, pskcPresentValue); - } - - bool securityPolicyPresentNull = false; - bool securityPolicyPresentHasValue = true; - - bool securityPolicyPresentValue = entry.securityPolicyPresent; - - jobject securityPolicyPresent = nullptr; - if (!securityPolicyPresentNull && securityPolicyPresentHasValue) - { - jclass securityPolicyPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", securityPolicyPresentEntryCls); - chip::JniClass securityPolicyPresentJniClass(securityPolicyPresentEntryCls); - jmethodID securityPolicyPresentEntryTypeCtor = env->GetMethodID(securityPolicyPresentEntryCls, "", "(Z)V"); - securityPolicyPresent = - env->NewObject(securityPolicyPresentEntryCls, securityPolicyPresentEntryTypeCtor, securityPolicyPresentValue); - } - - bool channelMaskPresentNull = false; - bool channelMaskPresentHasValue = true; - - bool channelMaskPresentValue = entry.channelMaskPresent; - - jobject channelMaskPresent = nullptr; - if (!channelMaskPresentNull && channelMaskPresentHasValue) - { - jclass channelMaskPresentEntryCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Boolean", channelMaskPresentEntryCls); - chip::JniClass channelMaskPresentJniClass(channelMaskPresentEntryCls); - jmethodID channelMaskPresentEntryTypeCtor = env->GetMethodID(channelMaskPresentEntryCls, "", "(Z)V"); - channelMaskPresent = - env->NewObject(channelMaskPresentEntryCls, channelMaskPresentEntryTypeCtor, channelMaskPresentValue); - } - - jobject attributeObj = - env->NewObject(attributeClass, attributeCtor, activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, - networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, - channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create OperationalDatasetComponentsAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_activeTimestampPresent; + std::string newElement_0_activeTimestampPresentClassName = "java/lang/Boolean"; + std::string newElement_0_activeTimestampPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_activeTimestampPresentClassName.c_str(), newElement_0_activeTimestampPresentCtorSignature.c_str(), + entry_0.activeTimestampPresent, newElement_0_activeTimestampPresent); + jobject newElement_0_pendingTimestampPresent; + std::string newElement_0_pendingTimestampPresentClassName = "java/lang/Boolean"; + std::string newElement_0_pendingTimestampPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_pendingTimestampPresentClassName.c_str(), newElement_0_pendingTimestampPresentCtorSignature.c_str(), + entry_0.pendingTimestampPresent, newElement_0_pendingTimestampPresent); + jobject newElement_0_masterKeyPresent; + std::string newElement_0_masterKeyPresentClassName = "java/lang/Boolean"; + std::string newElement_0_masterKeyPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_masterKeyPresentClassName.c_str(), + newElement_0_masterKeyPresentCtorSignature.c_str(), + entry_0.masterKeyPresent, newElement_0_masterKeyPresent); + jobject newElement_0_networkNamePresent; + std::string newElement_0_networkNamePresentClassName = "java/lang/Boolean"; + std::string newElement_0_networkNamePresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_networkNamePresentClassName.c_str(), + newElement_0_networkNamePresentCtorSignature.c_str(), + entry_0.networkNamePresent, newElement_0_networkNamePresent); + jobject newElement_0_extendedPanIdPresent; + std::string newElement_0_extendedPanIdPresentClassName = "java/lang/Boolean"; + std::string newElement_0_extendedPanIdPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extendedPanIdPresentClassName.c_str(), + newElement_0_extendedPanIdPresentCtorSignature.c_str(), + entry_0.extendedPanIdPresent, newElement_0_extendedPanIdPresent); + jobject newElement_0_meshLocalPrefixPresent; + std::string newElement_0_meshLocalPrefixPresentClassName = "java/lang/Boolean"; + std::string newElement_0_meshLocalPrefixPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_meshLocalPrefixPresentClassName.c_str(), newElement_0_meshLocalPrefixPresentCtorSignature.c_str(), + entry_0.meshLocalPrefixPresent, newElement_0_meshLocalPrefixPresent); + jobject newElement_0_delayPresent; + std::string newElement_0_delayPresentClassName = "java/lang/Boolean"; + std::string newElement_0_delayPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_delayPresentClassName.c_str(), + newElement_0_delayPresentCtorSignature.c_str(), + entry_0.delayPresent, newElement_0_delayPresent); + jobject newElement_0_panIdPresent; + std::string newElement_0_panIdPresentClassName = "java/lang/Boolean"; + std::string newElement_0_panIdPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_panIdPresentClassName.c_str(), + newElement_0_panIdPresentCtorSignature.c_str(), + entry_0.panIdPresent, newElement_0_panIdPresent); + jobject newElement_0_channelPresent; + std::string newElement_0_channelPresentClassName = "java/lang/Boolean"; + std::string newElement_0_channelPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channelPresentClassName.c_str(), + newElement_0_channelPresentCtorSignature.c_str(), + entry_0.channelPresent, newElement_0_channelPresent); + jobject newElement_0_pskcPresent; + std::string newElement_0_pskcPresentClassName = "java/lang/Boolean"; + std::string newElement_0_pskcPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pskcPresentClassName.c_str(), + newElement_0_pskcPresentCtorSignature.c_str(), + entry_0.pskcPresent, newElement_0_pskcPresent); + jobject newElement_0_securityPolicyPresent; + std::string newElement_0_securityPolicyPresentClassName = "java/lang/Boolean"; + std::string newElement_0_securityPolicyPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_securityPolicyPresentClassName.c_str(), newElement_0_securityPolicyPresentCtorSignature.c_str(), + entry_0.securityPolicyPresent, newElement_0_securityPolicyPresent); + jobject newElement_0_channelMaskPresent; + std::string newElement_0_channelMaskPresentClassName = "java/lang/Boolean"; + std::string newElement_0_channelMaskPresentCtorSignature = "(Z)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channelMaskPresentClassName.c_str(), + newElement_0_channelMaskPresentCtorSignature.c_str(), + entry_0.channelMaskPresent, newElement_0_channelMaskPresent); + + jclass operationalDatasetComponentsStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents", + operationalDatasetComponentsStructClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents")); + chip::JniClass structJniClass(operationalDatasetComponentsStructClass); + jmethodID operationalDatasetComponentsStructCtor = + env->GetMethodID(operationalDatasetComponentsStructClass, "", + "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V"); + VerifyOrReturn( + operationalDatasetComponentsStructCtor != nullptr, + ChipLogError(Zcl, + "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents constructor")); + + newElement_0 = + env->NewObject(operationalDatasetComponentsStructClass, operationalDatasetComponentsStructCtor, + newElement_0_activeTimestampPresent, newElement_0_pendingTimestampPresent, newElement_0_masterKeyPresent, + newElement_0_networkNamePresent, newElement_0_extendedPanIdPresent, newElement_0_meshLocalPrefixPresent, + newElement_0_delayPresent, newElement_0_panIdPresent, newElement_0_channelPresent, + newElement_0_pskcPresent, newElement_0_securityPolicyPresent, newElement_0_channelMaskPresent); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding OperationalDatasetComponentsAttribute value: %" CHIP_ERROR_FORMAT, - iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14110,43 +12178,24 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding ActiveNetworkFaultsListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14200,43 +12249,24 @@ void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14291,43 +12321,24 @@ void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::Callback VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::app::Clusters::TimeFormatLocalization::CalendarType entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(I)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding SupportedCalendarTypesAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14380,67 +12391,36 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jclass attributeClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipClusters$UserLabelCluster$LabelListAttribute", attributeClass); - VerifyOrReturn( - err == CHIP_NO_ERROR, - ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$UserLabelCluster$LabelListAttribute")); - chip::JniClass attributeJniClass(attributeClass); - jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); - VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find LabelListAttribute constructor")); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter = list.begin(); - while (iter.Next()) + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - auto & entry = iter.GetValue(); - (void) entry; - bool labelNull = false; - bool labelHasValue = true; - - chip::CharSpan labelValue = entry.label; - - jstring label = nullptr; - chip::UtfString labelStr(env, labelValue); - if (!labelNull && labelHasValue) - { - label = jstring(labelStr.jniValue()); - } + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); + jobject newElement_0_value; + newElement_0_value = env->NewStringUTF(std::string(entry_0.value.data(), entry_0.value.size()).c_str()); - bool valueNull = false; - bool valueHasValue = true; + jclass labelStructStructClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", + labelStructStructClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct")); + chip::JniClass structJniClass(labelStructStructClass); + jmethodID labelStructStructCtor = + env->GetMethodID(labelStructStructClass, "", "(Ljava/lang/String;Ljava/lang/String;)V"); + VerifyOrReturn(labelStructStructCtor != nullptr, + ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor")); - chip::CharSpan valueValue = entry.value; - - jstring value = nullptr; - chip::UtfString valueStr(env, valueValue); - if (!valueNull && valueHasValue) - { - value = jstring(valueStr.jniValue()); - } - - jobject attributeObj = env->NewObject(attributeClass, attributeCtor, label, value); - VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create LabelListAttribute object")); - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + newElement_0 = env->NewObject(labelStructStructClass, labelStructStructCtor, newElement_0_label, newElement_0_value); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding LabelListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14492,43 +12472,24 @@ void CHIPWakeOnLanAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14582,43 +12543,24 @@ void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; - - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); @@ -14676,11 +12618,17 @@ void CHIPWindowCoveringCurrentPositionLiftAttributeCallback::CallbackFn(void * c VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -14737,11 +12685,17 @@ void CHIPWindowCoveringCurrentPositionTiltAttributeCallback::CallbackFn(void * c VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -14799,11 +12753,17 @@ void CHIPWindowCoveringCurrentPositionLiftPercentageAttributeCallback::CallbackF VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -14861,11 +12821,17 @@ void CHIPWindowCoveringCurrentPositionTiltPercentageAttributeCallback::CallbackF VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -14923,11 +12889,17 @@ void CHIPWindowCoveringTargetPositionLiftPercent100thsAttributeCallback::Callbac VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -14985,11 +12957,17 @@ void CHIPWindowCoveringTargetPositionTiltPercent100thsAttributeCallback::Callbac VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -15047,11 +13025,17 @@ void CHIPWindowCoveringCurrentPositionLiftPercent100thsAttributeCallback::Callba VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -15109,11 +13093,17 @@ void CHIPWindowCoveringCurrentPositionTiltPercent100thsAttributeCallback::Callba VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; - - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject( - javaValueClassName.c_str(), javaValueCtorSignature.c_str(), value.Value(), javaValue); + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -15166,43 +13156,24 @@ void CHIPWindowCoveringAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jclass arrayListClass; - err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); - chip::JniClass arrayListJniClass(arrayListClass); - jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); - jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); - VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, - ChipLogError(Zcl, "Error finding Java ArrayList methods")); - jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); - VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); - jmethodID javaMethod; err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - auto iter = list.begin(); - while (iter.Next()) - { - auto & entry = iter.GetValue(); - bool entryNull = false; - chip::AttributeId entryValue = entry; + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - jobject entryObject = nullptr; - if (!entryNull) - { - jclass entryTypeCls; - chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Long", entryTypeCls); - chip::JniClass jniClass(entryTypeCls); - jmethodID entryTypeCtor = env->GetMethodID(entryTypeCls, "", "(J)V"); - entryObject = env->NewObject(entryTypeCls, entryTypeCtor, entryValue); - } - - env->CallBooleanMethod(arrayListObj, arrayListAddMethod, entryObject); + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToArrayList(arrayListObj, newElement_0); } - VerifyOrReturn( - iter.GetStatus() == CHIP_NO_ERROR, - ChipLogError(Zcl, "Error decoding AttributeListAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 5f250296fd71f3..9c1cf1fdbaf971 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -20,7 +20,7 @@ package chip.devicecontroller; import androidx.annotation.Nullable; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -122,70 +122,16 @@ public AccessControlCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public static class AclAttribute { - public Integer fabricIndex; - public Integer privilege; - public Integer authMode; - - public AclAttribute(Integer fabricIndex, Integer privilege, Integer authMode) { - this.fabricIndex = fabricIndex; - this.privilege = privilege; - this.authMode = authMode; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("int privilege: "); - output.append(this.privilege); - output.append("\n"); - - output.append("int authMode: "); - output.append(this.authMode); - output.append("\n"); - - return output.toString(); - } - } - public interface AclAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class ExtensionAttribute { - public Integer fabricIndex; - public byte[] data; - - public ExtensionAttribute(Integer fabricIndex, byte[] data) { - this.fabricIndex = fabricIndex; - this.data = data; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(data)); - output.append("\n"); - - return output.toString(); - } - } - public interface ExtensionAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -193,7 +139,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -204,14 +150,55 @@ public void readAclAttribute(AclAttributeCallback callback) { readAclAttribute(chipClusterPtr, callback); } + public void writeAclAttribute( + DefaultClusterCallback callback, + ArrayList value) { + writeAclAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAclAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeAclAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeAclAttribute( + AclAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAclAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readExtensionAttribute(ExtensionAttributeCallback callback) { readExtensionAttribute(chipClusterPtr, callback); } + public void writeExtensionAttribute( + DefaultClusterCallback callback, + ArrayList value) { + writeExtensionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeExtensionAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeExtensionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeExtensionAttribute( + ExtensionAttributeCallback callback, int minInterval, int maxInterval) { + subscribeExtensionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -223,12 +210,36 @@ public void subscribeClusterRevisionAttribute( private native void readAclAttribute(long chipClusterPtr, AclAttributeCallback callback); + private native void writeAclAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeAclAttribute( + long chipClusterPtr, AclAttributeCallback callback, int minInterval, int maxInterval); + private native void readExtensionAttribute( long chipClusterPtr, ExtensionAttributeCallback callback); + private native void writeExtensionAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeExtensionAttribute( + long chipClusterPtr, ExtensionAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -267,6 +278,7 @@ public void loginRequest( } public void logoutRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + logoutRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -295,7 +307,7 @@ public interface GetSetupPINResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -306,6 +318,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -318,6 +335,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -392,6 +415,7 @@ public void revokeCommissioning(DefaultClusterCallback callback) { } public void revokeCommissioning(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + revokeCommissioning(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -426,7 +450,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -464,6 +488,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -497,6 +526,12 @@ private native void subscribeAdminVendorIdAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -515,7 +550,7 @@ public ApplicationBasicCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AllowedVendorListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -523,7 +558,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -588,10 +623,20 @@ public void readAllowedVendorListAttribute(AllowedVendorListAttributeCallback ca readAllowedVendorListAttribute(chipClusterPtr, callback); } + public void subscribeAllowedVendorListAttribute( + AllowedVendorListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAllowedVendorListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -649,9 +694,21 @@ private native void subscribeApplicationVersionAttribute( private native void readAllowedVendorListAttribute( long chipClusterPtr, AllowedVendorListAttributeCallback callback); + private native void subscribeAllowedVendorListAttribute( + long chipClusterPtr, + AllowedVendorListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -670,71 +727,63 @@ public ApplicationLauncherCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public void hideAppRequest( - LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - hideAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + LauncherResponseCallback callback, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application) { + hideAppRequest(chipClusterPtr, callback, application, null); } public void hideAppRequest( LauncherResponseCallback callback, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, int timedInvokeTimeoutMs) { - hideAppRequest( - chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); + hideAppRequest(chipClusterPtr, callback, application, timedInvokeTimeoutMs); } public void launchAppRequest( LauncherResponseCallback callback, String data, - Integer catalogVendorId, - String applicationId) { - launchAppRequest(chipClusterPtr, callback, data, catalogVendorId, applicationId, null); + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application) { + launchAppRequest(chipClusterPtr, callback, data, application, null); } public void launchAppRequest( LauncherResponseCallback callback, String data, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, int timedInvokeTimeoutMs) { - launchAppRequest( - chipClusterPtr, callback, data, catalogVendorId, applicationId, timedInvokeTimeoutMs); + launchAppRequest(chipClusterPtr, callback, data, application, timedInvokeTimeoutMs); } public void stopAppRequest( - LauncherResponseCallback callback, Integer catalogVendorId, String applicationId) { - stopAppRequest(chipClusterPtr, callback, catalogVendorId, applicationId, null); + LauncherResponseCallback callback, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application) { + stopAppRequest(chipClusterPtr, callback, application, null); } public void stopAppRequest( LauncherResponseCallback callback, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, int timedInvokeTimeoutMs) { - stopAppRequest( - chipClusterPtr, callback, catalogVendorId, applicationId, timedInvokeTimeoutMs); + stopAppRequest(chipClusterPtr, callback, application, timedInvokeTimeoutMs); } private native void hideAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, @Nullable Integer timedInvokeTimeoutMs); private native void launchAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, String data, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, @Nullable Integer timedInvokeTimeoutMs); private native void stopAppRequest( long chipClusterPtr, LauncherResponseCallback Callback, - Integer catalogVendorId, - String applicationId, + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, @Nullable Integer timedInvokeTimeoutMs); public interface LauncherResponseCallback { @@ -744,7 +793,7 @@ public interface LauncherResponseCallback { } public interface ApplicationLauncherListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -752,7 +801,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -764,10 +813,20 @@ public void readApplicationLauncherListAttribute( readApplicationLauncherListAttribute(chipClusterPtr, callback); } + public void subscribeApplicationLauncherListAttribute( + ApplicationLauncherListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeApplicationLauncherListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -780,9 +839,21 @@ public void subscribeClusterRevisionAttribute( private native void readApplicationLauncherListAttribute( long chipClusterPtr, ApplicationLauncherListAttributeCallback callback); + private native void subscribeApplicationLauncherListAttribute( + long chipClusterPtr, + ApplicationLauncherListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -831,38 +902,8 @@ private native void selectOutputRequest( Integer index, @Nullable Integer timedInvokeTimeoutMs); - public static class AudioOutputListAttribute { - public Integer index; - public Integer outputType; - public String name; - - public AudioOutputListAttribute(Integer index, Integer outputType, String name) { - this.index = index; - this.outputType = outputType; - this.name = name; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int index: "); - output.append(this.index); - output.append("\n"); - - output.append("int outputType: "); - output.append(this.outputType); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - return output.toString(); - } - } - public interface AudioOutputListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -870,7 +911,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -881,6 +922,11 @@ public void readAudioOutputListAttribute(AudioOutputListAttributeCallback callba readAudioOutputListAttribute(chipClusterPtr, callback); } + public void subscribeAudioOutputListAttribute( + AudioOutputListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAudioOutputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readCurrentAudioOutputAttribute(IntegerAttributeCallback callback) { readCurrentAudioOutputAttribute(chipClusterPtr, callback); } @@ -894,6 +940,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -906,6 +957,12 @@ public void subscribeClusterRevisionAttribute( private native void readAudioOutputListAttribute( long chipClusterPtr, AudioOutputListAttributeCallback callback); + private native void subscribeAudioOutputListAttribute( + long chipClusterPtr, + AudioOutputListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readCurrentAudioOutputAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -915,6 +972,12 @@ private native void subscribeCurrentAudioOutputAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -946,6 +1009,7 @@ public void barrierControlStop(DefaultClusterCallback callback) { } public void barrierControlStop(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + barrierControlStop(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -961,7 +1025,7 @@ private native void barrierControlStop( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -1008,6 +1072,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1044,6 +1113,12 @@ private native void subscribeBarrierPositionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1066,6 +1141,7 @@ public void mfgSpecificPing(DefaultClusterCallback callback) { } public void mfgSpecificPing(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + mfgSpecificPing(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -1083,7 +1159,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -1292,6 +1368,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1472,6 +1553,12 @@ private native void subscribeUniqueIDAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1490,7 +1577,7 @@ public BinaryInputBasicCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -1546,6 +1633,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1588,6 +1680,12 @@ private native void subscribeStatusFlagsAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1663,7 +1761,7 @@ private native void unbind( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -1674,6 +1772,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1686,6 +1789,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -1704,7 +1813,7 @@ public BooleanStateCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -1724,6 +1833,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -1742,6 +1856,12 @@ private native void subscribeStateValueAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -2018,100 +2138,16 @@ private native void stopAction( Optional invokeID, @Nullable Integer timedInvokeTimeoutMs); - public static class ActionListAttribute { - public Integer actionID; - public String name; - public Integer type; - public Integer endpointListID; - public Integer supportedCommands; - public Integer status; - - public ActionListAttribute( - Integer actionID, - String name, - Integer type, - Integer endpointListID, - Integer supportedCommands, - Integer status) { - this.actionID = actionID; - this.name = name; - this.type = type; - this.endpointListID = endpointListID; - this.supportedCommands = supportedCommands; - this.status = status; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int actionID: "); - output.append(this.actionID); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("int type: "); - output.append(this.type); - output.append("\n"); - - output.append("int endpointListID: "); - output.append(this.endpointListID); - output.append("\n"); - - output.append("int supportedCommands: "); - output.append(this.supportedCommands); - output.append("\n"); - - output.append("int status: "); - output.append(this.status); - output.append("\n"); - - return output.toString(); - } - } - public interface ActionListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class EndpointListAttribute { - public Integer endpointListID; - public String name; - public Integer type; - - public EndpointListAttribute(Integer endpointListID, String name, Integer type) { - this.endpointListID = endpointListID; - this.name = name; - this.type = type; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int endpointListID: "); - output.append(this.endpointListID); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("int type: "); - output.append(this.type); - output.append("\n"); - - return output.toString(); - } - } - public interface EndpointListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2119,7 +2155,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2130,10 +2166,20 @@ public void readActionListAttribute(ActionListAttributeCallback callback) { readActionListAttribute(chipClusterPtr, callback); } + public void subscribeActionListAttribute( + ActionListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActionListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readEndpointListAttribute(EndpointListAttributeCallback callback) { readEndpointListAttribute(chipClusterPtr, callback); } + public void subscribeEndpointListAttribute( + EndpointListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeEndpointListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSetupUrlAttribute(CharStringAttributeCallback callback) { readSetupUrlAttribute(chipClusterPtr, callback); } @@ -2147,6 +2193,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -2159,9 +2210,21 @@ public void subscribeClusterRevisionAttribute( private native void readActionListAttribute( long chipClusterPtr, ActionListAttributeCallback callback); + private native void subscribeActionListAttribute( + long chipClusterPtr, + ActionListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readEndpointListAttribute( long chipClusterPtr, EndpointListAttributeCallback callback); + private native void subscribeEndpointListAttribute( + long chipClusterPtr, + EndpointListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readSetupUrlAttribute( long chipClusterPtr, CharStringAttributeCallback callback); @@ -2174,6 +2237,12 @@ private native void subscribeSetupUrlAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -2192,7 +2261,7 @@ public BridgedDeviceBasicCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2203,6 +2272,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -2215,6 +2289,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -2284,62 +2364,13 @@ private native void skipChannelRequest( @Nullable Integer timedInvokeTimeoutMs); public interface ChangeChannelResponseCallback { - void onSuccess( // channelMatch: Struct ChannelInfo - // Conversion from this type to Java is not properly implemented yet - Integer errorType); + void onSuccess(ChipStructs.ChannelClusterChannelInfo channelMatch, Integer errorType); void onError(Exception error); } - public static class ChannelListAttribute { - public Integer majorNumber; - public Integer minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; - - public ChannelListAttribute( - Integer majorNumber, - Integer minorNumber, - String name, - String callSign, - String affiliateCallSign) { - this.majorNumber = majorNumber; - this.minorNumber = minorNumber; - this.name = name; - this.callSign = callSign; - this.affiliateCallSign = affiliateCallSign; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int majorNumber: "); - output.append(this.majorNumber); - output.append("\n"); - - output.append("int minorNumber: "); - output.append(this.minorNumber); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("String callSign: "); - output.append(this.callSign); - output.append("\n"); - - output.append("String affiliateCallSign: "); - output.append(this.affiliateCallSign); - output.append("\n"); - - return output.toString(); - } - } - public interface ChannelListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2347,7 +2378,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -2358,10 +2389,20 @@ public void readChannelListAttribute(ChannelListAttributeCallback callback) { readChannelListAttribute(chipClusterPtr, callback); } + public void subscribeChannelListAttribute( + ChannelListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeChannelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -2374,9 +2415,21 @@ public void subscribeClusterRevisionAttribute( private native void readChannelListAttribute( long chipClusterPtr, ChannelListAttributeCallback callback); + private native void subscribeChannelListAttribute( + long chipClusterPtr, + ChannelListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -3222,7 +3275,7 @@ private native void stopMoveStep( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -3824,6 +3877,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4229,6 +4287,12 @@ private native void subscribeStartUpColorTemperatureMiredsAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4247,31 +4311,44 @@ public ContentLauncherCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public void launchContentRequest( - LaunchResponseCallback callback, Boolean autoPlay, String data) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data, null); + LaunchResponseCallback callback, + Boolean autoPlay, + String data, + ArrayList search) { + launchContentRequest(chipClusterPtr, callback, autoPlay, data, search, null); } public void launchContentRequest( - LaunchResponseCallback callback, Boolean autoPlay, String data, int timedInvokeTimeoutMs) { - launchContentRequest(chipClusterPtr, callback, autoPlay, data, timedInvokeTimeoutMs); + LaunchResponseCallback callback, + Boolean autoPlay, + String data, + ArrayList search, + int timedInvokeTimeoutMs) { + launchContentRequest(chipClusterPtr, callback, autoPlay, data, search, timedInvokeTimeoutMs); } public void launchURLRequest( LaunchResponseCallback callback, String contentURL, String displayString, - String providerName) { - launchURLRequest(chipClusterPtr, callback, contentURL, displayString, providerName, null); + ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation) { + launchURLRequest( + chipClusterPtr, callback, contentURL, displayString, brandingInformation, null); } public void launchURLRequest( LaunchResponseCallback callback, String contentURL, String displayString, - String providerName, + ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation, int timedInvokeTimeoutMs) { launchURLRequest( - chipClusterPtr, callback, contentURL, displayString, providerName, timedInvokeTimeoutMs); + chipClusterPtr, + callback, + contentURL, + displayString, + brandingInformation, + timedInvokeTimeoutMs); } private native void launchContentRequest( @@ -4279,6 +4356,7 @@ private native void launchContentRequest( LaunchResponseCallback Callback, Boolean autoPlay, String data, + ArrayList search, @Nullable Integer timedInvokeTimeoutMs); private native void launchURLRequest( @@ -4286,7 +4364,7 @@ private native void launchURLRequest( LaunchResponseCallback Callback, String contentURL, String displayString, - String providerName, + ChipStructs.ContentLauncherClusterBrandingInformation brandingInformation, @Nullable Integer timedInvokeTimeoutMs); public interface LaunchResponseCallback { @@ -4296,7 +4374,7 @@ public interface LaunchResponseCallback { } public interface AcceptHeaderListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4304,7 +4382,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4315,6 +4393,11 @@ public void readAcceptHeaderListAttribute(AcceptHeaderListAttributeCallback call readAcceptHeaderListAttribute(chipClusterPtr, callback); } + public void subscribeAcceptHeaderListAttribute( + AcceptHeaderListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAcceptHeaderListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSupportedStreamingProtocolsAttribute(LongAttributeCallback callback) { readSupportedStreamingProtocolsAttribute(chipClusterPtr, callback); } @@ -4340,6 +4423,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4352,6 +4440,12 @@ public void subscribeClusterRevisionAttribute( private native void readAcceptHeaderListAttribute( long chipClusterPtr, AcceptHeaderListAttributeCallback callback); + private native void subscribeAcceptHeaderListAttribute( + long chipClusterPtr, + AcceptHeaderListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readSupportedStreamingProtocolsAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -4367,6 +4461,12 @@ private native void subscribeSupportedStreamingProtocolsAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4384,32 +4484,8 @@ public DescriptorCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public static class DeviceListAttribute { - public Long type; - public Integer revision; - - public DeviceListAttribute(Long type, Integer revision) { - this.type = type; - this.revision = revision; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long type: "); - output.append(this.type); - output.append("\n"); - - output.append("int revision: "); - output.append(this.revision); - output.append("\n"); - - return output.toString(); - } - } - public interface DeviceListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4417,7 +4493,7 @@ default void onSubscriptionEstablished() {} } public interface ServerListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4425,7 +4501,7 @@ default void onSubscriptionEstablished() {} } public interface ClientListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4433,7 +4509,7 @@ default void onSubscriptionEstablished() {} } public interface PartsListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4441,7 +4517,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4452,22 +4528,47 @@ public void readDeviceListAttribute(DeviceListAttributeCallback callback) { readDeviceListAttribute(chipClusterPtr, callback); } + public void subscribeDeviceListAttribute( + DeviceListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDeviceListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readServerListAttribute(ServerListAttributeCallback callback) { readServerListAttribute(chipClusterPtr, callback); } + public void subscribeServerListAttribute( + ServerListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeServerListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClientListAttribute(ClientListAttributeCallback callback) { readClientListAttribute(chipClusterPtr, callback); } + public void subscribeClientListAttribute( + ClientListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClientListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readPartsListAttribute(PartsListAttributeCallback callback) { readPartsListAttribute(chipClusterPtr, callback); } + public void subscribePartsListAttribute( + PartsListAttributeCallback callback, int minInterval, int maxInterval) { + subscribePartsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -4480,18 +4581,45 @@ public void subscribeClusterRevisionAttribute( private native void readDeviceListAttribute( long chipClusterPtr, DeviceListAttributeCallback callback); - private native void readServerListAttribute( + private native void subscribeDeviceListAttribute( + long chipClusterPtr, + DeviceListAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readServerListAttribute( long chipClusterPtr, ServerListAttributeCallback callback); + private native void subscribeServerListAttribute( + long chipClusterPtr, + ServerListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClientListAttribute( long chipClusterPtr, ClientListAttributeCallback callback); + private native void subscribeClientListAttribute( + long chipClusterPtr, + ClientListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readPartsListAttribute( long chipClusterPtr, PartsListAttributeCallback callback); + private native void subscribePartsListAttribute( + long chipClusterPtr, PartsListAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -4548,7 +4676,7 @@ public interface RetrieveLogsResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -4559,8 +4687,19 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); } public static class DoorLockCluster extends BaseChipCluster { @@ -4574,17 +4713,15 @@ public DoorLockCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public void clearCredential( - DefaultClusterCallback callback, Integer credentialType, Integer credentialIndex) { - clearCredential(chipClusterPtr, callback, credentialType, credentialIndex, null); + DefaultClusterCallback callback, ChipStructs.DoorLockClusterDlCredential credential) { + clearCredential(chipClusterPtr, callback, credential, null); } public void clearCredential( DefaultClusterCallback callback, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, int timedInvokeTimeoutMs) { - clearCredential( - chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); + clearCredential(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); } public void clearUser(DefaultClusterCallback callback, Integer userIndex) { @@ -4598,18 +4735,15 @@ public void clearUser( public void getCredentialStatus( GetCredentialStatusResponseCallback callback, - Integer credentialType, - Integer credentialIndex) { - getCredentialStatus(chipClusterPtr, callback, credentialType, credentialIndex, null); + ChipStructs.DoorLockClusterDlCredential credential) { + getCredentialStatus(chipClusterPtr, callback, credential, null); } public void getCredentialStatus( GetCredentialStatusResponseCallback callback, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, int timedInvokeTimeoutMs) { - getCredentialStatus( - chipClusterPtr, callback, credentialType, credentialIndex, timedInvokeTimeoutMs); + getCredentialStatus(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); } public void getUser(GetUserResponseCallback callback, Integer userIndex) { @@ -4633,8 +4767,7 @@ public void lockDoor( public void setCredential( SetCredentialResponseCallback callback, Integer operationType, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, byte[] credentialData, Integer userIndex, Integer userStatus) { @@ -4642,8 +4775,7 @@ public void setCredential( chipClusterPtr, callback, operationType, - credentialType, - credentialIndex, + credential, credentialData, userIndex, userStatus, @@ -4653,8 +4785,7 @@ public void setCredential( public void setCredential( SetCredentialResponseCallback callback, Integer operationType, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, byte[] credentialData, Integer userIndex, Integer userStatus, @@ -4663,8 +4794,7 @@ public void setCredential( chipClusterPtr, callback, operationType, - credentialType, - credentialIndex, + credential, credentialData, userIndex, userStatus, @@ -4728,8 +4858,7 @@ public void unlockDoor( private native void clearCredential( long chipClusterPtr, DefaultClusterCallback Callback, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, @Nullable Integer timedInvokeTimeoutMs); private native void clearUser( @@ -4741,8 +4870,7 @@ private native void clearUser( private native void getCredentialStatus( long chipClusterPtr, GetCredentialStatusResponseCallback Callback, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, @Nullable Integer timedInvokeTimeoutMs); private native void getUser( @@ -4761,8 +4889,7 @@ private native void setCredential( long chipClusterPtr, SetCredentialResponseCallback Callback, Integer operationType, - Integer credentialType, - Integer credentialIndex, + ChipStructs.DoorLockClusterDlCredential credential, byte[] credentialData, Integer userIndex, Integer userStatus, @@ -4803,8 +4930,7 @@ void onSuccess( @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, - // credentials: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet + @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, Integer nextUserIndex); @@ -4836,7 +4962,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5058,6 +5184,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5211,6 +5342,12 @@ private native void subscribeWrongCodeEntryLimitAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5229,7 +5366,7 @@ public ElectricalMeasurementCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5339,6 +5476,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5417,6 +5559,12 @@ private native void subscribeActivePowerMaxAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5439,6 +5587,7 @@ public void resetCounts(DefaultClusterCallback callback) { } public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -5448,7 +5597,7 @@ private native void resetCounts( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5540,6 +5689,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -5615,6 +5769,12 @@ private native void subscribeTimeSinceResetAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -5638,32 +5798,8 @@ public FixedLabelCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public static class LabelListAttribute { - public String label; - public String value; - - public LabelListAttribute(String label, String value) { - this.label = label; - this.value = value; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("String label: "); - output.append(this.label); - output.append("\n"); - - output.append("String value: "); - output.append(this.value); - output.append("\n"); - - return output.toString(); - } - } - public interface LabelListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5671,7 +5807,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5682,10 +5818,20 @@ public void readLabelListAttribute(LabelListAttributeCallback callback) { readLabelListAttribute(chipClusterPtr, callback); } + public void subscribeLabelListAttribute( + LabelListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5698,9 +5844,18 @@ public void subscribeClusterRevisionAttribute( private native void readLabelListAttribute( long chipClusterPtr, LabelListAttributeCallback callback); + private native void subscribeLabelListAttribute( + long chipClusterPtr, LabelListAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5719,7 +5874,7 @@ public FlowMeasurementCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5766,6 +5921,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -5802,6 +5962,12 @@ private native void subscribeToleranceAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -5848,6 +6014,7 @@ public void commissioningComplete(CommissioningCompleteResponseCallback callback public void commissioningComplete( CommissioningCompleteResponseCallback callback, int timedInvokeTimeoutMs) { + commissioningComplete(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -5918,26 +6085,9 @@ public interface SetRegulatoryConfigResponseCallback { void onError(Exception error); } - public static class BasicCommissioningInfoListAttribute { - public Long failSafeExpiryLengthMs; - - public BasicCommissioningInfoListAttribute(Long failSafeExpiryLengthMs) { - this.failSafeExpiryLengthMs = failSafeExpiryLengthMs; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long failSafeExpiryLengthMs: "); - output.append(this.failSafeExpiryLengthMs); - output.append("\n"); - - return output.toString(); - } - } - public interface BasicCommissioningInfoListAttributeCallback { - void onSuccess(List valueList); + void onSuccess( + List valueList); void onError(Exception ex); @@ -5945,7 +6095,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -5975,6 +6125,12 @@ public void readBasicCommissioningInfoListAttribute( readBasicCommissioningInfoListAttribute(chipClusterPtr, callback); } + public void subscribeBasicCommissioningInfoListAttribute( + BasicCommissioningInfoListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeBasicCommissioningInfoListAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readRegulatoryConfigAttribute(IntegerAttributeCallback callback) { readRegulatoryConfigAttribute(chipClusterPtr, callback); } @@ -5997,6 +6153,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6021,6 +6182,12 @@ private native void subscribeBreadcrumbAttribute( private native void readBasicCommissioningInfoListAttribute( long chipClusterPtr, BasicCommissioningInfoListAttributeCallback callback); + private native void subscribeBasicCommissioningInfoListAttribute( + long chipClusterPtr, + BasicCommissioningInfoListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readRegulatoryConfigAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6036,6 +6203,12 @@ private native void subscribeLocationCapabilityAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6053,62 +6226,8 @@ public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public static class NetworkInterfacesAttribute { - public String name; - public Boolean fabricConnected; - public Boolean offPremiseServicesReachableIPv4; - public Boolean offPremiseServicesReachableIPv6; - public byte[] hardwareAddress; - public Integer type; - - public NetworkInterfacesAttribute( - String name, - Boolean fabricConnected, - Boolean offPremiseServicesReachableIPv4, - Boolean offPremiseServicesReachableIPv6, - byte[] hardwareAddress, - Integer type) { - this.name = name; - this.fabricConnected = fabricConnected; - this.offPremiseServicesReachableIPv4 = offPremiseServicesReachableIPv4; - this.offPremiseServicesReachableIPv6 = offPremiseServicesReachableIPv6; - this.hardwareAddress = hardwareAddress; - this.type = type; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("boolean fabricConnected: "); - output.append(this.fabricConnected); - output.append("\n"); - - output.append("boolean offPremiseServicesReachableIPv4: "); - output.append(this.offPremiseServicesReachableIPv4); - output.append("\n"); - - output.append("boolean offPremiseServicesReachableIPv6: "); - output.append(this.offPremiseServicesReachableIPv6); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(hardwareAddress)); - output.append("\n"); - - output.append("int type: "); - output.append(this.type); - output.append("\n"); - - return output.toString(); - } - } - public interface NetworkInterfacesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6116,7 +6235,7 @@ default void onSubscriptionEstablished() {} } public interface ActiveHardwareFaultsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6124,7 +6243,7 @@ default void onSubscriptionEstablished() {} } public interface ActiveRadioFaultsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6132,7 +6251,7 @@ default void onSubscriptionEstablished() {} } public interface ActiveNetworkFaultsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6140,7 +6259,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6151,6 +6270,11 @@ public void readNetworkInterfacesAttribute(NetworkInterfacesAttributeCallback ca readNetworkInterfacesAttribute(chipClusterPtr, callback); } + public void subscribeNetworkInterfacesAttribute( + NetworkInterfacesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNetworkInterfacesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readRebootCountAttribute(IntegerAttributeCallback callback) { readRebootCountAttribute(chipClusterPtr, callback); } @@ -6191,18 +6315,38 @@ public void readActiveHardwareFaultsAttribute(ActiveHardwareFaultsAttributeCallb readActiveHardwareFaultsAttribute(chipClusterPtr, callback); } + public void subscribeActiveHardwareFaultsAttribute( + ActiveHardwareFaultsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveHardwareFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readActiveRadioFaultsAttribute(ActiveRadioFaultsAttributeCallback callback) { readActiveRadioFaultsAttribute(chipClusterPtr, callback); } + public void subscribeActiveRadioFaultsAttribute( + ActiveRadioFaultsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveRadioFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readActiveNetworkFaultsAttribute(ActiveNetworkFaultsAttributeCallback callback) { readActiveNetworkFaultsAttribute(chipClusterPtr, callback); } + public void subscribeActiveNetworkFaultsAttribute( + ActiveNetworkFaultsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveNetworkFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6215,6 +6359,12 @@ public void subscribeClusterRevisionAttribute( private native void readNetworkInterfacesAttribute( long chipClusterPtr, NetworkInterfacesAttributeCallback callback); + private native void subscribeNetworkInterfacesAttribute( + long chipClusterPtr, + NetworkInterfacesAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readRebootCountAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6241,15 +6391,39 @@ private native void subscribeBootReasonsAttribute( private native void readActiveHardwareFaultsAttribute( long chipClusterPtr, ActiveHardwareFaultsAttributeCallback callback); + private native void subscribeActiveHardwareFaultsAttribute( + long chipClusterPtr, + ActiveHardwareFaultsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readActiveRadioFaultsAttribute( long chipClusterPtr, ActiveRadioFaultsAttributeCallback callback); + private native void subscribeActiveRadioFaultsAttribute( + long chipClusterPtr, + ActiveRadioFaultsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readActiveNetworkFaultsAttribute( long chipClusterPtr, ActiveNetworkFaultsAttributeCallback callback); + private native void subscribeActiveNetworkFaultsAttribute( + long chipClusterPtr, + ActiveNetworkFaultsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6277,13 +6451,13 @@ public void keySetRead( } public void keySetReadAllIndices( - KeySetReadAllIndicesResponseCallback callback, Integer groupKeySetIDs) { + KeySetReadAllIndicesResponseCallback callback, ArrayList groupKeySetIDs) { keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, null); } public void keySetReadAllIndices( KeySetReadAllIndicesResponseCallback callback, - Integer groupKeySetIDs, + ArrayList groupKeySetIDs, int timedInvokeTimeoutMs) { keySetReadAllIndices(chipClusterPtr, callback, groupKeySetIDs, timedInvokeTimeoutMs); } @@ -6299,51 +6473,15 @@ public void keySetRemove( public void keySetWrite( DefaultClusterCallback callback, - Integer groupKeySetID, - Integer securityPolicy, - byte[] epochKey0, - Long epochStartTime0, - byte[] epochKey1, - Long epochStartTime1, - byte[] epochKey2, - Long epochStartTime2) { - keySetWrite( - chipClusterPtr, - callback, - groupKeySetID, - securityPolicy, - epochKey0, - epochStartTime0, - epochKey1, - epochStartTime1, - epochKey2, - epochStartTime2, - null); + ChipStructs.GroupKeyManagementClusterGroupKeySet groupKeySet) { + keySetWrite(chipClusterPtr, callback, groupKeySet, null); } public void keySetWrite( DefaultClusterCallback callback, - Integer groupKeySetID, - Integer securityPolicy, - byte[] epochKey0, - Long epochStartTime0, - byte[] epochKey1, - Long epochStartTime1, - byte[] epochKey2, - Long epochStartTime2, + ChipStructs.GroupKeyManagementClusterGroupKeySet groupKeySet, int timedInvokeTimeoutMs) { - keySetWrite( - chipClusterPtr, - callback, - groupKeySetID, - securityPolicy, - epochKey0, - epochStartTime0, - epochKey1, - epochStartTime1, - epochKey2, - epochStartTime2, - timedInvokeTimeoutMs); + keySetWrite(chipClusterPtr, callback, groupKeySet, timedInvokeTimeoutMs); } private native void keySetRead( @@ -6355,7 +6493,7 @@ private native void keySetRead( private native void keySetReadAllIndices( long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback, - Integer groupKeySetIDs, + ArrayList groupKeySetIDs, @Nullable Integer timedInvokeTimeoutMs); private native void keySetRemove( @@ -6367,102 +6505,31 @@ private native void keySetRemove( private native void keySetWrite( long chipClusterPtr, DefaultClusterCallback Callback, - Integer groupKeySetID, - Integer securityPolicy, - byte[] epochKey0, - Long epochStartTime0, - byte[] epochKey1, - Long epochStartTime1, - byte[] epochKey2, - Long epochStartTime2, + ChipStructs.GroupKeyManagementClusterGroupKeySet groupKeySet, @Nullable Integer timedInvokeTimeoutMs); public interface KeySetReadAllIndicesResponseCallback { - void onSuccess( // groupKeySetIDs: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess(ArrayList groupKeySetIDs); void onError(Exception error); } public interface KeySetReadResponseCallback { - void onSuccess( // groupKeySet: Struct GroupKeySet - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySet groupKeySet); void onError(Exception error); } - public static class GroupKeyMapAttribute { - public Integer fabricIndex; - public Integer groupId; - public Integer groupKeySetID; - - public GroupKeyMapAttribute(Integer fabricIndex, Integer groupId, Integer groupKeySetID) { - this.fabricIndex = fabricIndex; - this.groupId = groupId; - this.groupKeySetID = groupKeySetID; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("int groupId: "); - output.append(this.groupId); - output.append("\n"); - - output.append("int groupKeySetID: "); - output.append(this.groupKeySetID); - output.append("\n"); - - return output.toString(); - } - } - public interface GroupKeyMapAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class GroupTableAttribute { - public Integer fabricIndex; - public Integer groupId; - public String groupName; - - public GroupTableAttribute(Integer fabricIndex, Integer groupId, String groupName) { - this.fabricIndex = fabricIndex; - this.groupId = groupId; - this.groupName = groupName; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("int groupId: "); - output.append(this.groupId); - output.append("\n"); - - output.append("String groupName: "); - output.append(this.groupName); - output.append("\n"); - - return output.toString(); - } - } - public interface GroupTableAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6470,7 +6537,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6481,10 +6548,20 @@ public void readGroupKeyMapAttribute(GroupKeyMapAttributeCallback callback) { readGroupKeyMapAttribute(chipClusterPtr, callback); } + public void subscribeGroupKeyMapAttribute( + GroupKeyMapAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGroupKeyMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readGroupTableAttribute(GroupTableAttributeCallback callback) { readGroupTableAttribute(chipClusterPtr, callback); } + public void subscribeGroupTableAttribute( + GroupTableAttributeCallback callback, int minInterval, int maxInterval) { + subscribeGroupTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readMaxGroupsPerFabricAttribute(IntegerAttributeCallback callback) { readMaxGroupsPerFabricAttribute(chipClusterPtr, callback); } @@ -6507,6 +6584,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6519,9 +6601,21 @@ public void subscribeClusterRevisionAttribute( private native void readGroupKeyMapAttribute( long chipClusterPtr, GroupKeyMapAttributeCallback callback); + private native void subscribeGroupKeyMapAttribute( + long chipClusterPtr, + GroupKeyMapAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readGroupTableAttribute( long chipClusterPtr, GroupTableAttributeCallback callback); + private native void subscribeGroupTableAttribute( + long chipClusterPtr, + GroupTableAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readMaxGroupsPerFabricAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6537,6 +6631,12 @@ private native void subscribeMaxGroupKeysPerFabricAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6579,12 +6679,15 @@ public void addGroupIfIdentifying( addGroupIfIdentifying(chipClusterPtr, callback, groupId, groupName, timedInvokeTimeoutMs); } - public void getGroupMembership(GetGroupMembershipResponseCallback callback, Integer groupList) { + public void getGroupMembership( + GetGroupMembershipResponseCallback callback, ArrayList groupList) { getGroupMembership(chipClusterPtr, callback, groupList, null); } public void getGroupMembership( - GetGroupMembershipResponseCallback callback, Integer groupList, int timedInvokeTimeoutMs) { + GetGroupMembershipResponseCallback callback, + ArrayList groupList, + int timedInvokeTimeoutMs) { getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); } @@ -6593,6 +6696,7 @@ public void removeAllGroups(DefaultClusterCallback callback) { } public void removeAllGroups(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + removeAllGroups(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -6631,7 +6735,7 @@ private native void addGroupIfIdentifying( private native void getGroupMembership( long chipClusterPtr, GetGroupMembershipResponseCallback Callback, - Integer groupList, + ArrayList groupList, @Nullable Integer timedInvokeTimeoutMs); private native void removeAllGroups( @@ -6658,10 +6762,7 @@ public interface AddGroupResponseCallback { } public interface GetGroupMembershipResponseCallback { - void onSuccess(Integer capacity - // groupList: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess(Integer capacity, ArrayList groupList); void onError(Exception error); } @@ -6679,7 +6780,7 @@ public interface ViewGroupResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6699,6 +6800,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6717,6 +6823,12 @@ private native void subscribeNameSupportAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6748,6 +6860,7 @@ public void identifyQuery(IdentifyQueryResponseCallback callback) { } public void identifyQuery(IdentifyQueryResponseCallback callback, int timedInvokeTimeoutMs) { + identifyQuery(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -6790,7 +6903,7 @@ public interface IdentifyQueryResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6828,6 +6941,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -6858,6 +6976,12 @@ private native void subscribeIdentifyTypeAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -6908,7 +7032,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -6964,6 +7088,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7018,6 +7147,12 @@ private native void subscribeLightSensorTypeAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7057,7 +7192,7 @@ public interface SendKeyResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7068,6 +7203,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7080,6 +7220,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7244,6 +7390,7 @@ public void stopWithOnOff(DefaultClusterCallback callback) { } public void stopWithOnOff(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -7350,7 +7497,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7460,12 +7607,12 @@ public void readOnLevelAttribute(OnLevelAttributeCallback callback) { readOnLevelAttribute(chipClusterPtr, callback); } - public void writeOnLevelAttribute(DefaultClusterCallback callback, @Nullable Integer value) { + public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { writeOnLevelAttribute(chipClusterPtr, callback, value, null); } public void writeOnLevelAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeOnLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -7478,13 +7625,12 @@ public void readOnTransitionTimeAttribute(OnTransitionTimeAttributeCallback call readOnTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOnTransitionTimeAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, null); } public void writeOnTransitionTimeAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -7497,13 +7643,12 @@ public void readOffTransitionTimeAttribute(OffTransitionTimeAttributeCallback ca readOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOffTransitionTimeAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); } public void writeOffTransitionTimeAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -7516,13 +7661,12 @@ public void readDefaultMoveRateAttribute(DefaultMoveRateAttributeCallback callba readDefaultMoveRateAttribute(chipClusterPtr, callback); } - public void writeDefaultMoveRateAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, null); } public void writeDefaultMoveRateAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -7535,13 +7679,12 @@ public void readStartUpCurrentLevelAttribute(StartUpCurrentLevelAttributeCallbac readStartUpCurrentLevelAttribute(chipClusterPtr, callback); } - public void writeStartUpCurrentLevelAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); } public void writeStartUpCurrentLevelAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -7554,6 +7697,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -7644,7 +7792,7 @@ private native void readOnLevelAttribute( private native void writeOnLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnLevelAttribute( @@ -7656,7 +7804,7 @@ private native void readOnTransitionTimeAttribute( private native void writeOnTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeOnTransitionTimeAttribute( @@ -7671,7 +7819,7 @@ private native void readOffTransitionTimeAttribute( private native void writeOffTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeOffTransitionTimeAttribute( @@ -7686,7 +7834,7 @@ private native void readDefaultMoveRateAttribute( private native void writeDefaultMoveRateAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeDefaultMoveRateAttribute( @@ -7701,7 +7849,7 @@ private native void readStartUpCurrentLevelAttribute( private native void writeStartUpCurrentLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( @@ -7713,6 +7861,12 @@ private native void subscribeStartUpCurrentLevelAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -7737,7 +7891,7 @@ public LocalizationConfigurationCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface SupportedLocalesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7766,6 +7920,11 @@ public void readSupportedLocalesAttribute(SupportedLocalesAttributeCallback call readSupportedLocalesAttribute(chipClusterPtr, callback); } + public void subscribeSupportedLocalesAttribute( + SupportedLocalesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSupportedLocalesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7788,6 +7947,12 @@ private native void subscribeActiveLocaleAttribute( private native void readSupportedLocalesAttribute( long chipClusterPtr, SupportedLocalesAttributeCallback callback); + private native void subscribeSupportedLocalesAttribute( + long chipClusterPtr, + SupportedLocalesAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); } @@ -7807,6 +7972,7 @@ public void sleep(DefaultClusterCallback callback) { } public void sleep(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + sleep(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -7816,7 +7982,7 @@ private native void sleep( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7827,6 +7993,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7839,6 +8010,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -7861,6 +8038,7 @@ public void hideInputStatusRequest(DefaultClusterCallback callback) { } public void hideInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + hideInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -7887,6 +8065,7 @@ public void showInputStatusRequest(DefaultClusterCallback callback) { } public void showInputStatusRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + showInputStatusRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -7913,45 +8092,8 @@ private native void showInputStatusRequest( DefaultClusterCallback Callback, @Nullable Integer timedInvokeTimeoutMs); - public static class MediaInputListAttribute { - public Integer index; - public Integer inputType; - public String name; - public String description; - - public MediaInputListAttribute( - Integer index, Integer inputType, String name, String description) { - this.index = index; - this.inputType = inputType; - this.name = name; - this.description = description; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int index: "); - output.append(this.index); - output.append("\n"); - - output.append("int inputType: "); - output.append(this.inputType); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("String description: "); - output.append(this.description); - output.append("\n"); - - return output.toString(); - } - } - public interface MediaInputListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7959,7 +8101,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -7970,6 +8112,11 @@ public void readMediaInputListAttribute(MediaInputListAttributeCallback callback readMediaInputListAttribute(chipClusterPtr, callback); } + public void subscribeMediaInputListAttribute( + MediaInputListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMediaInputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readCurrentMediaInputAttribute(IntegerAttributeCallback callback) { readCurrentMediaInputAttribute(chipClusterPtr, callback); } @@ -7983,6 +8130,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7995,6 +8147,12 @@ public void subscribeClusterRevisionAttribute( private native void readMediaInputListAttribute( long chipClusterPtr, MediaInputListAttributeCallback callback); + private native void subscribeMediaInputListAttribute( + long chipClusterPtr, + MediaInputListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readCurrentMediaInputAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8004,6 +8162,12 @@ private native void subscribeCurrentMediaInputAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8026,6 +8190,7 @@ public void fastForwardRequest(PlaybackResponseCallback callback) { } public void fastForwardRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + fastForwardRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8034,6 +8199,7 @@ public void nextRequest(PlaybackResponseCallback callback) { } public void nextRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + nextRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8042,6 +8208,7 @@ public void pauseRequest(PlaybackResponseCallback callback) { } public void pauseRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + pauseRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8050,6 +8217,7 @@ public void playRequest(PlaybackResponseCallback callback) { } public void playRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + playRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8058,6 +8226,7 @@ public void previousRequest(PlaybackResponseCallback callback) { } public void previousRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + previousRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8066,6 +8235,7 @@ public void rewindRequest(PlaybackResponseCallback callback) { } public void rewindRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + rewindRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8108,6 +8278,7 @@ public void startOverRequest(PlaybackResponseCallback callback) { } public void startOverRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + startOverRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8116,6 +8287,7 @@ public void stopRequest(PlaybackResponseCallback callback) { } public void stopRequest(PlaybackResponseCallback callback, int timedInvokeTimeoutMs) { + stopRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -8184,7 +8356,7 @@ public interface PlaybackResponseCallback { } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -8249,6 +8421,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8295,6 +8472,12 @@ private native void subscribeSeekRangeStartAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8327,38 +8510,8 @@ private native void changeToMode( Integer newMode, @Nullable Integer timedInvokeTimeoutMs); - public static class SupportedModesAttribute { - public String label; - public Integer mode; - public Long semanticTag; - - public SupportedModesAttribute(String label, Integer mode, Long semanticTag) { - this.label = label; - this.mode = mode; - this.semanticTag = semanticTag; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("String label: "); - output.append(this.label); - output.append("\n"); - - output.append("int mode: "); - output.append(this.mode); - output.append("\n"); - - output.append("long semanticTag: "); - output.append(this.semanticTag); - output.append("\n"); - - return output.toString(); - } - } - public interface SupportedModesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -8366,7 +8519,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -8386,6 +8539,11 @@ public void readSupportedModesAttribute(SupportedModesAttributeCallback callback readSupportedModesAttribute(chipClusterPtr, callback); } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readOnModeAttribute(IntegerAttributeCallback callback) { readOnModeAttribute(chipClusterPtr, callback); } @@ -8426,6 +8584,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8444,6 +8607,12 @@ private native void subscribeCurrentModeAttribute( private native void readSupportedModesAttribute( long chipClusterPtr, SupportedModesAttributeCallback callback); + private native void subscribeSupportedModesAttribute( + long chipClusterPtr, + SupportedModesAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readOnModeAttribute(long chipClusterPtr, IntegerAttributeCallback callback); private native void writeOnModeAttribute( @@ -8473,6 +8642,12 @@ private native void subscribeDescriptionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8620,54 +8795,31 @@ private native void scanNetworks( @Nullable Integer timedInvokeTimeoutMs); public interface ConnectNetworkResponseCallback { - void onSuccess(Integer NetworkingStatus, String DebugText, Long ErrorValue); + void onSuccess(Integer networkingStatus, String debugText, Long errorValue); void onError(Exception error); } public interface NetworkConfigResponseCallback { - void onSuccess(Integer NetworkingStatus, String DebugText); + void onSuccess(Integer networkingStatus, String debugText); void onError(Exception error); } public interface ScanNetworksResponseCallback { - void onSuccess(Integer NetworkingStatus, String DebugText - // WiFiScanResults: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - // ThreadScanResults: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess( + Integer networkingStatus, + String debugText, + Optional> + wiFiScanResults, + Optional> + threadScanResults); void onError(Exception error); } - public static class NetworksAttribute { - public byte[] networkID; - public Boolean connected; - - public NetworksAttribute(byte[] networkID, Boolean connected) { - this.networkID = networkID; - this.connected = connected; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("byte[] "); - output.append(Arrays.toString(networkID)); - output.append("\n"); - - output.append("boolean connected: "); - output.append(this.connected); - output.append("\n"); - - return output.toString(); - } - } - public interface NetworksAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -8687,6 +8839,11 @@ public void readNetworksAttribute(NetworksAttributeCallback callback) { readNetworksAttribute(chipClusterPtr, callback); } + public void subscribeNetworksAttribute( + NetworksAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readScanMaxTimeSecondsAttribute(IntegerAttributeCallback callback) { readScanMaxTimeSecondsAttribute(chipClusterPtr, callback); } @@ -8777,6 +8934,9 @@ private native void subscribeMaxNetworksAttribute( private native void readNetworksAttribute( long chipClusterPtr, NetworksAttributeCallback callback); + private native void subscribeNetworksAttribute( + long chipClusterPtr, NetworksAttributeCallback callback, int minInterval, int maxInterval); + private native void readScanMaxTimeSecondsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -8877,7 +9037,7 @@ public void queryImage( Integer vendorId, Integer productId, Long softwareVersion, - Integer protocolsSupported, + ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, @@ -8901,7 +9061,7 @@ public void queryImage( Integer vendorId, Integer productId, Long softwareVersion, - Integer protocolsSupported, + ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, @@ -8941,7 +9101,7 @@ private native void queryImage( Integer vendorId, Integer productId, Long softwareVersion, - Integer protocolsSupported, + ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, @@ -8969,7 +9129,7 @@ void onSuccess( } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -8980,6 +9140,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -8992,6 +9157,12 @@ public void subscribeClusterRevisionAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9056,39 +9227,8 @@ private native void announceOtaProvider( Integer endpoint, @Nullable Integer timedInvokeTimeoutMs); - public static class DefaultOtaProvidersAttribute { - public Integer fabricIndex; - public Long providerNodeID; - public Integer endpoint; - - public DefaultOtaProvidersAttribute( - Integer fabricIndex, Long providerNodeID, Integer endpoint) { - this.fabricIndex = fabricIndex; - this.providerNodeID = providerNodeID; - this.endpoint = endpoint; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("long providerNodeID: "); - output.append(this.providerNodeID); - output.append("\n"); - - output.append("int endpoint: "); - output.append(this.endpoint); - output.append("\n"); - - return output.toString(); - } - } - public interface DefaultOtaProvidersAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9104,7 +9244,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9115,6 +9255,24 @@ public void readDefaultOtaProvidersAttribute(DefaultOtaProvidersAttributeCallbac readDefaultOtaProvidersAttribute(chipClusterPtr, callback); } + public void writeDefaultOtaProvidersAttribute( + DefaultClusterCallback callback, + ArrayList value) { + writeDefaultOtaProvidersAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDefaultOtaProvidersAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeDefaultOtaProvidersAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeDefaultOtaProvidersAttribute( + DefaultOtaProvidersAttributeCallback callback, int minInterval, int maxInterval) { + subscribeDefaultOtaProvidersAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readUpdatePossibleAttribute(BooleanAttributeCallback callback) { readUpdatePossibleAttribute(chipClusterPtr, callback); } @@ -9146,6 +9304,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -9158,6 +9321,18 @@ public void subscribeClusterRevisionAttribute( private native void readDefaultOtaProvidersAttribute( long chipClusterPtr, DefaultOtaProvidersAttributeCallback callback); + private native void writeDefaultOtaProvidersAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeDefaultOtaProvidersAttribute( + long chipClusterPtr, + DefaultOtaProvidersAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readUpdatePossibleAttribute( long chipClusterPtr, BooleanAttributeCallback callback); @@ -9182,6 +9357,12 @@ private native void subscribeUpdateStateProgressAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9200,7 +9381,7 @@ public OccupancySensingCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9239,6 +9420,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -9269,6 +9455,12 @@ private native void subscribeOccupancySensorTypeBitmapAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9291,6 +9483,7 @@ public void off(DefaultClusterCallback callback) { } public void off(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + off(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -9312,6 +9505,7 @@ public void on(DefaultClusterCallback callback) { } public void on(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + on(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -9320,6 +9514,7 @@ public void onWithRecallGlobalScene(DefaultClusterCallback callback) { } public void onWithRecallGlobalScene(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + onWithRecallGlobalScene(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -9346,6 +9541,7 @@ public void toggle(DefaultClusterCallback callback) { } public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + toggle(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -9385,7 +9581,7 @@ private native void toggle( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9468,6 +9664,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -9535,6 +9736,12 @@ private native void subscribeStartUpOnOffAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -9559,7 +9766,7 @@ public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9597,6 +9804,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -9627,6 +9839,12 @@ private native void subscribeSwitchActionsAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -9822,123 +10040,39 @@ private native void updateNOC( @Nullable Integer timedInvokeTimeoutMs); public interface AttestationResponseCallback { - void onSuccess(byte[] AttestationElements, byte[] Signature); + void onSuccess(byte[] attestationElements, byte[] signature); void onError(Exception error); } public interface CertificateChainResponseCallback { - void onSuccess(byte[] Certificate); + void onSuccess(byte[] certificate); void onError(Exception error); } public interface NOCResponseCallback { - void onSuccess(Integer StatusCode, Integer FabricIndex, String DebugText); + void onSuccess(Integer statusCode, Integer fabricIndex, String debugText); void onError(Exception error); } public interface OpCSRResponseCallback { - void onSuccess(byte[] NOCSRElements, byte[] AttestationSignature); + void onSuccess(byte[] NOCSRElements, byte[] attestationSignature); void onError(Exception error); } - public static class NOCsAttribute { - public Integer fabricIndex; - public byte[] noc; - public byte[] icac; - - public NOCsAttribute(Integer fabricIndex, byte[] noc, byte[] icac) { - this.fabricIndex = fabricIndex; - this.noc = noc; - this.icac = icac; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(noc)); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(icac)); - output.append("\n"); - - return output.toString(); - } - } - public interface NOCsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class FabricsListAttribute { - public Integer fabricIndex; - public byte[] rootPublicKey; - public Integer vendorId; - public Long fabricId; - public Long nodeId; - public String label; - - public FabricsListAttribute( - Integer fabricIndex, - byte[] rootPublicKey, - Integer vendorId, - Long fabricId, - Long nodeId, - String label) { - this.fabricIndex = fabricIndex; - this.rootPublicKey = rootPublicKey; - this.vendorId = vendorId; - this.fabricId = fabricId; - this.nodeId = nodeId; - this.label = label; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(rootPublicKey)); - output.append("\n"); - - output.append("int vendorId: "); - output.append(this.vendorId); - output.append("\n"); - - output.append("long fabricId: "); - output.append(this.fabricId); - output.append("\n"); - - output.append("long nodeId: "); - output.append(this.nodeId); - output.append("\n"); - - output.append("String label: "); - output.append(this.label); - output.append("\n"); - - return output.toString(); - } - } - public interface FabricsListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9946,7 +10080,7 @@ default void onSubscriptionEstablished() {} } public interface TrustedRootCertificatesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9962,7 +10096,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -9977,6 +10111,11 @@ public void readFabricsListAttribute(FabricsListAttributeCallback callback) { readFabricsListAttribute(chipClusterPtr, callback); } + public void subscribeFabricsListAttribute( + FabricsListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeFabricsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSupportedFabricsAttribute(IntegerAttributeCallback callback) { readSupportedFabricsAttribute(chipClusterPtr, callback); } @@ -10000,6 +10139,11 @@ public void readTrustedRootCertificatesAttribute( readTrustedRootCertificatesAttribute(chipClusterPtr, callback); } + public void subscribeTrustedRootCertificatesAttribute( + TrustedRootCertificatesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTrustedRootCertificatesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readCurrentFabricIndexAttribute(CurrentFabricIndexAttributeCallback callback) { readCurrentFabricIndexAttribute(chipClusterPtr, callback); } @@ -10013,6 +10157,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10027,6 +10176,12 @@ public void subscribeClusterRevisionAttribute( private native void readFabricsListAttribute( long chipClusterPtr, FabricsListAttributeCallback callback); + private native void subscribeFabricsListAttribute( + long chipClusterPtr, + FabricsListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readSupportedFabricsAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10042,6 +10197,12 @@ private native void subscribeCommissionedFabricsAttribute( private native void readTrustedRootCertificatesAttribute( long chipClusterPtr, TrustedRootCertificatesAttributeCallback callback); + private native void subscribeTrustedRootCertificatesAttribute( + long chipClusterPtr, + TrustedRootCertificatesAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readCurrentFabricIndexAttribute( long chipClusterPtr, CurrentFabricIndexAttributeCallback callback); @@ -10054,6 +10215,12 @@ private native void subscribeCurrentFabricIndexAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10072,7 +10239,7 @@ public PowerSourceCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface ActiveBatteryFaultsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10080,7 +10247,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10154,6 +10321,11 @@ public void readActiveBatteryFaultsAttribute(ActiveBatteryFaultsAttributeCallbac readActiveBatteryFaultsAttribute(chipClusterPtr, callback); } + public void subscribeActiveBatteryFaultsAttribute( + ActiveBatteryFaultsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveBatteryFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readBatteryChargeStateAttribute(IntegerAttributeCallback callback) { readBatteryChargeStateAttribute(chipClusterPtr, callback); } @@ -10167,6 +10339,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -10231,6 +10408,12 @@ private native void subscribeBatteryChargeLevelAttribute( private native void readActiveBatteryFaultsAttribute( long chipClusterPtr, ActiveBatteryFaultsAttributeCallback callback); + private native void subscribeActiveBatteryFaultsAttribute( + long chipClusterPtr, + ActiveBatteryFaultsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readBatteryChargeStateAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10240,6 +10423,12 @@ private native void subscribeBatteryChargeStateAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -10264,7 +10453,7 @@ public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface SourcesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10272,7 +10461,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10283,10 +10472,20 @@ public void readSourcesAttribute(SourcesAttributeCallback callback) { readSourcesAttribute(chipClusterPtr, callback); } + public void subscribeSourcesAttribute( + SourcesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSourcesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10299,9 +10498,18 @@ public void subscribeClusterRevisionAttribute( private native void readSourcesAttribute( long chipClusterPtr, SourcesAttributeCallback callback); + private native void subscribeSourcesAttribute( + long chipClusterPtr, SourcesAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10320,7 +10528,7 @@ public PressureMeasurementCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10358,6 +10566,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10388,6 +10601,12 @@ private native void subscribeMaxMeasuredValueAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -10422,7 +10641,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10595,13 +10814,12 @@ public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallb readLifetimeRunningHoursAttribute(chipClusterPtr, callback); } - public void writeLifetimeRunningHoursAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value) { writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, null); } public void writeLifetimeRunningHoursAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -10624,13 +10842,12 @@ public void readLifetimeEnergyConsumedAttribute( readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); } - public void writeLifetimeEnergyConsumedAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeLifetimeEnergyConsumedAttribute(DefaultClusterCallback callback, Long value) { writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, null); } public void writeLifetimeEnergyConsumedAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -10688,6 +10905,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -10819,7 +11041,7 @@ private native void readLifetimeRunningHoursAttribute( private native void writeLifetimeRunningHoursAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeRunningHoursAttribute( @@ -10839,7 +11061,7 @@ private native void readLifetimeEnergyConsumedAttribute( private native void writeLifetimeEnergyConsumedAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeLifetimeEnergyConsumedAttribute( @@ -10881,6 +11103,12 @@ private native void subscribeAlarmMaskAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -10905,7 +11133,7 @@ public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -10952,6 +11180,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -10988,6 +11221,12 @@ private native void subscribeToleranceAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -11011,9 +11250,7 @@ public void addScene( Integer sceneId, Integer transitionTime, String sceneName, - Long clusterId, - Integer length, - Integer value) { + ArrayList extensionFieldSets) { addScene( chipClusterPtr, callback, @@ -11021,9 +11258,7 @@ public void addScene( sceneId, transitionTime, sceneName, - clusterId, - length, - value, + extensionFieldSets, null); } @@ -11033,9 +11268,7 @@ public void addScene( Integer sceneId, Integer transitionTime, String sceneName, - Long clusterId, - Integer length, - Integer value, + ArrayList extensionFieldSets, int timedInvokeTimeoutMs) { addScene( chipClusterPtr, @@ -11044,9 +11277,7 @@ public void addScene( sceneId, transitionTime, sceneName, - clusterId, - length, - value, + extensionFieldSets, timedInvokeTimeoutMs); } @@ -11126,9 +11357,7 @@ private native void addScene( Integer sceneId, Integer transitionTime, String sceneName, - Long clusterId, - Integer length, - Integer value, + ArrayList extensionFieldSets, @Nullable Integer timedInvokeTimeoutMs); private native void getSceneMembership( @@ -11179,10 +11408,12 @@ public interface AddSceneResponseCallback { } public interface GetSceneMembershipResponseCallback { - void onSuccess(Integer status, Integer capacity, Integer groupId, Integer sceneCount - // sceneList: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess( + Integer status, + Integer capacity, + Integer groupId, + Integer sceneCount, + ArrayList sceneList); void onError(Exception error); } @@ -11207,16 +11438,18 @@ public interface StoreSceneResponseCallback { public interface ViewSceneResponseCallback { void onSuccess( - Integer status, Integer groupId, Integer sceneId, Integer transitionTime, String sceneName - // extensionFieldSets: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + Integer status, + Integer groupId, + Integer sceneId, + Integer transitionTime, + String sceneName, + ArrayList extensionFieldSets); void onError(Exception error); } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11272,6 +11505,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -11314,6 +11552,12 @@ private native void subscribeNameSupportAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -11336,6 +11580,7 @@ public void resetWatermarks(DefaultClusterCallback callback) { } public void resetWatermarks(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetWatermarks(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -11344,51 +11589,8 @@ private native void resetWatermarks( DefaultClusterCallback Callback, @Nullable Integer timedInvokeTimeoutMs); - public static class ThreadMetricsAttribute { - public Long id; - public String name; - public Long stackFreeCurrent; - public Long stackFreeMinimum; - public Long stackSize; - - public ThreadMetricsAttribute( - Long id, String name, Long stackFreeCurrent, Long stackFreeMinimum, Long stackSize) { - this.id = id; - this.name = name; - this.stackFreeCurrent = stackFreeCurrent; - this.stackFreeMinimum = stackFreeMinimum; - this.stackSize = stackSize; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long id: "); - output.append(this.id); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - output.append("long stackFreeCurrent: "); - output.append(this.stackFreeCurrent); - output.append("\n"); - - output.append("long stackFreeMinimum: "); - output.append(this.stackFreeMinimum); - output.append("\n"); - - output.append("long stackSize: "); - output.append(this.stackSize); - output.append("\n"); - - return output.toString(); - } - } - public interface ThreadMetricsAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11396,7 +11598,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11407,6 +11609,11 @@ public void readThreadMetricsAttribute(ThreadMetricsAttributeCallback callback) readThreadMetricsAttribute(chipClusterPtr, callback); } + public void subscribeThreadMetricsAttribute( + ThreadMetricsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeThreadMetricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readCurrentHeapFreeAttribute(LongAttributeCallback callback) { readCurrentHeapFreeAttribute(chipClusterPtr, callback); } @@ -11439,6 +11646,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -11460,6 +11672,12 @@ public void subscribeClusterRevisionAttribute( private native void readThreadMetricsAttribute( long chipClusterPtr, ThreadMetricsAttributeCallback callback); + private native void subscribeThreadMetricsAttribute( + long chipClusterPtr, + ThreadMetricsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readCurrentHeapFreeAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -11481,6 +11699,12 @@ private native void subscribeCurrentHeapHighWatermarkAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -11505,7 +11729,7 @@ public SwitchCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11543,6 +11767,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -11582,6 +11811,12 @@ private native void subscribeMultiPressMaxAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -11631,32 +11866,8 @@ public interface NavigateTargetResponseCallback { void onError(Exception error); } - public static class TargetNavigatorListAttribute { - public Integer identifier; - public String name; - - public TargetNavigatorListAttribute(Integer identifier, String name) { - this.identifier = identifier; - this.name = name; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int identifier: "); - output.append(this.identifier); - output.append("\n"); - - output.append("String name: "); - output.append(this.name); - output.append("\n"); - - return output.toString(); - } - } - public interface TargetNavigatorListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11664,7 +11875,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11675,6 +11886,11 @@ public void readTargetNavigatorListAttribute(TargetNavigatorListAttributeCallbac readTargetNavigatorListAttribute(chipClusterPtr, callback); } + public void subscribeTargetNavigatorListAttribute( + TargetNavigatorListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeTargetNavigatorListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readCurrentNavigatorTargetAttribute(IntegerAttributeCallback callback) { readCurrentNavigatorTargetAttribute(chipClusterPtr, callback); } @@ -11688,6 +11904,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -11700,6 +11921,12 @@ public void subscribeClusterRevisionAttribute( private native void readTargetNavigatorListAttribute( long chipClusterPtr, TargetNavigatorListAttributeCallback callback); + private native void subscribeTargetNavigatorListAttribute( + long chipClusterPtr, + TargetNavigatorListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readCurrentNavigatorTargetAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -11709,6 +11936,12 @@ private native void subscribeCurrentNavigatorTargetAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -11727,7 +11960,7 @@ public TemperatureMeasurementCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -11774,6 +12007,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -11810,6 +12048,12 @@ private native void subscribeToleranceAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -11828,31 +12072,15 @@ public TestClusterCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public void simpleStructEchoRequest( - SimpleStructResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h) { - simpleStructEchoRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + SimpleStructResponseCallback callback, ChipStructs.TestClusterClusterSimpleStruct arg1) { + simpleStructEchoRequest(chipClusterPtr, callback, arg1, null); } public void simpleStructEchoRequest( SimpleStructResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ChipStructs.TestClusterClusterSimpleStruct arg1, int timedInvokeTimeoutMs) { - simpleStructEchoRequest( - chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); + simpleStructEchoRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void test(DefaultClusterCallback callback) { @@ -11860,6 +12088,7 @@ public void test(DefaultClusterCallback callback) { } public void test(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + test(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -11899,95 +12128,76 @@ public void testEnumsRequest( testEnumsRequest(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); } - public void testListInt8UArgumentRequest(BooleanResponseCallback callback, Integer arg1) { + public void testListInt8UArgumentRequest( + BooleanResponseCallback callback, ArrayList arg1) { testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testListInt8UArgumentRequest( - BooleanResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + BooleanResponseCallback callback, ArrayList arg1, int timedInvokeTimeoutMs) { testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListInt8UReverseRequest( - TestListInt8UReverseResponseCallback callback, Integer arg1) { + TestListInt8UReverseResponseCallback callback, ArrayList arg1) { testListInt8UReverseRequest(chipClusterPtr, callback, arg1, null); } public void testListInt8UReverseRequest( - TestListInt8UReverseResponseCallback callback, Integer arg1, int timedInvokeTimeoutMs) { + TestListInt8UReverseResponseCallback callback, + ArrayList arg1, + int timedInvokeTimeoutMs) { testListInt8UReverseRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListNestedStructListArgumentRequest( - BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + BooleanResponseCallback callback, + ArrayList arg1) { + testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testListNestedStructListArgumentRequest( BooleanResponseCallback callback, - Integer a, - Boolean b, - Long e, - byte[] f, - Integer g, + ArrayList arg1, int timedInvokeTimeoutMs) { - testListNestedStructListArgumentRequest( - chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); + testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testListStructArgumentRequest( BooleanResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h) { - testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + ArrayList arg1) { + testListStructArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testListStructArgumentRequest( BooleanResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ArrayList arg1, int timedInvokeTimeoutMs) { - testListStructArgumentRequest( - chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); + testListStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testNestedStructArgumentRequest( - BooleanResponseCallback callback, Integer a, Boolean b) { - testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, null); + BooleanResponseCallback callback, ChipStructs.TestClusterClusterNestedStruct arg1) { + testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testNestedStructArgumentRequest( - BooleanResponseCallback callback, Integer a, Boolean b, int timedInvokeTimeoutMs) { - testNestedStructArgumentRequest(chipClusterPtr, callback, a, b, timedInvokeTimeoutMs); + BooleanResponseCallback callback, + ChipStructs.TestClusterClusterNestedStruct arg1, + int timedInvokeTimeoutMs) { + testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testNestedStructListArgumentRequest( - BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { - testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g, null); + BooleanResponseCallback callback, ChipStructs.TestClusterClusterNestedStructList arg1) { + testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testNestedStructListArgumentRequest( BooleanResponseCallback callback, - Integer a, - Boolean b, - Long e, - byte[] f, - Integer g, + ChipStructs.TestClusterClusterNestedStructList arg1, int timedInvokeTimeoutMs) { - testNestedStructListArgumentRequest( - chipClusterPtr, callback, a, b, e, f, g, timedInvokeTimeoutMs); + testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testNotHandled(DefaultClusterCallback callback) { @@ -11995,17 +12205,18 @@ public void testNotHandled(DefaultClusterCallback callback) { } public void testNotHandled(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testNotHandled(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testNullableOptionalRequest( - TestNullableOptionalResponseCallback callback, Optional arg1) { + TestNullableOptionalResponseCallback callback, @Nullable Optional arg1) { testNullableOptionalRequest(chipClusterPtr, callback, arg1, null); } public void testNullableOptionalRequest( TestNullableOptionalResponseCallback callback, - Optional arg1, + @Nullable Optional arg1, int timedInvokeTimeoutMs) { testNullableOptionalRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } @@ -12025,35 +12236,20 @@ public void testSpecific(TestSpecificResponseCallback callback) { } public void testSpecific(TestSpecificResponseCallback callback, int timedInvokeTimeoutMs) { + testSpecific(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void testStructArgumentRequest( - BooleanResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h) { - testStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h, null); + BooleanResponseCallback callback, ChipStructs.TestClusterClusterSimpleStruct arg1) { + testStructArgumentRequest(chipClusterPtr, callback, arg1, null); } public void testStructArgumentRequest( BooleanResponseCallback callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ChipStructs.TestClusterClusterSimpleStruct arg1, int timedInvokeTimeoutMs) { - testStructArgumentRequest( - chipClusterPtr, callback, a, b, c, d, e, f, g, h, timedInvokeTimeoutMs); + testStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); } public void testUnknownCommand(DefaultClusterCallback callback) { @@ -12061,24 +12257,19 @@ public void testUnknownCommand(DefaultClusterCallback callback) { } public void testUnknownCommand(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + testUnknownCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); } public void timedInvokeRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + timedInvokeRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); } private native void simpleStructEchoRequest( long chipClusterPtr, SimpleStructResponseCallback Callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ChipStructs.TestClusterClusterSimpleStruct arg1, @Nullable Integer timedInvokeTimeoutMs); private native void test( @@ -12111,53 +12302,37 @@ private native void testEnumsRequest( private native void testListInt8UArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer arg1, + ArrayList arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testListInt8UReverseRequest( long chipClusterPtr, TestListInt8UReverseResponseCallback Callback, - Integer arg1, + ArrayList arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testListNestedStructListArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer a, - Boolean b, - Long e, - byte[] f, - Integer g, + ArrayList arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testListStructArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ArrayList arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer a, - Boolean b, + ChipStructs.TestClusterClusterNestedStruct arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testNestedStructListArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer a, - Boolean b, - Long e, - byte[] f, - Integer g, + ChipStructs.TestClusterClusterNestedStructList arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testNotHandled( @@ -12168,7 +12343,7 @@ private native void testNotHandled( private native void testNullableOptionalRequest( long chipClusterPtr, TestNullableOptionalResponseCallback Callback, - Optional arg1, + @Nullable Optional arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testSimpleOptionalArgumentRequest( @@ -12185,14 +12360,7 @@ private native void testSpecific( private native void testStructArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, - Integer a, - Boolean b, - Integer c, - byte[] d, - String e, - Integer f, - Float g, - Double h, + ChipStructs.TestClusterClusterSimpleStruct arg1, @Nullable Integer timedInvokeTimeoutMs); private native void testUnknownCommand( @@ -12212,9 +12380,7 @@ public interface BooleanResponseCallback { } public interface SimpleStructResponseCallback { - void onSuccess( // arg1: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess(ChipStructs.TestClusterClusterSimpleStruct arg1); void onError(Exception error); } @@ -12238,9 +12404,7 @@ public interface TestEnumsResponseCallback { } public interface TestListInt8UReverseResponseCallback { - void onSuccess( // arg1: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + void onSuccess(ArrayList arg1); void onError(Exception error); } @@ -12250,7 +12414,7 @@ void onSuccess( Boolean wasPresent, Optional wasNull, Optional value, - Optional originalValue); + @Nullable Optional originalValue); void onError(Exception error); } @@ -12262,7 +12426,7 @@ public interface TestSpecificResponseCallback { } public interface ListInt8uAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -12270,39 +12434,15 @@ default void onSubscriptionEstablished() {} } public interface ListOctetStringAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class ListStructOctetStringAttribute { - public Long fabricIndex; - public byte[] operationalCert; - - public ListStructOctetStringAttribute(Long fabricIndex, byte[] operationalCert) { - this.fabricIndex = fabricIndex; - this.operationalCert = operationalCert; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long fabricIndex: "); - output.append(this.fabricIndex); - output.append("\n"); - - output.append("byte[] "); - output.append(Arrays.toString(operationalCert)); - output.append("\n"); - - return output.toString(); - } - } - public interface ListStructOctetStringAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -12317,39 +12457,8 @@ public interface VendorIdAttributeCallback { default void onSubscriptionEstablished() {} } - public static class ListNullablesAndOptionalsStructAttribute { - @Nullable public Integer nullableInt; - public Optional optionalInt; - @Nullable public Optional nullableOptionalInt; - @Nullable public String nullableString; - public Optional optionalString; - @Nullable public Optional nullableOptionalString; - - public ListNullablesAndOptionalsStructAttribute( - @Nullable Integer nullableInt, - Optional optionalInt, - @Nullable Optional nullableOptionalInt, - @Nullable String nullableString, - Optional optionalString, - @Nullable Optional nullableOptionalString) { - this.nullableInt = nullableInt; - this.optionalInt = optionalInt; - this.nullableOptionalInt = nullableOptionalInt; - this.nullableString = nullableString; - this.optionalString = optionalString; - this.nullableOptionalString = nullableOptionalString; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - - return output.toString(); - } - } - public interface ListNullablesAndOptionalsStructAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -12357,7 +12466,7 @@ default void onSubscriptionEstablished() {} } public interface ListLongOctetStringAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -12621,7 +12730,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -13100,15 +13209,62 @@ public void readListInt8uAttribute(ListInt8uAttributeCallback callback) { readListInt8uAttribute(chipClusterPtr, callback); } + public void writeListInt8uAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListInt8uAttribute( + DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeListInt8uAttribute( + ListInt8uAttributeCallback callback, int minInterval, int maxInterval) { + subscribeListInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readListOctetStringAttribute(ListOctetStringAttributeCallback callback) { readListOctetStringAttribute(chipClusterPtr, callback); } + public void writeListOctetStringAttribute( + DefaultClusterCallback callback, ArrayList value) { + writeListOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListOctetStringAttribute( + DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeListOctetStringAttribute( + ListOctetStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeListOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readListStructOctetStringAttribute( ListStructOctetStringAttributeCallback callback) { readListStructOctetStringAttribute(chipClusterPtr, callback); } + public void writeListStructOctetStringAttribute( + DefaultClusterCallback callback, + ArrayList value) { + writeListStructOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListStructOctetStringAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeListStructOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeListStructOctetStringAttribute( + ListStructOctetStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeListStructOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLongOctetStringAttribute(OctetStringAttributeCallback callback) { readLongOctetStringAttribute(chipClusterPtr, callback); } @@ -13222,6 +13378,28 @@ public void readListNullablesAndOptionalsStructAttribute( readListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback); } + public void writeListNullablesAndOptionalsStructAttribute( + DefaultClusterCallback callback, + ArrayList value) { + writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListNullablesAndOptionalsStructAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeListNullablesAndOptionalsStructAttribute( + chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeListNullablesAndOptionalsStructAttribute( + ListNullablesAndOptionalsStructAttributeCallback callback, + int minInterval, + int maxInterval) { + subscribeListNullablesAndOptionalsStructAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readEnumAttrAttribute(IntegerAttributeCallback callback) { readEnumAttrAttribute(chipClusterPtr, callback); } @@ -13318,6 +13496,11 @@ public void readListLongOctetStringAttribute(ListLongOctetStringAttributeCallbac readListLongOctetStringAttribute(chipClusterPtr, callback); } + public void subscribeListLongOctetStringAttribute( + ListLongOctetStringAttributeCallback callback, int minInterval, int maxInterval) { + subscribeListLongOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readTimedWriteBooleanAttribute(BooleanAttributeCallback callback) { readTimedWriteBooleanAttribute(chipClusterPtr, callback); } @@ -13354,13 +13537,12 @@ public void readNullableBooleanAttribute(NullableBooleanAttributeCallback callba readNullableBooleanAttribute(chipClusterPtr, callback); } - public void writeNullableBooleanAttribute( - DefaultClusterCallback callback, @Nullable Boolean value) { + public void writeNullableBooleanAttribute(DefaultClusterCallback callback, Boolean value) { writeNullableBooleanAttribute(chipClusterPtr, callback, value, null); } public void writeNullableBooleanAttribute( - DefaultClusterCallback callback, @Nullable Boolean value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { writeNullableBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13373,13 +13555,12 @@ public void readNullableBitmap8Attribute(NullableBitmap8AttributeCallback callba readNullableBitmap8Attribute(chipClusterPtr, callback); } - public void writeNullableBitmap8Attribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, Integer value) { writeNullableBitmap8Attribute(chipClusterPtr, callback, value, null); } public void writeNullableBitmap8Attribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13392,13 +13573,12 @@ public void readNullableBitmap16Attribute(NullableBitmap16AttributeCallback call readNullableBitmap16Attribute(chipClusterPtr, callback); } - public void writeNullableBitmap16Attribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, Integer value) { writeNullableBitmap16Attribute(chipClusterPtr, callback, value, null); } public void writeNullableBitmap16Attribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13411,13 +13591,12 @@ public void readNullableBitmap32Attribute(NullableBitmap32AttributeCallback call readNullableBitmap32Attribute(chipClusterPtr, callback); } - public void writeNullableBitmap32Attribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, Long value) { writeNullableBitmap32Attribute(chipClusterPtr, callback, value, null); } public void writeNullableBitmap32Attribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13430,13 +13609,12 @@ public void readNullableBitmap64Attribute(NullableBitmap64AttributeCallback call readNullableBitmap64Attribute(chipClusterPtr, callback); } - public void writeNullableBitmap64Attribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, Long value) { writeNullableBitmap64Attribute(chipClusterPtr, callback, value, null); } public void writeNullableBitmap64Attribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13449,13 +13627,12 @@ public void readNullableInt8uAttribute(NullableInt8uAttributeCallback callback) readNullableInt8uAttribute(chipClusterPtr, callback); } - public void writeNullableInt8uAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableInt8uAttribute(DefaultClusterCallback callback, Integer value) { writeNullableInt8uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt8uAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13468,13 +13645,12 @@ public void readNullableInt16uAttribute(NullableInt16uAttributeCallback callback readNullableInt16uAttribute(chipClusterPtr, callback); } - public void writeNullableInt16uAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableInt16uAttribute(DefaultClusterCallback callback, Integer value) { writeNullableInt16uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt16uAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13487,13 +13663,12 @@ public void readNullableInt24uAttribute(NullableInt24uAttributeCallback callback readNullableInt24uAttribute(chipClusterPtr, callback); } - public void writeNullableInt24uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt24uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt24uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt24uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13506,13 +13681,12 @@ public void readNullableInt32uAttribute(NullableInt32uAttributeCallback callback readNullableInt32uAttribute(chipClusterPtr, callback); } - public void writeNullableInt32uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt32uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt32uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt32uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13525,13 +13699,12 @@ public void readNullableInt40uAttribute(NullableInt40uAttributeCallback callback readNullableInt40uAttribute(chipClusterPtr, callback); } - public void writeNullableInt40uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt40uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt40uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt40uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13544,13 +13717,12 @@ public void readNullableInt48uAttribute(NullableInt48uAttributeCallback callback readNullableInt48uAttribute(chipClusterPtr, callback); } - public void writeNullableInt48uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt48uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt48uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt48uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13563,13 +13735,12 @@ public void readNullableInt56uAttribute(NullableInt56uAttributeCallback callback readNullableInt56uAttribute(chipClusterPtr, callback); } - public void writeNullableInt56uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt56uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt56uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt56uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13582,13 +13753,12 @@ public void readNullableInt64uAttribute(NullableInt64uAttributeCallback callback readNullableInt64uAttribute(chipClusterPtr, callback); } - public void writeNullableInt64uAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt64uAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt64uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt64uAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13601,13 +13771,12 @@ public void readNullableInt8sAttribute(NullableInt8sAttributeCallback callback) readNullableInt8sAttribute(chipClusterPtr, callback); } - public void writeNullableInt8sAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableInt8sAttribute(DefaultClusterCallback callback, Integer value) { writeNullableInt8sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt8sAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13620,13 +13789,12 @@ public void readNullableInt16sAttribute(NullableInt16sAttributeCallback callback readNullableInt16sAttribute(chipClusterPtr, callback); } - public void writeNullableInt16sAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableInt16sAttribute(DefaultClusterCallback callback, Integer value) { writeNullableInt16sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt16sAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13639,13 +13807,12 @@ public void readNullableInt24sAttribute(NullableInt24sAttributeCallback callback readNullableInt24sAttribute(chipClusterPtr, callback); } - public void writeNullableInt24sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt24sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt24sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt24sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13658,13 +13825,12 @@ public void readNullableInt32sAttribute(NullableInt32sAttributeCallback callback readNullableInt32sAttribute(chipClusterPtr, callback); } - public void writeNullableInt32sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt32sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt32sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt32sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13677,13 +13843,12 @@ public void readNullableInt40sAttribute(NullableInt40sAttributeCallback callback readNullableInt40sAttribute(chipClusterPtr, callback); } - public void writeNullableInt40sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt40sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt40sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt40sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13696,13 +13861,12 @@ public void readNullableInt48sAttribute(NullableInt48sAttributeCallback callback readNullableInt48sAttribute(chipClusterPtr, callback); } - public void writeNullableInt48sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt48sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt48sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt48sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13715,13 +13879,12 @@ public void readNullableInt56sAttribute(NullableInt56sAttributeCallback callback readNullableInt56sAttribute(chipClusterPtr, callback); } - public void writeNullableInt56sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt56sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt56sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt56sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13734,13 +13897,12 @@ public void readNullableInt64sAttribute(NullableInt64sAttributeCallback callback readNullableInt64sAttribute(chipClusterPtr, callback); } - public void writeNullableInt64sAttribute( - DefaultClusterCallback callback, @Nullable Long value) { + public void writeNullableInt64sAttribute(DefaultClusterCallback callback, Long value) { writeNullableInt64sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableInt64sAttribute( - DefaultClusterCallback callback, @Nullable Long value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { writeNullableInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13753,13 +13915,12 @@ public void readNullableEnum8Attribute(NullableEnum8AttributeCallback callback) readNullableEnum8Attribute(chipClusterPtr, callback); } - public void writeNullableEnum8Attribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableEnum8Attribute(DefaultClusterCallback callback, Integer value) { writeNullableEnum8Attribute(chipClusterPtr, callback, value, null); } public void writeNullableEnum8Attribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13772,13 +13933,12 @@ public void readNullableEnum16Attribute(NullableEnum16AttributeCallback callback readNullableEnum16Attribute(chipClusterPtr, callback); } - public void writeNullableEnum16Attribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableEnum16Attribute(DefaultClusterCallback callback, Integer value) { writeNullableEnum16Attribute(chipClusterPtr, callback, value, null); } public void writeNullableEnum16Attribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13791,13 +13951,12 @@ public void readNullableFloatSingleAttribute(NullableFloatSingleAttributeCallbac readNullableFloatSingleAttribute(chipClusterPtr, callback); } - public void writeNullableFloatSingleAttribute( - DefaultClusterCallback callback, @Nullable Float value) { + public void writeNullableFloatSingleAttribute(DefaultClusterCallback callback, Float value) { writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, null); } public void writeNullableFloatSingleAttribute( - DefaultClusterCallback callback, @Nullable Float value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13810,13 +13969,12 @@ public void readNullableFloatDoubleAttribute(NullableFloatDoubleAttributeCallbac readNullableFloatDoubleAttribute(chipClusterPtr, callback); } - public void writeNullableFloatDoubleAttribute( - DefaultClusterCallback callback, @Nullable Double value) { + public void writeNullableFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, null); } public void writeNullableFloatDoubleAttribute( - DefaultClusterCallback callback, @Nullable Double value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13829,13 +13987,12 @@ public void readNullableOctetStringAttribute(NullableOctetStringAttributeCallbac readNullableOctetStringAttribute(chipClusterPtr, callback); } - public void writeNullableOctetStringAttribute( - DefaultClusterCallback callback, @Nullable byte[] value) { + public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { writeNullableOctetStringAttribute(chipClusterPtr, callback, value, null); } public void writeNullableOctetStringAttribute( - DefaultClusterCallback callback, @Nullable byte[] value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { writeNullableOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13848,13 +14005,12 @@ public void readNullableCharStringAttribute(NullableCharStringAttributeCallback readNullableCharStringAttribute(chipClusterPtr, callback); } - public void writeNullableCharStringAttribute( - DefaultClusterCallback callback, @Nullable String value) { + public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value) { writeNullableCharStringAttribute(chipClusterPtr, callback, value, null); } public void writeNullableCharStringAttribute( - DefaultClusterCallback callback, @Nullable String value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { writeNullableCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13867,13 +14023,12 @@ public void readNullableEnumAttrAttribute(NullableEnumAttrAttributeCallback call readNullableEnumAttrAttribute(chipClusterPtr, callback); } - public void writeNullableEnumAttrAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + public void writeNullableEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, null); } public void writeNullableEnumAttrAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13888,12 +14043,12 @@ public void readNullableRangeRestrictedInt8uAttribute( } public void writeNullableRangeRestrictedInt8uAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + DefaultClusterCallback callback, Integer value) { writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableRangeRestrictedInt8uAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableRangeRestrictedInt8uAttribute( chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13910,12 +14065,12 @@ public void readNullableRangeRestrictedInt8sAttribute( } public void writeNullableRangeRestrictedInt8sAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + DefaultClusterCallback callback, Integer value) { writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableRangeRestrictedInt8sAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableRangeRestrictedInt8sAttribute( chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13932,12 +14087,12 @@ public void readNullableRangeRestrictedInt16uAttribute( } public void writeNullableRangeRestrictedInt16uAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + DefaultClusterCallback callback, Integer value) { writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); } public void writeNullableRangeRestrictedInt16uAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableRangeRestrictedInt16uAttribute( chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13954,12 +14109,12 @@ public void readNullableRangeRestrictedInt16sAttribute( } public void writeNullableRangeRestrictedInt16sAttribute( - DefaultClusterCallback callback, @Nullable Integer value) { + DefaultClusterCallback callback, Integer value) { writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); } public void writeNullableRangeRestrictedInt16sAttribute( - DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { writeNullableRangeRestrictedInt16sAttribute( chipClusterPtr, callback, value, timedWriteTimeoutMs); } @@ -13974,6 +14129,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -14281,12 +14441,45 @@ private native void subscribeOctetStringAttribute( private native void readListInt8uAttribute( long chipClusterPtr, ListInt8uAttributeCallback callback); + private native void writeListInt8uAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeListInt8uAttribute( + long chipClusterPtr, ListInt8uAttributeCallback callback, int minInterval, int maxInterval); + private native void readListOctetStringAttribute( long chipClusterPtr, ListOctetStringAttributeCallback callback); + private native void writeListOctetStringAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeListOctetStringAttribute( + long chipClusterPtr, + ListOctetStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readListStructOctetStringAttribute( long chipClusterPtr, ListStructOctetStringAttributeCallback callback); + private native void writeListStructOctetStringAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeListStructOctetStringAttribute( + long chipClusterPtr, + ListStructOctetStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readLongOctetStringAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); @@ -14369,6 +14562,18 @@ private native void subscribeVendorIdAttribute( private native void readListNullablesAndOptionalsStructAttribute( long chipClusterPtr, ListNullablesAndOptionalsStructAttributeCallback callback); + private native void writeListNullablesAndOptionalsStructAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeListNullablesAndOptionalsStructAttribute( + long chipClusterPtr, + ListNullablesAndOptionalsStructAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readEnumAttrAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14432,6 +14637,12 @@ private native void subscribeRangeRestrictedInt16sAttribute( private native void readListLongOctetStringAttribute( long chipClusterPtr, ListLongOctetStringAttributeCallback callback); + private native void subscribeListLongOctetStringAttribute( + long chipClusterPtr, + ListLongOctetStringAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readTimedWriteBooleanAttribute( long chipClusterPtr, BooleanAttributeCallback callback); @@ -14462,7 +14673,7 @@ private native void readNullableBooleanAttribute( private native void writeNullableBooleanAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Boolean value, + Boolean value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBooleanAttribute( @@ -14477,7 +14688,7 @@ private native void readNullableBitmap8Attribute( private native void writeNullableBitmap8Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap8Attribute( @@ -14492,7 +14703,7 @@ private native void readNullableBitmap16Attribute( private native void writeNullableBitmap16Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap16Attribute( @@ -14507,7 +14718,7 @@ private native void readNullableBitmap32Attribute( private native void writeNullableBitmap32Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap32Attribute( @@ -14522,7 +14733,7 @@ private native void readNullableBitmap64Attribute( private native void writeNullableBitmap64Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableBitmap64Attribute( @@ -14537,7 +14748,7 @@ private native void readNullableInt8uAttribute( private native void writeNullableInt8uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8uAttribute( @@ -14552,7 +14763,7 @@ private native void readNullableInt16uAttribute( private native void writeNullableInt16uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16uAttribute( @@ -14567,7 +14778,7 @@ private native void readNullableInt24uAttribute( private native void writeNullableInt24uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24uAttribute( @@ -14582,7 +14793,7 @@ private native void readNullableInt32uAttribute( private native void writeNullableInt32uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32uAttribute( @@ -14597,7 +14808,7 @@ private native void readNullableInt40uAttribute( private native void writeNullableInt40uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40uAttribute( @@ -14612,7 +14823,7 @@ private native void readNullableInt48uAttribute( private native void writeNullableInt48uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48uAttribute( @@ -14627,7 +14838,7 @@ private native void readNullableInt56uAttribute( private native void writeNullableInt56uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56uAttribute( @@ -14642,7 +14853,7 @@ private native void readNullableInt64uAttribute( private native void writeNullableInt64uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64uAttribute( @@ -14657,7 +14868,7 @@ private native void readNullableInt8sAttribute( private native void writeNullableInt8sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt8sAttribute( @@ -14672,7 +14883,7 @@ private native void readNullableInt16sAttribute( private native void writeNullableInt16sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt16sAttribute( @@ -14687,7 +14898,7 @@ private native void readNullableInt24sAttribute( private native void writeNullableInt24sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt24sAttribute( @@ -14702,7 +14913,7 @@ private native void readNullableInt32sAttribute( private native void writeNullableInt32sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt32sAttribute( @@ -14717,7 +14928,7 @@ private native void readNullableInt40sAttribute( private native void writeNullableInt40sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt40sAttribute( @@ -14732,7 +14943,7 @@ private native void readNullableInt48sAttribute( private native void writeNullableInt48sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt48sAttribute( @@ -14747,7 +14958,7 @@ private native void readNullableInt56sAttribute( private native void writeNullableInt56sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt56sAttribute( @@ -14762,7 +14973,7 @@ private native void readNullableInt64sAttribute( private native void writeNullableInt64sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Long value, + Long value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableInt64sAttribute( @@ -14777,7 +14988,7 @@ private native void readNullableEnum8Attribute( private native void writeNullableEnum8Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum8Attribute( @@ -14792,7 +15003,7 @@ private native void readNullableEnum16Attribute( private native void writeNullableEnum16Attribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnum16Attribute( @@ -14807,7 +15018,7 @@ private native void readNullableFloatSingleAttribute( private native void writeNullableFloatSingleAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Float value, + Float value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatSingleAttribute( @@ -14822,7 +15033,7 @@ private native void readNullableFloatDoubleAttribute( private native void writeNullableFloatDoubleAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Double value, + Double value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableFloatDoubleAttribute( @@ -14837,7 +15048,7 @@ private native void readNullableOctetStringAttribute( private native void writeNullableOctetStringAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable byte[] value, + byte[] value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableOctetStringAttribute( @@ -14852,7 +15063,7 @@ private native void readNullableCharStringAttribute( private native void writeNullableCharStringAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable String value, + String value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableCharStringAttribute( @@ -14867,7 +15078,7 @@ private native void readNullableEnumAttrAttribute( private native void writeNullableEnumAttrAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableEnumAttrAttribute( @@ -14882,7 +15093,7 @@ private native void readNullableRangeRestrictedInt8uAttribute( private native void writeNullableRangeRestrictedInt8uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8uAttribute( @@ -14897,7 +15108,7 @@ private native void readNullableRangeRestrictedInt8sAttribute( private native void writeNullableRangeRestrictedInt8sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt8sAttribute( @@ -14912,7 +15123,7 @@ private native void readNullableRangeRestrictedInt16uAttribute( private native void writeNullableRangeRestrictedInt16uAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16uAttribute( @@ -14927,7 +15138,7 @@ private native void readNullableRangeRestrictedInt16sAttribute( private native void writeNullableRangeRestrictedInt16sAttribute( long chipClusterPtr, DefaultClusterCallback callback, - @Nullable Integer value, + Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNullableRangeRestrictedInt16sAttribute( @@ -14939,6 +15150,12 @@ private native void subscribeNullableRangeRestrictedInt16sAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -14961,6 +15178,7 @@ public void clearWeeklySchedule(DefaultClusterCallback callback) { } public void clearWeeklySchedule(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + clearWeeklySchedule(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -14970,6 +15188,7 @@ public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback) { public void getRelayStatusLog( GetRelayStatusLogResponseCallback callback, int timedInvokeTimeoutMs) { + getRelayStatusLog(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -14991,7 +15210,7 @@ public void setWeeklySchedule( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, - Integer payload) { + ArrayList payload) { setWeeklySchedule( chipClusterPtr, callback, @@ -15007,7 +15226,7 @@ public void setWeeklySchedule( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, - Integer payload, + ArrayList payload, int timedInvokeTimeoutMs) { setWeeklySchedule( chipClusterPtr, @@ -15051,7 +15270,7 @@ private native void setWeeklySchedule( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, - Integer payload, + ArrayList payload, @Nullable Integer timedInvokeTimeoutMs); private native void setpointRaiseLower( @@ -15077,16 +15296,14 @@ public interface GetWeeklyScheduleResponseCallback { void onSuccess( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, - Integer modeForSequence - // payload: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ); + Integer modeForSequence, + ArrayList payload); void onError(Exception error); } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -15338,6 +15555,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -15515,6 +15737,12 @@ private native void subscribeNumberOfDailyTransitionsAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -15539,7 +15767,7 @@ public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointI public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -15608,6 +15836,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -15656,6 +15889,12 @@ private native void subscribeScheduleProgrammingVisibilityAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -15678,6 +15917,7 @@ public void resetCounts(DefaultClusterCallback callback) { } public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -15686,344 +15926,33 @@ private native void resetCounts( DefaultClusterCallback Callback, @Nullable Integer timedInvokeTimeoutMs); - public static class NeighborTableListAttribute { - public Long extAddress; - public Long age; - public Integer rloc16; - public Long linkFrameCounter; - public Long mleFrameCounter; - public Integer lqi; - public Integer averageRssi; - public Integer lastRssi; - public Integer frameErrorRate; - public Integer messageErrorRate; - public Boolean rxOnWhenIdle; - public Boolean fullThreadDevice; - public Boolean fullNetworkData; - public Boolean isChild; - - public NeighborTableListAttribute( - Long extAddress, - Long age, - Integer rloc16, - Long linkFrameCounter, - Long mleFrameCounter, - Integer lqi, - Integer averageRssi, - Integer lastRssi, - Integer frameErrorRate, - Integer messageErrorRate, - Boolean rxOnWhenIdle, - Boolean fullThreadDevice, - Boolean fullNetworkData, - Boolean isChild) { - this.extAddress = extAddress; - this.age = age; - this.rloc16 = rloc16; - this.linkFrameCounter = linkFrameCounter; - this.mleFrameCounter = mleFrameCounter; - this.lqi = lqi; - this.averageRssi = averageRssi; - this.lastRssi = lastRssi; - this.frameErrorRate = frameErrorRate; - this.messageErrorRate = messageErrorRate; - this.rxOnWhenIdle = rxOnWhenIdle; - this.fullThreadDevice = fullThreadDevice; - this.fullNetworkData = fullNetworkData; - this.isChild = isChild; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long extAddress: "); - output.append(this.extAddress); - output.append("\n"); - - output.append("long age: "); - output.append(this.age); - output.append("\n"); - - output.append("int rloc16: "); - output.append(this.rloc16); - output.append("\n"); - - output.append("long linkFrameCounter: "); - output.append(this.linkFrameCounter); - output.append("\n"); - - output.append("long mleFrameCounter: "); - output.append(this.mleFrameCounter); - output.append("\n"); - - output.append("int lqi: "); - output.append(this.lqi); - output.append("\n"); - - output.append("int averageRssi: "); - output.append(this.averageRssi); - output.append("\n"); - - output.append("int lastRssi: "); - output.append(this.lastRssi); - output.append("\n"); - - output.append("int frameErrorRate: "); - output.append(this.frameErrorRate); - output.append("\n"); - - output.append("int messageErrorRate: "); - output.append(this.messageErrorRate); - output.append("\n"); - - output.append("boolean rxOnWhenIdle: "); - output.append(this.rxOnWhenIdle); - output.append("\n"); - - output.append("boolean fullThreadDevice: "); - output.append(this.fullThreadDevice); - output.append("\n"); - - output.append("boolean fullNetworkData: "); - output.append(this.fullNetworkData); - output.append("\n"); - - output.append("boolean isChild: "); - output.append(this.isChild); - output.append("\n"); - - return output.toString(); - } - } - public interface NeighborTableListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class RouteTableListAttribute { - public Long extAddress; - public Integer rloc16; - public Integer routerId; - public Integer nextHop; - public Integer pathCost; - public Integer LQIIn; - public Integer LQIOut; - public Integer age; - public Boolean allocated; - public Boolean linkEstablished; - - public RouteTableListAttribute( - Long extAddress, - Integer rloc16, - Integer routerId, - Integer nextHop, - Integer pathCost, - Integer LQIIn, - Integer LQIOut, - Integer age, - Boolean allocated, - Boolean linkEstablished) { - this.extAddress = extAddress; - this.rloc16 = rloc16; - this.routerId = routerId; - this.nextHop = nextHop; - this.pathCost = pathCost; - this.LQIIn = LQIIn; - this.LQIOut = LQIOut; - this.age = age; - this.allocated = allocated; - this.linkEstablished = linkEstablished; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("long extAddress: "); - output.append(this.extAddress); - output.append("\n"); - - output.append("int rloc16: "); - output.append(this.rloc16); - output.append("\n"); - - output.append("int routerId: "); - output.append(this.routerId); - output.append("\n"); - - output.append("int nextHop: "); - output.append(this.nextHop); - output.append("\n"); - - output.append("int pathCost: "); - output.append(this.pathCost); - output.append("\n"); - - output.append("int LQIIn: "); - output.append(this.LQIIn); - output.append("\n"); - - output.append("int LQIOut: "); - output.append(this.LQIOut); - output.append("\n"); - - output.append("int age: "); - output.append(this.age); - output.append("\n"); - - output.append("boolean allocated: "); - output.append(this.allocated); - output.append("\n"); - - output.append("boolean linkEstablished: "); - output.append(this.linkEstablished); - output.append("\n"); - - return output.toString(); - } - } - public interface RouteTableListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class SecurityPolicyAttribute { - public Integer rotationTime; - public Integer flags; - - public SecurityPolicyAttribute(Integer rotationTime, Integer flags) { - this.rotationTime = rotationTime; - this.flags = flags; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("int rotationTime: "); - output.append(this.rotationTime); - output.append("\n"); - - output.append("int flags: "); - output.append(this.flags); - output.append("\n"); - - return output.toString(); - } - } - public interface SecurityPolicyAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); default void onSubscriptionEstablished() {} } - public static class OperationalDatasetComponentsAttribute { - public Boolean activeTimestampPresent; - public Boolean pendingTimestampPresent; - public Boolean masterKeyPresent; - public Boolean networkNamePresent; - public Boolean extendedPanIdPresent; - public Boolean meshLocalPrefixPresent; - public Boolean delayPresent; - public Boolean panIdPresent; - public Boolean channelPresent; - public Boolean pskcPresent; - public Boolean securityPolicyPresent; - public Boolean channelMaskPresent; - - public OperationalDatasetComponentsAttribute( - Boolean activeTimestampPresent, - Boolean pendingTimestampPresent, - Boolean masterKeyPresent, - Boolean networkNamePresent, - Boolean extendedPanIdPresent, - Boolean meshLocalPrefixPresent, - Boolean delayPresent, - Boolean panIdPresent, - Boolean channelPresent, - Boolean pskcPresent, - Boolean securityPolicyPresent, - Boolean channelMaskPresent) { - this.activeTimestampPresent = activeTimestampPresent; - this.pendingTimestampPresent = pendingTimestampPresent; - this.masterKeyPresent = masterKeyPresent; - this.networkNamePresent = networkNamePresent; - this.extendedPanIdPresent = extendedPanIdPresent; - this.meshLocalPrefixPresent = meshLocalPrefixPresent; - this.delayPresent = delayPresent; - this.panIdPresent = panIdPresent; - this.channelPresent = channelPresent; - this.pskcPresent = pskcPresent; - this.securityPolicyPresent = securityPolicyPresent; - this.channelMaskPresent = channelMaskPresent; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("boolean activeTimestampPresent: "); - output.append(this.activeTimestampPresent); - output.append("\n"); - - output.append("boolean pendingTimestampPresent: "); - output.append(this.pendingTimestampPresent); - output.append("\n"); - - output.append("boolean masterKeyPresent: "); - output.append(this.masterKeyPresent); - output.append("\n"); - - output.append("boolean networkNamePresent: "); - output.append(this.networkNamePresent); - output.append("\n"); - - output.append("boolean extendedPanIdPresent: "); - output.append(this.extendedPanIdPresent); - output.append("\n"); - - output.append("boolean meshLocalPrefixPresent: "); - output.append(this.meshLocalPrefixPresent); - output.append("\n"); - - output.append("boolean delayPresent: "); - output.append(this.delayPresent); - output.append("\n"); - - output.append("boolean panIdPresent: "); - output.append(this.panIdPresent); - output.append("\n"); - - output.append("boolean channelPresent: "); - output.append(this.channelPresent); - output.append("\n"); - - output.append("boolean pskcPresent: "); - output.append(this.pskcPresent); - output.append("\n"); - - output.append("boolean securityPolicyPresent: "); - output.append(this.securityPolicyPresent); - output.append("\n"); - - output.append("boolean channelMaskPresent: "); - output.append(this.channelMaskPresent); - output.append("\n"); - - return output.toString(); - } - } - public interface OperationalDatasetComponentsAttributeCallback { - void onSuccess(List valueList); + void onSuccess( + List valueList); void onError(Exception ex); @@ -16031,7 +15960,7 @@ default void onSubscriptionEstablished() {} } public interface ActiveNetworkFaultsListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -16039,7 +15968,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -16113,10 +16042,20 @@ public void readNeighborTableListAttribute(NeighborTableListAttributeCallback ca readNeighborTableListAttribute(chipClusterPtr, callback); } + public void subscribeNeighborTableListAttribute( + NeighborTableListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNeighborTableListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readRouteTableListAttribute(RouteTableListAttributeCallback callback) { readRouteTableListAttribute(chipClusterPtr, callback); } + public void subscribeRouteTableListAttribute( + RouteTableListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeRouteTableListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readPartitionIdAttribute(LongAttributeCallback callback) { readPartitionIdAttribute(chipClusterPtr, callback); } @@ -16576,6 +16515,11 @@ public void readSecurityPolicyAttribute(SecurityPolicyAttributeCallback callback readSecurityPolicyAttribute(chipClusterPtr, callback); } + public void subscribeSecurityPolicyAttribute( + SecurityPolicyAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSecurityPolicyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readChannelMaskAttribute(OctetStringAttributeCallback callback) { readChannelMaskAttribute(chipClusterPtr, callback); } @@ -16590,15 +16534,31 @@ public void readOperationalDatasetComponentsAttribute( readOperationalDatasetComponentsAttribute(chipClusterPtr, callback); } + public void subscribeOperationalDatasetComponentsAttribute( + OperationalDatasetComponentsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeOperationalDatasetComponentsAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readActiveNetworkFaultsListAttribute( ActiveNetworkFaultsListAttributeCallback callback) { readActiveNetworkFaultsListAttribute(chipClusterPtr, callback); } + public void subscribeActiveNetworkFaultsListAttribute( + ActiveNetworkFaultsListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveNetworkFaultsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -16667,9 +16627,21 @@ private native void subscribeOverrunCountAttribute( private native void readNeighborTableListAttribute( long chipClusterPtr, NeighborTableListAttributeCallback callback); + private native void subscribeNeighborTableListAttribute( + long chipClusterPtr, + NeighborTableListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readRouteTableListAttribute( long chipClusterPtr, RouteTableListAttributeCallback callback); + private native void subscribeRouteTableListAttribute( + long chipClusterPtr, + RouteTableListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readPartitionIdAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -16972,6 +16944,12 @@ private native void subscribeDelayAttribute( private native void readSecurityPolicyAttribute( long chipClusterPtr, SecurityPolicyAttributeCallback callback); + private native void subscribeSecurityPolicyAttribute( + long chipClusterPtr, + SecurityPolicyAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readChannelMaskAttribute( long chipClusterPtr, OctetStringAttributeCallback callback); @@ -16984,12 +16962,30 @@ private native void subscribeChannelMaskAttribute( private native void readOperationalDatasetComponentsAttribute( long chipClusterPtr, OperationalDatasetComponentsAttributeCallback callback); + private native void subscribeOperationalDatasetComponentsAttribute( + long chipClusterPtr, + OperationalDatasetComponentsAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readActiveNetworkFaultsListAttribute( long chipClusterPtr, ActiveNetworkFaultsListAttributeCallback callback); + private native void subscribeActiveNetworkFaultsListAttribute( + long chipClusterPtr, + ActiveNetworkFaultsListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -17014,7 +17010,7 @@ public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface SupportedCalendarTypesAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -17091,32 +17087,8 @@ public UserLabelCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); - public static class LabelListAttribute { - public String label; - public String value; - - public LabelListAttribute(String label, String value) { - this.label = label; - this.value = value; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(""); - output.append("String label: "); - output.append(this.label); - output.append("\n"); - - output.append("String value: "); - output.append(this.value); - output.append("\n"); - - return output.toString(); - } - } - public interface LabelListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -17127,6 +17099,23 @@ public void readLabelListAttribute(LabelListAttributeCallback callback) { readLabelListAttribute(chipClusterPtr, callback); } + public void writeLabelListAttribute( + DefaultClusterCallback callback, ArrayList value) { + writeLabelListAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLabelListAttribute( + DefaultClusterCallback callback, + ArrayList value, + int timedWriteTimeoutMs) { + writeLabelListAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + + public void subscribeLabelListAttribute( + LabelListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -17139,6 +17128,15 @@ public void subscribeClusterRevisionAttribute( private native void readLabelListAttribute( long chipClusterPtr, LabelListAttributeCallback callback); + private native void writeLabelListAttribute( + long chipClusterPtr, + DefaultClusterCallback callback, + ArrayList value, + @Nullable Integer timedWriteTimeoutMs); + + private native void subscribeLabelListAttribute( + long chipClusterPtr, LabelListAttributeCallback callback, int minInterval, int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -17157,7 +17155,7 @@ public WakeOnLanCluster(long devicePtr, int endpointId) { public native long initWithDevice(long devicePtr, int endpointId); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -17177,6 +17175,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -17198,6 +17201,12 @@ private native void subscribeWakeOnLanMacAddressAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -17220,6 +17229,7 @@ public void resetCounts(DefaultClusterCallback callback) { } public void resetCounts(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -17229,7 +17239,7 @@ private native void resetCounts( @Nullable Integer timedInvokeTimeoutMs); public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -17357,6 +17367,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -17458,6 +17473,12 @@ private native void subscribeOverrunCountAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); @@ -17486,6 +17507,7 @@ public void downOrClose(DefaultClusterCallback callback) { } public void downOrClose(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + downOrClose(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -17554,6 +17576,7 @@ public void stopMotion(DefaultClusterCallback callback) { } public void stopMotion(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + stopMotion(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -17562,6 +17585,7 @@ public void upOrOpen(DefaultClusterCallback callback) { } public void upOrOpen(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + upOrOpen(chipClusterPtr, callback, timedInvokeTimeoutMs); } @@ -17671,7 +17695,7 @@ default void onSubscriptionEstablished() {} } public interface AttributeListAttributeCallback { - void onSuccess(List valueList); + void onSuccess(List valueList); void onError(Exception ex); @@ -17875,6 +17899,11 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFeatureMapAttribute(LongAttributeCallback callback) { readFeatureMapAttribute(chipClusterPtr, callback); } @@ -18032,6 +18061,12 @@ private native void subscribeSafetyStatusAttribute( private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void subscribeAttributeListAttribute( + long chipClusterPtr, + AttributeListAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readFeatureMapAttribute( long chipClusterPtr, LongAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java new file mode 100644 index 00000000000000..5dea7656e77dbf --- /dev/null +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -0,0 +1,2039 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP +package chip.devicecontroller; + +import androidx.annotation.Nullable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Optional; + +public class ChipStructs { + + public static class ScenesClusterSceneExtensionFieldSet { + public Long clusterId; + public Integer length; + public Integer value; + + public ScenesClusterSceneExtensionFieldSet(Long clusterId, Integer length, Integer value) { + this.clusterId = clusterId; + this.length = length; + this.value = value; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesClusterSceneExtensionFieldSet {\n"); + output.append("\tclusterId: "); + output.append(clusterId); + output.append("\n"); + output.append("\tlength: "); + output.append(length); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class PowerProfileClusterPowerProfileRecord { + public Integer powerProfileId; + public Integer energyPhaseId; + public Boolean powerProfileRemoteControl; + public Integer powerProfileState; + + public PowerProfileClusterPowerProfileRecord( + Integer powerProfileId, + Integer energyPhaseId, + Boolean powerProfileRemoteControl, + Integer powerProfileState) { + this.powerProfileId = powerProfileId; + this.energyPhaseId = energyPhaseId; + this.powerProfileRemoteControl = powerProfileRemoteControl; + this.powerProfileState = powerProfileState; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("PowerProfileClusterPowerProfileRecord {\n"); + output.append("\tpowerProfileId: "); + output.append(powerProfileId); + output.append("\n"); + output.append("\tenergyPhaseId: "); + output.append(energyPhaseId); + output.append("\n"); + output.append("\tpowerProfileRemoteControl: "); + output.append(powerProfileRemoteControl); + output.append("\n"); + output.append("\tpowerProfileState: "); + output.append(powerProfileState); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class PowerProfileClusterScheduledPhase { + public Integer energyPhaseId; + public Integer scheduledTime; + + public PowerProfileClusterScheduledPhase(Integer energyPhaseId, Integer scheduledTime) { + this.energyPhaseId = energyPhaseId; + this.scheduledTime = scheduledTime; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("PowerProfileClusterScheduledPhase {\n"); + output.append("\tenergyPhaseId: "); + output.append(energyPhaseId); + output.append("\n"); + output.append("\tscheduledTime: "); + output.append(scheduledTime); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class PowerProfileClusterTransferredPhase { + public Integer energyPhaseId; + public Integer macroPhaseId; + public Integer expectedDuration; + public Integer peakPower; + public Integer energy; + public Integer maxActivationDelay; + + public PowerProfileClusterTransferredPhase( + Integer energyPhaseId, + Integer macroPhaseId, + Integer expectedDuration, + Integer peakPower, + Integer energy, + Integer maxActivationDelay) { + this.energyPhaseId = energyPhaseId; + this.macroPhaseId = macroPhaseId; + this.expectedDuration = expectedDuration; + this.peakPower = peakPower; + this.energy = energy; + this.maxActivationDelay = maxActivationDelay; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("PowerProfileClusterTransferredPhase {\n"); + output.append("\tenergyPhaseId: "); + output.append(energyPhaseId); + output.append("\n"); + output.append("\tmacroPhaseId: "); + output.append(macroPhaseId); + output.append("\n"); + output.append("\texpectedDuration: "); + output.append(expectedDuration); + output.append("\n"); + output.append("\tpeakPower: "); + output.append(peakPower); + output.append("\n"); + output.append("\tenergy: "); + output.append(energy); + output.append("\n"); + output.append("\tmaxActivationDelay: "); + output.append(maxActivationDelay); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class DescriptorClusterDeviceType { + public Long type; + public Integer revision; + + public DescriptorClusterDeviceType(Long type, Integer revision) { + this.type = type; + this.revision = revision; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DescriptorClusterDeviceType {\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("\trevision: "); + output.append(revision); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class AccessControlClusterTarget { + public @Nullable Long cluster; + public @Nullable Integer endpoint; + public @Nullable Long deviceType; + + public AccessControlClusterTarget( + @Nullable Long cluster, @Nullable Integer endpoint, @Nullable Long deviceType) { + this.cluster = cluster; + this.endpoint = endpoint; + this.deviceType = deviceType; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AccessControlClusterTarget {\n"); + output.append("\tcluster: "); + output.append(cluster); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("\tdeviceType: "); + output.append(deviceType); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class AccessControlClusterAccessControlEntry { + public Integer fabricIndex; + public Integer privilege; + public Integer authMode; + public @Nullable ArrayList subjects; + public @Nullable ArrayList targets; + + public AccessControlClusterAccessControlEntry( + Integer fabricIndex, + Integer privilege, + Integer authMode, + @Nullable ArrayList subjects, + @Nullable ArrayList targets) { + this.fabricIndex = fabricIndex; + this.privilege = privilege; + this.authMode = authMode; + this.subjects = subjects; + this.targets = targets; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AccessControlClusterAccessControlEntry {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tprivilege: "); + output.append(privilege); + output.append("\n"); + output.append("\tauthMode: "); + output.append(authMode); + output.append("\n"); + output.append("\tsubjects: "); + output.append(subjects); + output.append("\n"); + output.append("\ttargets: "); + output.append(targets); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class AccessControlClusterExtensionEntry { + public Integer fabricIndex; + public byte[] data; + + public AccessControlClusterExtensionEntry(Integer fabricIndex, byte[] data) { + this.fabricIndex = fabricIndex; + this.data = data; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AccessControlClusterExtensionEntry {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tdata: "); + output.append(Arrays.toString(data)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class BridgedActionsClusterActionStruct { + public Integer actionID; + public String name; + public Integer type; + public Integer endpointListID; + public Integer supportedCommands; + public Integer status; + + public BridgedActionsClusterActionStruct( + Integer actionID, + String name, + Integer type, + Integer endpointListID, + Integer supportedCommands, + Integer status) { + this.actionID = actionID; + this.name = name; + this.type = type; + this.endpointListID = endpointListID; + this.supportedCommands = supportedCommands; + this.status = status; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BridgedActionsClusterActionStruct {\n"); + output.append("\tactionID: "); + output.append(actionID); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("\tendpointListID: "); + output.append(endpointListID); + output.append("\n"); + output.append("\tsupportedCommands: "); + output.append(supportedCommands); + output.append("\n"); + output.append("\tstatus: "); + output.append(status); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class BridgedActionsClusterEndpointListStruct { + public Integer endpointListID; + public String name; + public Integer type; + public ArrayList endpoints; + + public BridgedActionsClusterEndpointListStruct( + Integer endpointListID, String name, Integer type, ArrayList endpoints) { + this.endpointListID = endpointListID; + this.name = name; + this.type = type; + this.endpoints = endpoints; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BridgedActionsClusterEndpointListStruct {\n"); + output.append("\tendpointListID: "); + output.append(endpointListID); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("\tendpoints: "); + output.append(endpoints); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class OtaSoftwareUpdateRequestorClusterProviderLocation { + public Integer fabricIndex; + public Long providerNodeID; + public Integer endpoint; + + public OtaSoftwareUpdateRequestorClusterProviderLocation( + Integer fabricIndex, Long providerNodeID, Integer endpoint) { + this.fabricIndex = fabricIndex; + this.providerNodeID = providerNodeID; + this.endpoint = endpoint; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tproviderNodeID: "); + output.append(providerNodeID); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class GeneralCommissioningClusterBasicCommissioningInfoType { + public Long failSafeExpiryLengthMs; + + public GeneralCommissioningClusterBasicCommissioningInfoType(Long failSafeExpiryLengthMs) { + this.failSafeExpiryLengthMs = failSafeExpiryLengthMs; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("GeneralCommissioningClusterBasicCommissioningInfoType {\n"); + output.append("\tfailSafeExpiryLengthMs: "); + output.append(failSafeExpiryLengthMs); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class NetworkCommissioningClusterNetworkInfo { + public byte[] networkID; + public Boolean connected; + + public NetworkCommissioningClusterNetworkInfo(byte[] networkID, Boolean connected) { + this.networkID = networkID; + this.connected = connected; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("NetworkCommissioningClusterNetworkInfo {\n"); + output.append("\tnetworkID: "); + output.append(Arrays.toString(networkID)); + output.append("\n"); + output.append("\tconnected: "); + output.append(connected); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class NetworkCommissioningClusterThreadInterfaceScanResult { + public Long panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public Long extendedAddress; + public Integer rssi; + public Integer lqi; + + public NetworkCommissioningClusterThreadInterfaceScanResult( + Long panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + Long extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("NetworkCommissioningClusterThreadInterfaceScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(extendedAddress); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class NetworkCommissioningClusterWiFiInterfaceScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; + + public NetworkCommissioningClusterWiFiInterfaceScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("NetworkCommissioningClusterWiFiInterfaceScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class GeneralDiagnosticsClusterNetworkInterfaceType { + public String name; + public Boolean fabricConnected; + public Boolean offPremiseServicesReachableIPv4; + public Boolean offPremiseServicesReachableIPv6; + public byte[] hardwareAddress; + public Integer type; + + public GeneralDiagnosticsClusterNetworkInterfaceType( + String name, + Boolean fabricConnected, + Boolean offPremiseServicesReachableIPv4, + Boolean offPremiseServicesReachableIPv6, + byte[] hardwareAddress, + Integer type) { + this.name = name; + this.fabricConnected = fabricConnected; + this.offPremiseServicesReachableIPv4 = offPremiseServicesReachableIPv4; + this.offPremiseServicesReachableIPv6 = offPremiseServicesReachableIPv6; + this.hardwareAddress = hardwareAddress; + this.type = type; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("GeneralDiagnosticsClusterNetworkInterfaceType {\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tfabricConnected: "); + output.append(fabricConnected); + output.append("\n"); + output.append("\toffPremiseServicesReachableIPv4: "); + output.append(offPremiseServicesReachableIPv4); + output.append("\n"); + output.append("\toffPremiseServicesReachableIPv6: "); + output.append(offPremiseServicesReachableIPv6); + output.append("\n"); + output.append("\thardwareAddress: "); + output.append(Arrays.toString(hardwareAddress)); + output.append("\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class SoftwareDiagnosticsClusterSoftwareFault { + public Long id; + public String name; + public byte[] faultRecording; + + public SoftwareDiagnosticsClusterSoftwareFault(Long id, String name, byte[] faultRecording) { + this.id = id; + this.name = name; + this.faultRecording = faultRecording; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("SoftwareDiagnosticsClusterSoftwareFault {\n"); + output.append("\tid: "); + output.append(id); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tfaultRecording: "); + output.append(Arrays.toString(faultRecording)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class SoftwareDiagnosticsClusterThreadMetrics { + public Long id; + public String name; + public Long stackFreeCurrent; + public Long stackFreeMinimum; + public Long stackSize; + + public SoftwareDiagnosticsClusterThreadMetrics( + Long id, String name, Long stackFreeCurrent, Long stackFreeMinimum, Long stackSize) { + this.id = id; + this.name = name; + this.stackFreeCurrent = stackFreeCurrent; + this.stackFreeMinimum = stackFreeMinimum; + this.stackSize = stackSize; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("SoftwareDiagnosticsClusterThreadMetrics {\n"); + output.append("\tid: "); + output.append(id); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tstackFreeCurrent: "); + output.append(stackFreeCurrent); + output.append("\n"); + output.append("\tstackFreeMinimum: "); + output.append(stackFreeMinimum); + output.append("\n"); + output.append("\tstackSize: "); + output.append(stackSize); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ThreadNetworkDiagnosticsClusterNeighborTable { + public Long extAddress; + public Long age; + public Integer rloc16; + public Long linkFrameCounter; + public Long mleFrameCounter; + public Integer lqi; + public Integer averageRssi; + public Integer lastRssi; + public Integer frameErrorRate; + public Integer messageErrorRate; + public Boolean rxOnWhenIdle; + public Boolean fullThreadDevice; + public Boolean fullNetworkData; + public Boolean isChild; + + public ThreadNetworkDiagnosticsClusterNeighborTable( + Long extAddress, + Long age, + Integer rloc16, + Long linkFrameCounter, + Long mleFrameCounter, + Integer lqi, + Integer averageRssi, + Integer lastRssi, + Integer frameErrorRate, + Integer messageErrorRate, + Boolean rxOnWhenIdle, + Boolean fullThreadDevice, + Boolean fullNetworkData, + Boolean isChild) { + this.extAddress = extAddress; + this.age = age; + this.rloc16 = rloc16; + this.linkFrameCounter = linkFrameCounter; + this.mleFrameCounter = mleFrameCounter; + this.lqi = lqi; + this.averageRssi = averageRssi; + this.lastRssi = lastRssi; + this.frameErrorRate = frameErrorRate; + this.messageErrorRate = messageErrorRate; + this.rxOnWhenIdle = rxOnWhenIdle; + this.fullThreadDevice = fullThreadDevice; + this.fullNetworkData = fullNetworkData; + this.isChild = isChild; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadNetworkDiagnosticsClusterNeighborTable {\n"); + output.append("\textAddress: "); + output.append(extAddress); + output.append("\n"); + output.append("\tage: "); + output.append(age); + output.append("\n"); + output.append("\trloc16: "); + output.append(rloc16); + output.append("\n"); + output.append("\tlinkFrameCounter: "); + output.append(linkFrameCounter); + output.append("\n"); + output.append("\tmleFrameCounter: "); + output.append(mleFrameCounter); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("\taverageRssi: "); + output.append(averageRssi); + output.append("\n"); + output.append("\tlastRssi: "); + output.append(lastRssi); + output.append("\n"); + output.append("\tframeErrorRate: "); + output.append(frameErrorRate); + output.append("\n"); + output.append("\tmessageErrorRate: "); + output.append(messageErrorRate); + output.append("\n"); + output.append("\trxOnWhenIdle: "); + output.append(rxOnWhenIdle); + output.append("\n"); + output.append("\tfullThreadDevice: "); + output.append(fullThreadDevice); + output.append("\n"); + output.append("\tfullNetworkData: "); + output.append(fullNetworkData); + output.append("\n"); + output.append("\tisChild: "); + output.append(isChild); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + public Boolean activeTimestampPresent; + public Boolean pendingTimestampPresent; + public Boolean masterKeyPresent; + public Boolean networkNamePresent; + public Boolean extendedPanIdPresent; + public Boolean meshLocalPrefixPresent; + public Boolean delayPresent; + public Boolean panIdPresent; + public Boolean channelPresent; + public Boolean pskcPresent; + public Boolean securityPolicyPresent; + public Boolean channelMaskPresent; + + public ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + Boolean activeTimestampPresent, + Boolean pendingTimestampPresent, + Boolean masterKeyPresent, + Boolean networkNamePresent, + Boolean extendedPanIdPresent, + Boolean meshLocalPrefixPresent, + Boolean delayPresent, + Boolean panIdPresent, + Boolean channelPresent, + Boolean pskcPresent, + Boolean securityPolicyPresent, + Boolean channelMaskPresent) { + this.activeTimestampPresent = activeTimestampPresent; + this.pendingTimestampPresent = pendingTimestampPresent; + this.masterKeyPresent = masterKeyPresent; + this.networkNamePresent = networkNamePresent; + this.extendedPanIdPresent = extendedPanIdPresent; + this.meshLocalPrefixPresent = meshLocalPrefixPresent; + this.delayPresent = delayPresent; + this.panIdPresent = panIdPresent; + this.channelPresent = channelPresent; + this.pskcPresent = pskcPresent; + this.securityPolicyPresent = securityPolicyPresent; + this.channelMaskPresent = channelMaskPresent; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n"); + output.append("\tactiveTimestampPresent: "); + output.append(activeTimestampPresent); + output.append("\n"); + output.append("\tpendingTimestampPresent: "); + output.append(pendingTimestampPresent); + output.append("\n"); + output.append("\tmasterKeyPresent: "); + output.append(masterKeyPresent); + output.append("\n"); + output.append("\tnetworkNamePresent: "); + output.append(networkNamePresent); + output.append("\n"); + output.append("\textendedPanIdPresent: "); + output.append(extendedPanIdPresent); + output.append("\n"); + output.append("\tmeshLocalPrefixPresent: "); + output.append(meshLocalPrefixPresent); + output.append("\n"); + output.append("\tdelayPresent: "); + output.append(delayPresent); + output.append("\n"); + output.append("\tpanIdPresent: "); + output.append(panIdPresent); + output.append("\n"); + output.append("\tchannelPresent: "); + output.append(channelPresent); + output.append("\n"); + output.append("\tpskcPresent: "); + output.append(pskcPresent); + output.append("\n"); + output.append("\tsecurityPolicyPresent: "); + output.append(securityPolicyPresent); + output.append("\n"); + output.append("\tchannelMaskPresent: "); + output.append(channelMaskPresent); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ThreadNetworkDiagnosticsClusterRouteTable { + public Long extAddress; + public Integer rloc16; + public Integer routerId; + public Integer nextHop; + public Integer pathCost; + public Integer LQIIn; + public Integer LQIOut; + public Integer age; + public Boolean allocated; + public Boolean linkEstablished; + + public ThreadNetworkDiagnosticsClusterRouteTable( + Long extAddress, + Integer rloc16, + Integer routerId, + Integer nextHop, + Integer pathCost, + Integer LQIIn, + Integer LQIOut, + Integer age, + Boolean allocated, + Boolean linkEstablished) { + this.extAddress = extAddress; + this.rloc16 = rloc16; + this.routerId = routerId; + this.nextHop = nextHop; + this.pathCost = pathCost; + this.LQIIn = LQIIn; + this.LQIOut = LQIOut; + this.age = age; + this.allocated = allocated; + this.linkEstablished = linkEstablished; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadNetworkDiagnosticsClusterRouteTable {\n"); + output.append("\textAddress: "); + output.append(extAddress); + output.append("\n"); + output.append("\trloc16: "); + output.append(rloc16); + output.append("\n"); + output.append("\trouterId: "); + output.append(routerId); + output.append("\n"); + output.append("\tnextHop: "); + output.append(nextHop); + output.append("\n"); + output.append("\tpathCost: "); + output.append(pathCost); + output.append("\n"); + output.append("\tLQIIn: "); + output.append(LQIIn); + output.append("\n"); + output.append("\tLQIOut: "); + output.append(LQIOut); + output.append("\n"); + output.append("\tage: "); + output.append(age); + output.append("\n"); + output.append("\tallocated: "); + output.append(allocated); + output.append("\n"); + output.append("\tlinkEstablished: "); + output.append(linkEstablished); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ThreadNetworkDiagnosticsClusterSecurityPolicy { + public Integer rotationTime; + public Integer flags; + + public ThreadNetworkDiagnosticsClusterSecurityPolicy(Integer rotationTime, Integer flags) { + this.rotationTime = rotationTime; + this.flags = flags; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n"); + output.append("\trotationTime: "); + output.append(rotationTime); + output.append("\n"); + output.append("\tflags: "); + output.append(flags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class OperationalCredentialsClusterFabricDescriptor { + public Integer fabricIndex; + public byte[] rootPublicKey; + public Integer vendorId; + public Long fabricId; + public Long nodeId; + public String label; + + public OperationalCredentialsClusterFabricDescriptor( + Integer fabricIndex, + byte[] rootPublicKey, + Integer vendorId, + Long fabricId, + Long nodeId, + String label) { + this.fabricIndex = fabricIndex; + this.rootPublicKey = rootPublicKey; + this.vendorId = vendorId; + this.fabricId = fabricId; + this.nodeId = nodeId; + this.label = label; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OperationalCredentialsClusterFabricDescriptor {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\trootPublicKey: "); + output.append(Arrays.toString(rootPublicKey)); + output.append("\n"); + output.append("\tvendorId: "); + output.append(vendorId); + output.append("\n"); + output.append("\tfabricId: "); + output.append(fabricId); + output.append("\n"); + output.append("\tnodeId: "); + output.append(nodeId); + output.append("\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class OperationalCredentialsClusterNOCStruct { + public Integer fabricIndex; + public byte[] noc; + public byte[] icac; + + public OperationalCredentialsClusterNOCStruct(Integer fabricIndex, byte[] noc, byte[] icac) { + this.fabricIndex = fabricIndex; + this.noc = noc; + this.icac = icac; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OperationalCredentialsClusterNOCStruct {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tnoc: "); + output.append(Arrays.toString(noc)); + output.append("\n"); + output.append("\ticac: "); + output.append(Arrays.toString(icac)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class GroupKeyManagementClusterGroupInfo { + public Integer fabricIndex; + public Integer groupId; + public ArrayList endpoints; + public String groupName; + + public GroupKeyManagementClusterGroupInfo( + Integer fabricIndex, Integer groupId, ArrayList endpoints, String groupName) { + this.fabricIndex = fabricIndex; + this.groupId = groupId; + this.endpoints = endpoints; + this.groupName = groupName; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("GroupKeyManagementClusterGroupInfo {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tgroupId: "); + output.append(groupId); + output.append("\n"); + output.append("\tendpoints: "); + output.append(endpoints); + output.append("\n"); + output.append("\tgroupName: "); + output.append(groupName); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class GroupKeyManagementClusterGroupKey { + public Integer fabricIndex; + public Integer groupId; + public Integer groupKeySetID; + + public GroupKeyManagementClusterGroupKey( + Integer fabricIndex, Integer groupId, Integer groupKeySetID) { + this.fabricIndex = fabricIndex; + this.groupId = groupId; + this.groupKeySetID = groupKeySetID; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("GroupKeyManagementClusterGroupKey {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\tgroupId: "); + output.append(groupId); + output.append("\n"); + output.append("\tgroupKeySetID: "); + output.append(groupKeySetID); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class GroupKeyManagementClusterGroupKeySet { + public Integer groupKeySetID; + public Integer securityPolicy; + public byte[] epochKey0; + public Long epochStartTime0; + public byte[] epochKey1; + public Long epochStartTime1; + public byte[] epochKey2; + public Long epochStartTime2; + + public GroupKeyManagementClusterGroupKeySet( + Integer groupKeySetID, + Integer securityPolicy, + byte[] epochKey0, + Long epochStartTime0, + byte[] epochKey1, + Long epochStartTime1, + byte[] epochKey2, + Long epochStartTime2) { + this.groupKeySetID = groupKeySetID; + this.securityPolicy = securityPolicy; + this.epochKey0 = epochKey0; + this.epochStartTime0 = epochStartTime0; + this.epochKey1 = epochKey1; + this.epochStartTime1 = epochStartTime1; + this.epochKey2 = epochKey2; + this.epochStartTime2 = epochStartTime2; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("GroupKeyManagementClusterGroupKeySet {\n"); + output.append("\tgroupKeySetID: "); + output.append(groupKeySetID); + output.append("\n"); + output.append("\tsecurityPolicy: "); + output.append(securityPolicy); + output.append("\n"); + output.append("\tepochKey0: "); + output.append(Arrays.toString(epochKey0)); + output.append("\n"); + output.append("\tepochStartTime0: "); + output.append(epochStartTime0); + output.append("\n"); + output.append("\tepochKey1: "); + output.append(Arrays.toString(epochKey1)); + output.append("\n"); + output.append("\tepochStartTime1: "); + output.append(epochStartTime1); + output.append("\n"); + output.append("\tepochKey2: "); + output.append(Arrays.toString(epochKey2)); + output.append("\n"); + output.append("\tepochStartTime2: "); + output.append(epochStartTime2); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class FixedLabelClusterLabelStruct { + public String label; + public String value; + + public FixedLabelClusterLabelStruct(String label, String value) { + this.label = label; + this.value = value; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("FixedLabelClusterLabelStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class UserLabelClusterLabelStruct { + public String label; + public String value; + + public UserLabelClusterLabelStruct(String label, String value) { + this.label = label; + this.value = value; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("UserLabelClusterLabelStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ModeSelectClusterModeOptionStruct { + public String label; + public Integer mode; + public Long semanticTag; + + public ModeSelectClusterModeOptionStruct(String label, Integer mode, Long semanticTag) { + this.label = label; + this.mode = mode; + this.semanticTag = semanticTag; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ModeSelectClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tsemanticTag: "); + output.append(semanticTag); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ModeSelectClusterSemanticTag { + public Integer mfgCode; + public Integer value; + + public ModeSelectClusterSemanticTag(Integer mfgCode, Integer value) { + this.mfgCode = mfgCode; + this.value = value; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ModeSelectClusterSemanticTag {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class DoorLockClusterDlCredential { + public Integer credentialType; + public Integer credentialIndex; + + public DoorLockClusterDlCredential(Integer credentialType, Integer credentialIndex) { + this.credentialType = credentialType; + this.credentialIndex = credentialIndex; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DoorLockClusterDlCredential {\n"); + output.append("\tcredentialType: "); + output.append(credentialType); + output.append("\n"); + output.append("\tcredentialIndex: "); + output.append(credentialIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class IasAceClusterIasAceZoneStatusResult { + public Integer zoneId; + public Integer zoneStatus; + + public IasAceClusterIasAceZoneStatusResult(Integer zoneId, Integer zoneStatus) { + this.zoneId = zoneId; + this.zoneStatus = zoneStatus; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("IasAceClusterIasAceZoneStatusResult {\n"); + output.append("\tzoneId: "); + output.append(zoneId); + output.append("\n"); + output.append("\tzoneStatus: "); + output.append(zoneStatus); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ChannelClusterChannelInfo { + public Integer majorNumber; + public Integer minorNumber; + public String name; + public String callSign; + public String affiliateCallSign; + + public ChannelClusterChannelInfo( + Integer majorNumber, + Integer minorNumber, + String name, + String callSign, + String affiliateCallSign) { + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.name = name; + this.callSign = callSign; + this.affiliateCallSign = affiliateCallSign; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterChannelInfo {\n"); + output.append("\tmajorNumber: "); + output.append(majorNumber); + output.append("\n"); + output.append("\tminorNumber: "); + output.append(minorNumber); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tcallSign: "); + output.append(callSign); + output.append("\n"); + output.append("\taffiliateCallSign: "); + output.append(affiliateCallSign); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ChannelClusterLineupInfo { + public String operatorName; + public String lineupName; + public String postalCode; + public Integer lineupInfoType; + + public ChannelClusterLineupInfo( + String operatorName, String lineupName, String postalCode, Integer lineupInfoType) { + this.operatorName = operatorName; + this.lineupName = lineupName; + this.postalCode = postalCode; + this.lineupInfoType = lineupInfoType; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ChannelClusterLineupInfo {\n"); + output.append("\toperatorName: "); + output.append(operatorName); + output.append("\n"); + output.append("\tlineupName: "); + output.append(lineupName); + output.append("\n"); + output.append("\tpostalCode: "); + output.append(postalCode); + output.append("\n"); + output.append("\tlineupInfoType: "); + output.append(lineupInfoType); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TargetNavigatorClusterTargetInfo { + public Integer identifier; + public String name; + + public TargetNavigatorClusterTargetInfo(Integer identifier, String name) { + this.identifier = identifier; + this.name = name; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TargetNavigatorClusterTargetInfo {\n"); + output.append("\tidentifier: "); + output.append(identifier); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class MediaPlaybackClusterPlaybackPosition { + public Long updatedAt; + public Long position; + + public MediaPlaybackClusterPlaybackPosition(Long updatedAt, Long position) { + this.updatedAt = updatedAt; + this.position = position; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("MediaPlaybackClusterPlaybackPosition {\n"); + output.append("\tupdatedAt: "); + output.append(updatedAt); + output.append("\n"); + output.append("\tposition: "); + output.append(position); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class MediaInputClusterInputInfo { + public Integer index; + public Integer inputType; + public String name; + public String description; + + public MediaInputClusterInputInfo( + Integer index, Integer inputType, String name, String description) { + this.index = index; + this.inputType = inputType; + this.name = name; + this.description = description; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("MediaInputClusterInputInfo {\n"); + output.append("\tindex: "); + output.append(index); + output.append("\n"); + output.append("\tinputType: "); + output.append(inputType); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tdescription: "); + output.append(description); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterDimension { + public Double width; + public Double height; + public Integer metric; + + public ContentLauncherClusterDimension(Double width, Double height, Integer metric) { + this.width = width; + this.height = height; + this.metric = metric; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterDimension {\n"); + output.append("\twidth: "); + output.append(width); + output.append("\n"); + output.append("\theight: "); + output.append(height); + output.append("\n"); + output.append("\tmetric: "); + output.append(metric); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterAdditionalInfo { + public String name; + public String value; + + public ContentLauncherClusterAdditionalInfo(String name, String value) { + this.name = name; + this.value = value; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterAdditionalInfo {\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterParameter { + public Integer type; + public String value; + public ArrayList externalIDList; + + public ContentLauncherClusterParameter( + Integer type, + String value, + ArrayList externalIDList) { + this.type = type; + this.value = value; + this.externalIDList = externalIDList; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterParameter {\n"); + output.append("\ttype: "); + output.append(type); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("\texternalIDList: "); + output.append(externalIDList); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterContentSearch { + public ArrayList parameterList; + + public ContentLauncherClusterContentSearch( + ArrayList parameterList) { + this.parameterList = parameterList; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterContentSearch {\n"); + output.append("\tparameterList: "); + output.append(parameterList); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterStyleInformation { + public String imageUrl; + public String color; + public ChipStructs.ContentLauncherClusterDimension size; + + public ContentLauncherClusterStyleInformation( + String imageUrl, String color, ChipStructs.ContentLauncherClusterDimension size) { + this.imageUrl = imageUrl; + this.color = color; + this.size = size; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterStyleInformation {\n"); + output.append("\timageUrl: "); + output.append(imageUrl); + output.append("\n"); + output.append("\tcolor: "); + output.append(color); + output.append("\n"); + output.append("\tsize: "); + output.append(size); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ContentLauncherClusterBrandingInformation { + public String providerName; + public ChipStructs.ContentLauncherClusterStyleInformation background; + public ChipStructs.ContentLauncherClusterStyleInformation logo; + public ChipStructs.ContentLauncherClusterStyleInformation progressBar; + public ChipStructs.ContentLauncherClusterStyleInformation splash; + public ChipStructs.ContentLauncherClusterStyleInformation waterMark; + + public ContentLauncherClusterBrandingInformation( + String providerName, + ChipStructs.ContentLauncherClusterStyleInformation background, + ChipStructs.ContentLauncherClusterStyleInformation logo, + ChipStructs.ContentLauncherClusterStyleInformation progressBar, + ChipStructs.ContentLauncherClusterStyleInformation splash, + ChipStructs.ContentLauncherClusterStyleInformation waterMark) { + this.providerName = providerName; + this.background = background; + this.logo = logo; + this.progressBar = progressBar; + this.splash = splash; + this.waterMark = waterMark; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ContentLauncherClusterBrandingInformation {\n"); + output.append("\tproviderName: "); + output.append(providerName); + output.append("\n"); + output.append("\tbackground: "); + output.append(background); + output.append("\n"); + output.append("\tlogo: "); + output.append(logo); + output.append("\n"); + output.append("\tprogressBar: "); + output.append(progressBar); + output.append("\n"); + output.append("\tsplash: "); + output.append(splash); + output.append("\n"); + output.append("\twaterMark: "); + output.append(waterMark); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class AudioOutputClusterOutputInfo { + public Integer index; + public Integer outputType; + public String name; + + public AudioOutputClusterOutputInfo(Integer index, Integer outputType, String name) { + this.index = index; + this.outputType = outputType; + this.name = name; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AudioOutputClusterOutputInfo {\n"); + output.append("\tindex: "); + output.append(index); + output.append("\n"); + output.append("\toutputType: "); + output.append(outputType); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ApplicationLauncherClusterApplicationLauncherApplication { + public Integer catalogVendorId; + public String applicationId; + + public ApplicationLauncherClusterApplicationLauncherApplication( + Integer catalogVendorId, String applicationId) { + this.catalogVendorId = catalogVendorId; + this.applicationId = applicationId; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationLauncherClusterApplicationLauncherApplication {\n"); + output.append("\tcatalogVendorId: "); + output.append(catalogVendorId); + output.append("\n"); + output.append("\tapplicationId: "); + output.append(applicationId); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ApplicationLauncherClusterApplicationEP { + public ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application; + public String endpoint; + + public ApplicationLauncherClusterApplicationEP( + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, + String endpoint) { + this.application = application; + this.endpoint = endpoint; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationLauncherClusterApplicationEP {\n"); + output.append("\tapplication: "); + output.append(application); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ApplicationBasicClusterApplicationBasicApplication { + public Integer catalogVendorId; + public String applicationId; + + public ApplicationBasicClusterApplicationBasicApplication( + Integer catalogVendorId, String applicationId) { + this.catalogVendorId = catalogVendorId; + this.applicationId = applicationId; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationBasicClusterApplicationBasicApplication {\n"); + output.append("\tcatalogVendorId: "); + output.append(catalogVendorId); + output.append("\n"); + output.append("\tapplicationId: "); + output.append(applicationId); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterSimpleStruct { + public Integer a; + public Boolean b; + public Integer c; + public byte[] d; + public String e; + public Integer f; + public Float g; + public Double h; + + public TestClusterClusterSimpleStruct( + Integer a, Boolean b, Integer c, byte[] d, String e, Integer f, Float g, Double h) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.e = e; + this.f = f; + this.g = g; + this.h = h; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterSimpleStruct {\n"); + output.append("\ta: "); + output.append(a); + output.append("\n"); + output.append("\tb: "); + output.append(b); + output.append("\n"); + output.append("\tc: "); + output.append(c); + output.append("\n"); + output.append("\td: "); + output.append(Arrays.toString(d)); + output.append("\n"); + output.append("\te: "); + output.append(e); + output.append("\n"); + output.append("\tf: "); + output.append(f); + output.append("\n"); + output.append("\tg: "); + output.append(g); + output.append("\n"); + output.append("\th: "); + output.append(h); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterNullablesAndOptionalsStruct { + public @Nullable Integer nullableInt; + public Optional optionalInt; + public @Nullable Optional nullableOptionalInt; + public @Nullable String nullableString; + public Optional optionalString; + public @Nullable Optional nullableOptionalString; + public @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct; + public Optional optionalStruct; + public @Nullable Optional nullableOptionalStruct; + public @Nullable ArrayList nullableList; + public Optional> optionalList; + public @Nullable Optional> nullableOptionalList; + + public TestClusterClusterNullablesAndOptionalsStruct( + @Nullable Integer nullableInt, + Optional optionalInt, + @Nullable Optional nullableOptionalInt, + @Nullable String nullableString, + Optional optionalString, + @Nullable Optional nullableOptionalString, + @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct, + Optional optionalStruct, + @Nullable Optional nullableOptionalStruct, + @Nullable ArrayList nullableList, + Optional> optionalList, + @Nullable Optional> nullableOptionalList) { + this.nullableInt = nullableInt; + this.optionalInt = optionalInt; + this.nullableOptionalInt = nullableOptionalInt; + this.nullableString = nullableString; + this.optionalString = optionalString; + this.nullableOptionalString = nullableOptionalString; + this.nullableStruct = nullableStruct; + this.optionalStruct = optionalStruct; + this.nullableOptionalStruct = nullableOptionalStruct; + this.nullableList = nullableList; + this.optionalList = optionalList; + this.nullableOptionalList = nullableOptionalList; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterNullablesAndOptionalsStruct {\n"); + output.append("\tnullableInt: "); + output.append(nullableInt); + output.append("\n"); + output.append("\toptionalInt: "); + output.append(optionalInt); + output.append("\n"); + output.append("\tnullableOptionalInt: "); + output.append(nullableOptionalInt); + output.append("\n"); + output.append("\tnullableString: "); + output.append(nullableString); + output.append("\n"); + output.append("\toptionalString: "); + output.append(optionalString); + output.append("\n"); + output.append("\tnullableOptionalString: "); + output.append(nullableOptionalString); + output.append("\n"); + output.append("\tnullableStruct: "); + output.append(nullableStruct); + output.append("\n"); + output.append("\toptionalStruct: "); + output.append(optionalStruct); + output.append("\n"); + output.append("\tnullableOptionalStruct: "); + output.append(nullableOptionalStruct); + output.append("\n"); + output.append("\tnullableList: "); + output.append(nullableList); + output.append("\n"); + output.append("\toptionalList: "); + output.append(optionalList); + output.append("\n"); + output.append("\tnullableOptionalList: "); + output.append(nullableOptionalList); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterNestedStruct { + public Integer a; + public Boolean b; + public ChipStructs.TestClusterClusterSimpleStruct c; + + public TestClusterClusterNestedStruct( + Integer a, Boolean b, ChipStructs.TestClusterClusterSimpleStruct c) { + this.a = a; + this.b = b; + this.c = c; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterNestedStruct {\n"); + output.append("\ta: "); + output.append(a); + output.append("\n"); + output.append("\tb: "); + output.append(b); + output.append("\n"); + output.append("\tc: "); + output.append(c); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterNestedStructList { + public Integer a; + public Boolean b; + public ChipStructs.TestClusterClusterSimpleStruct c; + public ArrayList d; + public ArrayList e; + public ArrayList f; + public ArrayList g; + + public TestClusterClusterNestedStructList( + Integer a, + Boolean b, + ChipStructs.TestClusterClusterSimpleStruct c, + ArrayList d, + ArrayList e, + ArrayList f, + ArrayList g) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.e = e; + this.f = f; + this.g = g; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterNestedStructList {\n"); + output.append("\ta: "); + output.append(a); + output.append("\n"); + output.append("\tb: "); + output.append(b); + output.append("\n"); + output.append("\tc: "); + output.append(c); + output.append("\n"); + output.append("\td: "); + output.append(d); + output.append("\n"); + output.append("\te: "); + output.append(e); + output.append("\n"); + output.append("\tf: "); + output.append(f); + output.append("\n"); + output.append("\tg: "); + output.append(g); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterDoubleNestedStructList { + public ArrayList a; + + public TestClusterClusterDoubleNestedStructList( + ArrayList a) { + this.a = a; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterDoubleNestedStructList {\n"); + output.append("\ta: "); + output.append(a); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class TestClusterClusterTestListStructOctet { + public Long fabricIndex; + public byte[] operationalCert; + + public TestClusterClusterTestListStructOctet(Long fabricIndex, byte[] operationalCert) { + this.fabricIndex = fabricIndex; + this.operationalCert = operationalCert; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("TestClusterClusterTestListStructOctet {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("\toperationalCert: "); + output.append(Arrays.toString(operationalCert)); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } +} diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 8a1fd84cfb6c97..02a5e723dc9811 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -27,6 +27,7 @@ import chip.clusterinfo.DelegatedClusterCallback; import chip.clusterinfo.InteractionInfo; import chip.devicecontroller.ChipClusters.DefaultClusterCallback; +import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -231,12 +232,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -258,12 +258,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -285,10 +284,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -334,10 +332,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -359,10 +356,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -384,11 +380,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -410,10 +405,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -437,7 +431,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, String data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); responseValues.put(dataResponseValue, data); @@ -461,11 +455,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -487,10 +480,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -512,13 +504,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -540,10 +529,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -565,10 +553,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -590,10 +577,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -615,10 +601,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -640,10 +625,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -665,10 +649,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -690,12 +673,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -717,13 +699,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -745,10 +725,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -770,10 +749,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -795,13 +773,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // channelMatch: Struct ChannelInfo - // Conversion from this type to Java is not properly implemented yet - Integer errorType) { + public void onSuccess(ChipStructs.ChannelClusterChannelInfo channelMatch, Integer errorType) { Map responseValues = new LinkedHashMap<>(); // channelMatch: Struct ChannelInfo // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo errorTypeResponseValue = new CommandResponseInfo("errorType", "int"); + CommandResponseInfo errorTypeResponseValue = new CommandResponseInfo("errorType", "Integer"); responseValues.put(errorTypeResponseValue, errorType); callback.onSuccess(responseValues); } @@ -823,12 +799,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -850,10 +824,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -875,10 +848,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -902,7 +874,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, String data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); responseValues.put(dataResponseValue, data); @@ -926,11 +898,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -952,10 +923,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -977,12 +947,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1004,10 +972,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1029,10 +996,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1054,11 +1020,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1080,10 +1045,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1107,14 +1071,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, byte[] content, Long timeStamp, Long timeSinceBoot) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); CommandResponseInfo contentResponseValue = new CommandResponseInfo("content", "byte[]"); responseValues.put(contentResponseValue, content); - CommandResponseInfo timeStampResponseValue = new CommandResponseInfo("timeStamp", "long"); + CommandResponseInfo timeStampResponseValue = new CommandResponseInfo("timeStamp", "Long"); responseValues.put(timeStampResponseValue, timeStamp); CommandResponseInfo timeSinceBootResponseValue = - new CommandResponseInfo("timeSinceBoot", "long"); + new CommandResponseInfo("timeSinceBoot", "Long"); responseValues.put(timeSinceBootResponseValue, timeSinceBoot); callback.onSuccess(responseValues); } @@ -1136,10 +1100,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1167,12 +1130,12 @@ public void onSuccess( @Nullable Integer nextCredentialIndex) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo credentialExistsResponseValue = - new CommandResponseInfo("credentialExists", "boolean"); + new CommandResponseInfo("credentialExists", "Boolean"); responseValues.put(credentialExistsResponseValue, credentialExists); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "int"); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); responseValues.put(userIndexResponseValue, userIndex); CommandResponseInfo nextCredentialIndexResponseValue = - new CommandResponseInfo("nextCredentialIndex", "int"); + new CommandResponseInfo("nextCredentialIndex", "Integer"); responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); callback.onSuccess(responseValues); } @@ -1200,36 +1163,36 @@ public void onSuccess( @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, - // credentials: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet + @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, Integer nextUserIndex) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "int"); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); responseValues.put(userIndexResponseValue, userIndex); CommandResponseInfo userNameResponseValue = new CommandResponseInfo("userName", "String"); responseValues.put(userNameResponseValue, userName); CommandResponseInfo userUniqueIdResponseValue = - new CommandResponseInfo("userUniqueId", "long"); + new CommandResponseInfo("userUniqueId", "Long"); responseValues.put(userUniqueIdResponseValue, userUniqueId); - CommandResponseInfo userStatusResponseValue = new CommandResponseInfo("userStatus", "int"); + CommandResponseInfo userStatusResponseValue = + new CommandResponseInfo("userStatus", "Integer"); responseValues.put(userStatusResponseValue, userStatus); - CommandResponseInfo userTypeResponseValue = new CommandResponseInfo("userType", "int"); + CommandResponseInfo userTypeResponseValue = new CommandResponseInfo("userType", "Integer"); responseValues.put(userTypeResponseValue, userType); CommandResponseInfo credentialRuleResponseValue = - new CommandResponseInfo("credentialRule", "int"); + new CommandResponseInfo("credentialRule", "Integer"); responseValues.put(credentialRuleResponseValue, credentialRule); // credentials: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet CommandResponseInfo creatorFabricIndexResponseValue = - new CommandResponseInfo("creatorFabricIndex", "int"); + new CommandResponseInfo("creatorFabricIndex", "Integer"); responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); CommandResponseInfo lastModifiedFabricIndexResponseValue = - new CommandResponseInfo("lastModifiedFabricIndex", "int"); + new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); CommandResponseInfo nextUserIndexResponseValue = - new CommandResponseInfo("nextUserIndex", "int"); + new CommandResponseInfo("nextUserIndex", "Integer"); responseValues.put(nextUserIndexResponseValue, nextUserIndex); callback.onSuccess(responseValues); } @@ -1254,12 +1217,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess( Integer status, @Nullable Integer userIndex, @Nullable Integer nextCredentialIndex) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "int"); + CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); responseValues.put(userIndexResponseValue, userIndex); CommandResponseInfo nextCredentialIndexResponseValue = - new CommandResponseInfo("nextCredentialIndex", "int"); + new CommandResponseInfo("nextCredentialIndex", "Integer"); responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); callback.onSuccess(responseValues); } @@ -1281,10 +1244,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1306,10 +1268,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1331,10 +1292,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1356,12 +1316,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1383,10 +1341,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1408,10 +1365,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1435,7 +1391,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "int"); + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); responseValues.put(errorCodeResponseValue, errorCode); CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); responseValues.put(debugTextResponseValue, debugText); @@ -1461,7 +1417,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "int"); + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); responseValues.put(errorCodeResponseValue, errorCode); CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); responseValues.put(debugTextResponseValue, debugText); @@ -1487,7 +1443,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "int"); + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); responseValues.put(errorCodeResponseValue, errorCode); CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); responseValues.put(debugTextResponseValue, debugText); @@ -1514,14 +1470,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List - valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( "valueList", - "List"); - + "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1543,10 +1497,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1569,13 +1522,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1597,11 +1548,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1623,11 +1573,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1649,11 +1598,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1675,10 +1623,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1700,9 +1647,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // groupKeySetIDs: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess(ArrayList groupKeySetIDs) { Map responseValues = new LinkedHashMap<>(); // groupKeySetIDs: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet @@ -1726,9 +1671,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // groupKeySet: Struct GroupKeySet - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySet groupKeySet) { Map responseValues = new LinkedHashMap<>(); // groupKeySet: Struct GroupKeySet // Conversion from this type to Java is not properly implemented yet @@ -1752,13 +1695,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1780,13 +1721,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1808,10 +1747,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1834,9 +1772,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); callback.onSuccess(responseValues); } @@ -1858,12 +1796,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer capacity - // groupList: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess(Integer capacity, ArrayList groupList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "int"); + CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "Integer"); responseValues.put(capacityResponseValue, capacity); // groupList: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet @@ -1888,9 +1823,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); callback.onSuccess(responseValues); } @@ -1913,9 +1848,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId, String groupName) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); CommandResponseInfo groupNameResponseValue = new CommandResponseInfo("groupName", "String"); responseValues.put(groupNameResponseValue, groupName); @@ -1939,10 +1874,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1966,7 +1900,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer timeout) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo timeoutResponseValue = new CommandResponseInfo("timeout", "int"); + CommandResponseInfo timeoutResponseValue = new CommandResponseInfo("timeout", "Integer"); responseValues.put(timeoutResponseValue, timeout); callback.onSuccess(responseValues); } @@ -1988,10 +1922,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2013,10 +1946,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2039,7 +1971,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); callback.onSuccess(responseValues); } @@ -2061,10 +1993,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2086,10 +2017,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2111,11 +2041,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2137,10 +2066,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2162,12 +2090,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2189,10 +2115,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2216,7 +2141,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); callback.onSuccess(responseValues); } @@ -2238,10 +2163,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2263,12 +2187,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2290,10 +2213,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2318,11 +2240,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess(Integer NetworkingStatus, String DebugText, Long ErrorValue) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo NetworkingStatusResponseValue = - new CommandResponseInfo("NetworkingStatus", "int"); + new CommandResponseInfo("NetworkingStatus", "Integer"); responseValues.put(NetworkingStatusResponseValue, NetworkingStatus); CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); responseValues.put(DebugTextResponseValue, DebugText); - CommandResponseInfo ErrorValueResponseValue = new CommandResponseInfo("ErrorValue", "long"); + CommandResponseInfo ErrorValueResponseValue = new CommandResponseInfo("ErrorValue", "Long"); responseValues.put(ErrorValueResponseValue, ErrorValue); callback.onSuccess(responseValues); } @@ -2347,7 +2269,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess(Integer NetworkingStatus, String DebugText) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo NetworkingStatusResponseValue = - new CommandResponseInfo("NetworkingStatus", "int"); + new CommandResponseInfo("NetworkingStatus", "Integer"); responseValues.put(NetworkingStatusResponseValue, NetworkingStatus); CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); responseValues.put(DebugTextResponseValue, DebugText); @@ -2371,15 +2293,16 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer NetworkingStatus, String DebugText - // WiFiScanResults: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - // ThreadScanResults: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess( + Integer NetworkingStatus, + String DebugText, + Optional> + WiFiScanResults, + Optional> + ThreadScanResults) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo NetworkingStatusResponseValue = - new CommandResponseInfo("NetworkingStatus", "int"); + new CommandResponseInfo("NetworkingStatus", "Integer"); responseValues.put(NetworkingStatusResponseValue, NetworkingStatus); CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); responseValues.put(DebugTextResponseValue, DebugText); @@ -2407,13 +2330,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2437,10 +2358,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer action, Long delayedActionTime) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "int"); + CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "Integer"); responseValues.put(actionResponseValue, action); CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "long"); + new CommandResponseInfo("delayedActionTime", "Long"); responseValues.put(delayedActionTimeResponseValue, delayedActionTime); callback.onSuccess(responseValues); } @@ -2472,27 +2393,28 @@ public void onSuccess( Optional userConsentNeeded, Optional metadataForRequestor) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); CommandResponseInfo delayedActionTimeResponseValue = - new CommandResponseInfo("delayedActionTime", "long"); + new CommandResponseInfo("delayedActionTime", "Optional"); responseValues.put(delayedActionTimeResponseValue, delayedActionTime); - CommandResponseInfo imageURIResponseValue = new CommandResponseInfo("imageURI", "String"); + CommandResponseInfo imageURIResponseValue = + new CommandResponseInfo("imageURI", "Optional"); responseValues.put(imageURIResponseValue, imageURI); CommandResponseInfo softwareVersionResponseValue = - new CommandResponseInfo("softwareVersion", "long"); + new CommandResponseInfo("softwareVersion", "Optional"); responseValues.put(softwareVersionResponseValue, softwareVersion); CommandResponseInfo softwareVersionStringResponseValue = - new CommandResponseInfo("softwareVersionString", "String"); + new CommandResponseInfo("softwareVersionString", "Optional"); responseValues.put(softwareVersionStringResponseValue, softwareVersionString); CommandResponseInfo updateTokenResponseValue = - new CommandResponseInfo("updateToken", "byte[]"); + new CommandResponseInfo("updateToken", "Optional"); responseValues.put(updateTokenResponseValue, updateToken); CommandResponseInfo userConsentNeededResponseValue = - new CommandResponseInfo("userConsentNeeded", "boolean"); + new CommandResponseInfo("userConsentNeeded", "Optional"); responseValues.put(userConsentNeededResponseValue, userConsentNeeded); CommandResponseInfo metadataForRequestorResponseValue = - new CommandResponseInfo("metadataForRequestor", "byte[]"); + new CommandResponseInfo("metadataForRequestor", "Optional"); responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); callback.onSuccess(responseValues); } @@ -2514,10 +2436,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2541,14 +2462,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List - valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2570,10 +2488,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2595,10 +2512,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2620,10 +2536,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2645,10 +2560,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2724,9 +2638,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer StatusCode, Integer FabricIndex, String DebugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo StatusCodeResponseValue = new CommandResponseInfo("StatusCode", "int"); + CommandResponseInfo StatusCodeResponseValue = + new CommandResponseInfo("StatusCode", "Integer"); responseValues.put(StatusCodeResponseValue, StatusCode); - CommandResponseInfo FabricIndexResponseValue = new CommandResponseInfo("FabricIndex", "int"); + CommandResponseInfo FabricIndexResponseValue = + new CommandResponseInfo("FabricIndex", "Integer"); responseValues.put(FabricIndexResponseValue, FabricIndex); CommandResponseInfo DebugTextResponseValue = new CommandResponseInfo("DebugText", "String"); responseValues.put(DebugTextResponseValue, DebugText); @@ -2778,13 +2694,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2807,12 +2721,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2835,11 +2748,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2861,10 +2773,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2886,11 +2797,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2912,10 +2822,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2937,11 +2846,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2963,10 +2871,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2988,10 +2895,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3013,10 +2919,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3038,10 +2943,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3064,11 +2968,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId, Integer sceneId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "int"); + CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "Integer"); responseValues.put(sceneIdResponseValue, sceneId); callback.onSuccess(responseValues); } @@ -3090,18 +2994,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer capacity, Integer groupId, Integer sceneCount - // sceneList: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess( + Integer status, + Integer capacity, + Integer groupId, + Integer sceneCount, + ArrayList sceneList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "int"); + CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "Integer"); responseValues.put(capacityResponseValue, capacity); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo sceneCountResponseValue = new CommandResponseInfo("sceneCount", "int"); + CommandResponseInfo sceneCountResponseValue = + new CommandResponseInfo("sceneCount", "Integer"); responseValues.put(sceneCountResponseValue, sceneCount); // sceneList: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet @@ -3127,9 +3034,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); callback.onSuccess(responseValues); } @@ -3152,11 +3059,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId, Integer sceneId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "int"); + CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "Integer"); responseValues.put(sceneIdResponseValue, sceneId); callback.onSuccess(responseValues); } @@ -3179,11 +3086,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, Integer groupId, Integer sceneId) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "int"); + CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "Integer"); responseValues.put(sceneIdResponseValue, sceneId); callback.onSuccess(responseValues); } @@ -3205,19 +3112,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - Integer status, Integer groupId, Integer sceneId, Integer transitionTime, String sceneName - // extensionFieldSets: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + Integer status, + Integer groupId, + Integer sceneId, + Integer transitionTime, + String sceneName, + ArrayList extensionFieldSets) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "int"); + CommandResponseInfo groupIdResponseValue = new CommandResponseInfo("groupId", "Integer"); responseValues.put(groupIdResponseValue, groupId); - CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "int"); + CommandResponseInfo sceneIdResponseValue = new CommandResponseInfo("sceneId", "Integer"); responseValues.put(sceneIdResponseValue, sceneId); CommandResponseInfo transitionTimeResponseValue = - new CommandResponseInfo("transitionTime", "int"); + new CommandResponseInfo("transitionTime", "Integer"); responseValues.put(transitionTimeResponseValue, transitionTime); CommandResponseInfo sceneNameResponseValue = new CommandResponseInfo("sceneName", "String"); responseValues.put(sceneNameResponseValue, sceneName); @@ -3243,10 +3152,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3268,13 +3176,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3296,10 +3202,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3321,10 +3226,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3348,7 +3252,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer status, String data) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "int"); + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); responseValues.put(statusResponseValue, status); CommandResponseInfo dataResponseValue = new CommandResponseInfo("data", "String"); responseValues.put(dataResponseValue, data); @@ -3372,14 +3276,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3401,10 +3302,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3426,10 +3326,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3452,7 +3351,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Boolean value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "boolean"); + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Boolean"); responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @@ -3474,9 +3373,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // arg1: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess(ChipStructs.TestClusterClusterSimpleStruct arg1) { Map responseValues = new LinkedHashMap<>(); // arg1: Struct SimpleStruct // Conversion from this type to Java is not properly implemented yet @@ -3502,7 +3399,8 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer returnValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "int"); + CommandResponseInfo returnValueResponseValue = + new CommandResponseInfo("returnValue", "Integer"); responseValues.put(returnValueResponseValue, returnValue); callback.onSuccess(responseValues); } @@ -3526,7 +3424,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "long"); + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Long"); responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @@ -3550,9 +3448,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer arg1, Integer arg2) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "int"); + CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); responseValues.put(arg1ResponseValue, arg1); - CommandResponseInfo arg2ResponseValue = new CommandResponseInfo("arg2", "int"); + CommandResponseInfo arg2ResponseValue = new CommandResponseInfo("arg2", "Integer"); responseValues.put(arg2ResponseValue, arg2); callback.onSuccess(responseValues); } @@ -3574,9 +3472,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( // arg1: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + public void onSuccess(ArrayList arg1) { Map responseValues = new LinkedHashMap<>(); // arg1: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet @@ -3604,17 +3500,19 @@ public void onSuccess( Boolean wasPresent, Optional wasNull, Optional value, - Optional originalValue) { + @Nullable Optional originalValue) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo wasPresentResponseValue = - new CommandResponseInfo("wasPresent", "boolean"); + new CommandResponseInfo("wasPresent", "Boolean"); responseValues.put(wasPresentResponseValue, wasPresent); - CommandResponseInfo wasNullResponseValue = new CommandResponseInfo("wasNull", "boolean"); + CommandResponseInfo wasNullResponseValue = + new CommandResponseInfo("wasNull", "Optional"); responseValues.put(wasNullResponseValue, wasNull); - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "int"); + CommandResponseInfo valueResponseValue = + new CommandResponseInfo("value", "Optional"); responseValues.put(valueResponseValue, value); CommandResponseInfo originalValueResponseValue = - new CommandResponseInfo("originalValue", "int"); + new CommandResponseInfo("originalValue", "Optional"); responseValues.put(originalValueResponseValue, originalValue); callback.onSuccess(responseValues); } @@ -3638,7 +3536,8 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess(Integer returnValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "int"); + CommandResponseInfo returnValueResponseValue = + new CommandResponseInfo("returnValue", "Integer"); responseValues.put(returnValueResponseValue, returnValue); callback.onSuccess(responseValues); } @@ -3660,11 +3559,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3686,11 +3584,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3712,13 +3609,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3741,13 +3636,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3769,11 +3662,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3795,10 +3687,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3828,20 +3719,21 @@ public void onSuccess( Integer setpoint, Integer unreadEntries) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo timeOfDayResponseValue = new CommandResponseInfo("timeOfDay", "int"); + CommandResponseInfo timeOfDayResponseValue = new CommandResponseInfo("timeOfDay", "Integer"); responseValues.put(timeOfDayResponseValue, timeOfDay); - CommandResponseInfo relayStatusResponseValue = new CommandResponseInfo("relayStatus", "int"); + CommandResponseInfo relayStatusResponseValue = + new CommandResponseInfo("relayStatus", "Integer"); responseValues.put(relayStatusResponseValue, relayStatus); CommandResponseInfo localTemperatureResponseValue = - new CommandResponseInfo("localTemperature", "int"); + new CommandResponseInfo("localTemperature", "Integer"); responseValues.put(localTemperatureResponseValue, localTemperature); CommandResponseInfo humidityInPercentageResponseValue = - new CommandResponseInfo("humidityInPercentage", "int"); + new CommandResponseInfo("humidityInPercentage", "Integer"); responseValues.put(humidityInPercentageResponseValue, humidityInPercentage); - CommandResponseInfo setpointResponseValue = new CommandResponseInfo("setpoint", "int"); + CommandResponseInfo setpointResponseValue = new CommandResponseInfo("setpoint", "Integer"); responseValues.put(setpointResponseValue, setpoint); CommandResponseInfo unreadEntriesResponseValue = - new CommandResponseInfo("unreadEntries", "int"); + new CommandResponseInfo("unreadEntries", "Integer"); responseValues.put(unreadEntriesResponseValue, unreadEntries); callback.onSuccess(responseValues); } @@ -3866,20 +3758,18 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess( Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, - Integer modeForSequence - // payload: /* TYPE WARNING: array array defaults to */ uint8_t * - // Conversion from this type to Java is not properly implemented yet - ) { + Integer modeForSequence, + ArrayList payload) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo numberOfTransitionsForSequenceResponseValue = - new CommandResponseInfo("numberOfTransitionsForSequence", "int"); + new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); responseValues.put( numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); CommandResponseInfo dayOfWeekForSequenceResponseValue = - new CommandResponseInfo("dayOfWeekForSequence", "int"); + new CommandResponseInfo("dayOfWeekForSequence", "Integer"); responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); CommandResponseInfo modeForSequenceResponseValue = - new CommandResponseInfo("modeForSequence", "int"); + new CommandResponseInfo("modeForSequence", "Integer"); responseValues.put(modeForSequenceResponseValue, modeForSequence); // payload: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet @@ -3903,10 +3793,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3930,10 +3819,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3956,13 +3844,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -3984,14 +3870,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess( - List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4014,13 +3897,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", - "List"); - + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4045,14 +3926,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List - valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( "valueList", - "List"); - + "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4076,11 +3955,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4102,10 +3980,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4127,11 +4004,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4153,12 +4029,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = - new CommandResponseInfo( - "valueList", "List"); - + new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4180,10 +4054,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4205,10 +4078,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4230,10 +4102,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -4674,7 +4545,6 @@ public Map> getCommandMap() { "tempAccountIdentifier", accountLogingetSetupPINRequesttempAccountIdentifierCommandParameterInfo); - // Populate commands InteractionInfo accountLogingetSetupPINRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4700,7 +4570,6 @@ public Map> getCommandMap() { accountLoginloginRequestCommandParams.put( "setupPIN", accountLoginloginRequestsetupPINCommandParameterInfo); - // Populate commands InteractionInfo accountLoginloginRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4716,7 +4585,6 @@ public Map> getCommandMap() { "loginRequest", accountLoginloginRequestInteractionInfo); Map accountLoginlogoutRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo accountLoginlogoutRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4735,12 +4603,11 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo administratorCommissioningopenBasicCommissioningWindowcommissioningTimeoutCommandParameterInfo = - new CommandParameterInfo("commissioningTimeout", int.class); + new CommandParameterInfo("commissioningTimeout", Integer.class); administratorCommissioningopenBasicCommissioningWindowCommandParams.put( "commissioningTimeout", administratorCommissioningopenBasicCommissioningWindowcommissioningTimeoutCommandParameterInfo); - // Populate commands InteractionInfo administratorCommissioningopenBasicCommissioningWindowInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4759,7 +4626,7 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo administratorCommissioningopenCommissioningWindowcommissioningTimeoutCommandParameterInfo = - new CommandParameterInfo("commissioningTimeout", int.class); + new CommandParameterInfo("commissioningTimeout", Integer.class); administratorCommissioningopenCommissioningWindowCommandParams.put( "commissioningTimeout", administratorCommissioningopenCommissioningWindowcommissioningTimeoutCommandParameterInfo); @@ -4773,14 +4640,14 @@ public Map> getCommandMap() { CommandParameterInfo administratorCommissioningopenCommissioningWindowdiscriminatorCommandParameterInfo = - new CommandParameterInfo("discriminator", int.class); + new CommandParameterInfo("discriminator", Integer.class); administratorCommissioningopenCommissioningWindowCommandParams.put( "discriminator", administratorCommissioningopenCommissioningWindowdiscriminatorCommandParameterInfo); CommandParameterInfo administratorCommissioningopenCommissioningWindowiterationsCommandParameterInfo = - new CommandParameterInfo("iterations", long.class); + new CommandParameterInfo("iterations", Long.class); administratorCommissioningopenCommissioningWindowCommandParams.put( "iterations", administratorCommissioningopenCommissioningWindowiterationsCommandParameterInfo); @@ -4792,12 +4659,11 @@ public Map> getCommandMap() { CommandParameterInfo administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo = - new CommandParameterInfo("passcodeID", int.class); + new CommandParameterInfo("passcodeID", Integer.class); administratorCommissioningopenCommissioningWindowCommandParams.put( "passcodeID", administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo); - // Populate commands InteractionInfo administratorCommissioningopenCommissioningWindowInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4818,7 +4684,6 @@ public Map> getCommandMap() { administratorCommissioningopenCommissioningWindowInteractionInfo); Map administratorCommissioningrevokeCommissioningCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo administratorCommissioningrevokeCommissioningInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4837,25 +4702,14 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map applicationLauncherhideAppRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo applicationLauncherhideAppRequestcatalogVendorIdCommandParameterInfo = - new CommandParameterInfo("catalogVendorId", int.class); - applicationLauncherhideAppRequestCommandParams.put( - "catalogVendorId", applicationLauncherhideAppRequestcatalogVendorIdCommandParameterInfo); - - CommandParameterInfo applicationLauncherhideAppRequestapplicationIdCommandParameterInfo = - new CommandParameterInfo("applicationId", String.class); - applicationLauncherhideAppRequestCommandParams.put( - "applicationId", applicationLauncherhideAppRequestapplicationIdCommandParameterInfo); - - // Populate commands InteractionInfo applicationLauncherhideAppRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ApplicationLauncherCluster) cluster) .hideAppRequest( (ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback, - (Integer) commandArguments.get("catalogVendorId"), - (String) commandArguments.get("applicationId")); + (ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication) + commandArguments.get("application")); }, () -> new DelegatedLauncherResponseCallback(), applicationLauncherhideAppRequestCommandParams); @@ -4868,17 +4722,6 @@ public Map> getCommandMap() { applicationLauncherlaunchAppRequestCommandParams.put( "data", applicationLauncherlaunchAppRequestdataCommandParameterInfo); - CommandParameterInfo applicationLauncherlaunchAppRequestcatalogVendorIdCommandParameterInfo = - new CommandParameterInfo("catalogVendorId", int.class); - applicationLauncherlaunchAppRequestCommandParams.put( - "catalogVendorId", applicationLauncherlaunchAppRequestcatalogVendorIdCommandParameterInfo); - - CommandParameterInfo applicationLauncherlaunchAppRequestapplicationIdCommandParameterInfo = - new CommandParameterInfo("applicationId", String.class); - applicationLauncherlaunchAppRequestCommandParams.put( - "applicationId", applicationLauncherlaunchAppRequestapplicationIdCommandParameterInfo); - - // Populate commands InteractionInfo applicationLauncherlaunchAppRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4886,8 +4729,8 @@ public Map> getCommandMap() { .launchAppRequest( (ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback, (String) commandArguments.get("data"), - (Integer) commandArguments.get("catalogVendorId"), - (String) commandArguments.get("applicationId")); + (ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication) + commandArguments.get("application")); }, () -> new DelegatedLauncherResponseCallback(), applicationLauncherlaunchAppRequestCommandParams); @@ -4895,25 +4738,14 @@ public Map> getCommandMap() { "launchAppRequest", applicationLauncherlaunchAppRequestInteractionInfo); Map applicationLauncherstopAppRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo applicationLauncherstopAppRequestcatalogVendorIdCommandParameterInfo = - new CommandParameterInfo("catalogVendorId", int.class); - applicationLauncherstopAppRequestCommandParams.put( - "catalogVendorId", applicationLauncherstopAppRequestcatalogVendorIdCommandParameterInfo); - - CommandParameterInfo applicationLauncherstopAppRequestapplicationIdCommandParameterInfo = - new CommandParameterInfo("applicationId", String.class); - applicationLauncherstopAppRequestCommandParams.put( - "applicationId", applicationLauncherstopAppRequestapplicationIdCommandParameterInfo); - - // Populate commands InteractionInfo applicationLauncherstopAppRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ApplicationLauncherCluster) cluster) .stopAppRequest( (ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback, - (Integer) commandArguments.get("catalogVendorId"), - (String) commandArguments.get("applicationId")); + (ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication) + commandArguments.get("application")); }, () -> new DelegatedLauncherResponseCallback(), applicationLauncherstopAppRequestCommandParams); @@ -4924,7 +4756,7 @@ public Map> getCommandMap() { Map audioOutputrenameOutputRequestCommandParams = new LinkedHashMap(); CommandParameterInfo audioOutputrenameOutputRequestindexCommandParameterInfo = - new CommandParameterInfo("index", int.class); + new CommandParameterInfo("index", Integer.class); audioOutputrenameOutputRequestCommandParams.put( "index", audioOutputrenameOutputRequestindexCommandParameterInfo); @@ -4933,7 +4765,6 @@ public Map> getCommandMap() { audioOutputrenameOutputRequestCommandParams.put( "name", audioOutputrenameOutputRequestnameCommandParameterInfo); - // Populate commands InteractionInfo audioOutputrenameOutputRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4950,11 +4781,10 @@ public Map> getCommandMap() { Map audioOutputselectOutputRequestCommandParams = new LinkedHashMap(); CommandParameterInfo audioOutputselectOutputRequestindexCommandParameterInfo = - new CommandParameterInfo("index", int.class); + new CommandParameterInfo("index", Integer.class); audioOutputselectOutputRequestCommandParams.put( "index", audioOutputselectOutputRequestindexCommandParameterInfo); - // Populate commands InteractionInfo audioOutputselectOutputRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4971,11 +4801,10 @@ public Map> getCommandMap() { Map barrierControlbarrierControlGoToPercentCommandParams = new LinkedHashMap(); CommandParameterInfo barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo = - new CommandParameterInfo("percentOpen", int.class); + new CommandParameterInfo("percentOpen", Integer.class); barrierControlbarrierControlGoToPercentCommandParams.put( "percentOpen", barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo); - // Populate commands InteractionInfo barrierControlbarrierControlGoToPercentInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -4990,7 +4819,6 @@ public Map> getCommandMap() { "barrierControlGoToPercent", barrierControlbarrierControlGoToPercentInteractionInfo); Map barrierControlbarrierControlStopCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo barrierControlbarrierControlStopInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5005,7 +4833,6 @@ public Map> getCommandMap() { Map basicClusterInteractionInfoMap = new LinkedHashMap<>(); Map basicmfgSpecificPingCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo basicmfgSpecificPingInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5022,22 +4849,21 @@ public Map> getCommandMap() { Map bindingbindCommandParams = new LinkedHashMap(); CommandParameterInfo bindingbindnodeIdCommandParameterInfo = - new CommandParameterInfo("nodeId", long.class); + new CommandParameterInfo("nodeId", Long.class); bindingbindCommandParams.put("nodeId", bindingbindnodeIdCommandParameterInfo); CommandParameterInfo bindingbindgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); bindingbindCommandParams.put("groupId", bindingbindgroupIdCommandParameterInfo); CommandParameterInfo bindingbindendpointIdCommandParameterInfo = - new CommandParameterInfo("endpointId", int.class); + new CommandParameterInfo("endpointId", Integer.class); bindingbindCommandParams.put("endpointId", bindingbindendpointIdCommandParameterInfo); CommandParameterInfo bindingbindclusterIdCommandParameterInfo = - new CommandParameterInfo("clusterId", long.class); + new CommandParameterInfo("clusterId", Long.class); bindingbindCommandParams.put("clusterId", bindingbindclusterIdCommandParameterInfo); - // Populate commands InteractionInfo bindingbindInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5055,22 +4881,21 @@ public Map> getCommandMap() { Map bindingunbindCommandParams = new LinkedHashMap(); CommandParameterInfo bindingunbindnodeIdCommandParameterInfo = - new CommandParameterInfo("nodeId", long.class); + new CommandParameterInfo("nodeId", Long.class); bindingunbindCommandParams.put("nodeId", bindingunbindnodeIdCommandParameterInfo); CommandParameterInfo bindingunbindgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); bindingunbindCommandParams.put("groupId", bindingunbindgroupIdCommandParameterInfo); CommandParameterInfo bindingunbindendpointIdCommandParameterInfo = - new CommandParameterInfo("endpointId", int.class); + new CommandParameterInfo("endpointId", Integer.class); bindingunbindCommandParams.put("endpointId", bindingunbindendpointIdCommandParameterInfo); CommandParameterInfo bindingunbindclusterIdCommandParameterInfo = - new CommandParameterInfo("clusterId", long.class); + new CommandParameterInfo("clusterId", Long.class); bindingunbindCommandParams.put("clusterId", bindingunbindclusterIdCommandParameterInfo); - // Populate commands InteractionInfo bindingunbindInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5092,16 +4917,15 @@ public Map> getCommandMap() { Map bridgedActionsdisableActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsdisableActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsdisableActionCommandParams.put( "actionID", bridgedActionsdisableActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsdisableActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsdisableActionCommandParams.put( "invokeID", bridgedActionsdisableActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsdisableActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5118,21 +4942,20 @@ public Map> getCommandMap() { Map bridgedActionsdisableActionWithDurationCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsdisableActionWithDurationactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsdisableActionWithDurationCommandParams.put( "actionID", bridgedActionsdisableActionWithDurationactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsdisableActionWithDurationinvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsdisableActionWithDurationCommandParams.put( "invokeID", bridgedActionsdisableActionWithDurationinvokeIDCommandParameterInfo); CommandParameterInfo bridgedActionsdisableActionWithDurationdurationCommandParameterInfo = - new CommandParameterInfo("duration", long.class); + new CommandParameterInfo("duration", Long.class); bridgedActionsdisableActionWithDurationCommandParams.put( "duration", bridgedActionsdisableActionWithDurationdurationCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsdisableActionWithDurationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5150,16 +4973,15 @@ public Map> getCommandMap() { Map bridgedActionsenableActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsenableActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsenableActionCommandParams.put( "actionID", bridgedActionsenableActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsenableActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsenableActionCommandParams.put( "invokeID", bridgedActionsenableActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsenableActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5176,21 +4998,20 @@ public Map> getCommandMap() { Map bridgedActionsenableActionWithDurationCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsenableActionWithDurationactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsenableActionWithDurationCommandParams.put( "actionID", bridgedActionsenableActionWithDurationactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsenableActionWithDurationinvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsenableActionWithDurationCommandParams.put( "invokeID", bridgedActionsenableActionWithDurationinvokeIDCommandParameterInfo); CommandParameterInfo bridgedActionsenableActionWithDurationdurationCommandParameterInfo = - new CommandParameterInfo("duration", long.class); + new CommandParameterInfo("duration", Long.class); bridgedActionsenableActionWithDurationCommandParams.put( "duration", bridgedActionsenableActionWithDurationdurationCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsenableActionWithDurationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5208,16 +5029,15 @@ public Map> getCommandMap() { Map bridgedActionsinstantActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsinstantActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsinstantActionCommandParams.put( "actionID", bridgedActionsinstantActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsinstantActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsinstantActionCommandParams.put( "invokeID", bridgedActionsinstantActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsinstantActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5234,23 +5054,22 @@ public Map> getCommandMap() { Map bridgedActionsinstantActionWithTransitionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsinstantActionWithTransitionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsinstantActionWithTransitionCommandParams.put( "actionID", bridgedActionsinstantActionWithTransitionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsinstantActionWithTransitioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsinstantActionWithTransitionCommandParams.put( "invokeID", bridgedActionsinstantActionWithTransitioninvokeIDCommandParameterInfo); CommandParameterInfo bridgedActionsinstantActionWithTransitiontransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); bridgedActionsinstantActionWithTransitionCommandParams.put( "transitionTime", bridgedActionsinstantActionWithTransitiontransitionTimeCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsinstantActionWithTransitionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5268,16 +5087,15 @@ public Map> getCommandMap() { Map bridgedActionspauseActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionspauseActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionspauseActionCommandParams.put( "actionID", bridgedActionspauseActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionspauseActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionspauseActionCommandParams.put( "invokeID", bridgedActionspauseActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionspauseActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5294,21 +5112,20 @@ public Map> getCommandMap() { Map bridgedActionspauseActionWithDurationCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionspauseActionWithDurationactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionspauseActionWithDurationCommandParams.put( "actionID", bridgedActionspauseActionWithDurationactionIDCommandParameterInfo); CommandParameterInfo bridgedActionspauseActionWithDurationinvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionspauseActionWithDurationCommandParams.put( "invokeID", bridgedActionspauseActionWithDurationinvokeIDCommandParameterInfo); CommandParameterInfo bridgedActionspauseActionWithDurationdurationCommandParameterInfo = - new CommandParameterInfo("duration", long.class); + new CommandParameterInfo("duration", Long.class); bridgedActionspauseActionWithDurationCommandParams.put( "duration", bridgedActionspauseActionWithDurationdurationCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionspauseActionWithDurationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5326,16 +5143,15 @@ public Map> getCommandMap() { Map bridgedActionsresumeActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsresumeActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsresumeActionCommandParams.put( "actionID", bridgedActionsresumeActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsresumeActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsresumeActionCommandParams.put( "invokeID", bridgedActionsresumeActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsresumeActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5352,16 +5168,15 @@ public Map> getCommandMap() { Map bridgedActionsstartActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsstartActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsstartActionCommandParams.put( "actionID", bridgedActionsstartActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsstartActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsstartActionCommandParams.put( "invokeID", bridgedActionsstartActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsstartActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5378,21 +5193,20 @@ public Map> getCommandMap() { Map bridgedActionsstartActionWithDurationCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsstartActionWithDurationactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsstartActionWithDurationCommandParams.put( "actionID", bridgedActionsstartActionWithDurationactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsstartActionWithDurationinvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsstartActionWithDurationCommandParams.put( "invokeID", bridgedActionsstartActionWithDurationinvokeIDCommandParameterInfo); CommandParameterInfo bridgedActionsstartActionWithDurationdurationCommandParameterInfo = - new CommandParameterInfo("duration", long.class); + new CommandParameterInfo("duration", Long.class); bridgedActionsstartActionWithDurationCommandParams.put( "duration", bridgedActionsstartActionWithDurationdurationCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsstartActionWithDurationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5410,16 +5224,15 @@ public Map> getCommandMap() { Map bridgedActionsstopActionCommandParams = new LinkedHashMap(); CommandParameterInfo bridgedActionsstopActionactionIDCommandParameterInfo = - new CommandParameterInfo("actionID", int.class); + new CommandParameterInfo("actionID", Integer.class); bridgedActionsstopActionCommandParams.put( "actionID", bridgedActionsstopActionactionIDCommandParameterInfo); CommandParameterInfo bridgedActionsstopActioninvokeIDCommandParameterInfo = - new CommandParameterInfo("invokeID", long.class); + new CommandParameterInfo("invokeID", Optional.class); bridgedActionsstopActionCommandParams.put( "invokeID", bridgedActionsstopActioninvokeIDCommandParameterInfo); - // Populate commands InteractionInfo bridgedActionsstopActionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5441,16 +5254,15 @@ public Map> getCommandMap() { Map channelchangeChannelByNumberRequestCommandParams = new LinkedHashMap(); CommandParameterInfo channelchangeChannelByNumberRequestmajorNumberCommandParameterInfo = - new CommandParameterInfo("majorNumber", int.class); + new CommandParameterInfo("majorNumber", Integer.class); channelchangeChannelByNumberRequestCommandParams.put( "majorNumber", channelchangeChannelByNumberRequestmajorNumberCommandParameterInfo); CommandParameterInfo channelchangeChannelByNumberRequestminorNumberCommandParameterInfo = - new CommandParameterInfo("minorNumber", int.class); + new CommandParameterInfo("minorNumber", Integer.class); channelchangeChannelByNumberRequestCommandParams.put( "minorNumber", channelchangeChannelByNumberRequestminorNumberCommandParameterInfo); - // Populate commands InteractionInfo channelchangeChannelByNumberRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5471,7 +5283,6 @@ public Map> getCommandMap() { channelchangeChannelRequestCommandParams.put( "match", channelchangeChannelRequestmatchCommandParameterInfo); - // Populate commands InteractionInfo channelchangeChannelRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5487,11 +5298,10 @@ public Map> getCommandMap() { Map channelskipChannelRequestCommandParams = new LinkedHashMap(); CommandParameterInfo channelskipChannelRequestcountCommandParameterInfo = - new CommandParameterInfo("count", int.class); + new CommandParameterInfo("count", Integer.class); channelskipChannelRequestCommandParams.put( "count", channelskipChannelRequestcountCommandParameterInfo); - // Populate commands InteractionInfo channelskipChannelRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5508,41 +5318,40 @@ public Map> getCommandMap() { Map colorControlcolorLoopSetCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorLoopSetupdateFlagsCommandParameterInfo = - new CommandParameterInfo("updateFlags", int.class); + new CommandParameterInfo("updateFlags", Integer.class); colorControlcolorLoopSetCommandParams.put( "updateFlags", colorControlcolorLoopSetupdateFlagsCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSetactionCommandParameterInfo = - new CommandParameterInfo("action", int.class); + new CommandParameterInfo("action", Integer.class); colorControlcolorLoopSetCommandParams.put( "action", colorControlcolorLoopSetactionCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSetdirectionCommandParameterInfo = - new CommandParameterInfo("direction", int.class); + new CommandParameterInfo("direction", Integer.class); colorControlcolorLoopSetCommandParams.put( "direction", colorControlcolorLoopSetdirectionCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSettimeCommandParameterInfo = - new CommandParameterInfo("time", int.class); + new CommandParameterInfo("time", Integer.class); colorControlcolorLoopSetCommandParams.put( "time", colorControlcolorLoopSettimeCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSetstartHueCommandParameterInfo = - new CommandParameterInfo("startHue", int.class); + new CommandParameterInfo("startHue", Integer.class); colorControlcolorLoopSetCommandParams.put( "startHue", colorControlcolorLoopSetstartHueCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSetoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlcolorLoopSetCommandParams.put( "optionsMask", colorControlcolorLoopSetoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlcolorLoopSetoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlcolorLoopSetCommandParams.put( "optionsOverride", colorControlcolorLoopSetoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlcolorLoopSetInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5564,26 +5373,25 @@ public Map> getCommandMap() { Map colorControlenhancedMoveHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlenhancedMoveHuemoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); colorControlenhancedMoveHueCommandParams.put( "moveMode", colorControlenhancedMoveHuemoveModeCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveHuerateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); colorControlenhancedMoveHueCommandParams.put( "rate", colorControlenhancedMoveHuerateCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlenhancedMoveHueCommandParams.put( "optionsMask", colorControlenhancedMoveHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlenhancedMoveHueCommandParams.put( "optionsOverride", colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlenhancedMoveHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5602,31 +5410,30 @@ public Map> getCommandMap() { Map colorControlenhancedMoveToHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlenhancedMoveToHueenhancedHueCommandParameterInfo = - new CommandParameterInfo("enhancedHue", int.class); + new CommandParameterInfo("enhancedHue", Integer.class); colorControlenhancedMoveToHueCommandParams.put( "enhancedHue", colorControlenhancedMoveToHueenhancedHueCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHuedirectionCommandParameterInfo = - new CommandParameterInfo("direction", int.class); + new CommandParameterInfo("direction", Integer.class); colorControlenhancedMoveToHueCommandParams.put( "direction", colorControlenhancedMoveToHuedirectionCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlenhancedMoveToHueCommandParams.put( "transitionTime", colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlenhancedMoveToHueCommandParams.put( "optionsMask", colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlenhancedMoveToHueCommandParams.put( "optionsOverride", colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlenhancedMoveToHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5646,35 +5453,34 @@ public Map> getCommandMap() { Map colorControlenhancedMoveToHueAndSaturationCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo = - new CommandParameterInfo("enhancedHue", int.class); + new CommandParameterInfo("enhancedHue", Integer.class); colorControlenhancedMoveToHueAndSaturationCommandParams.put( "enhancedHue", colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo = - new CommandParameterInfo("saturation", int.class); + new CommandParameterInfo("saturation", Integer.class); colorControlenhancedMoveToHueAndSaturationCommandParams.put( "saturation", colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlenhancedMoveToHueAndSaturationCommandParams.put( "transitionTime", colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlenhancedMoveToHueAndSaturationCommandParams.put( "optionsMask", colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlenhancedMoveToHueAndSaturationCommandParams.put( "optionsOverride", colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlenhancedMoveToHueAndSaturationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5695,31 +5501,30 @@ public Map> getCommandMap() { Map colorControlenhancedStepHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlenhancedStepHuestepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); colorControlenhancedStepHueCommandParams.put( "stepMode", colorControlenhancedStepHuestepModeCommandParameterInfo); CommandParameterInfo colorControlenhancedStepHuestepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); colorControlenhancedStepHueCommandParams.put( "stepSize", colorControlenhancedStepHuestepSizeCommandParameterInfo); CommandParameterInfo colorControlenhancedStepHuetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlenhancedStepHueCommandParams.put( "transitionTime", colorControlenhancedStepHuetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlenhancedStepHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlenhancedStepHueCommandParams.put( "optionsMask", colorControlenhancedStepHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlenhancedStepHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlenhancedStepHueCommandParams.put( "optionsOverride", colorControlenhancedStepHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlenhancedStepHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5739,24 +5544,23 @@ public Map> getCommandMap() { Map colorControlmoveColorCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveColorrateXCommandParameterInfo = - new CommandParameterInfo("rateX", int.class); + new CommandParameterInfo("rateX", Integer.class); colorControlmoveColorCommandParams.put("rateX", colorControlmoveColorrateXCommandParameterInfo); CommandParameterInfo colorControlmoveColorrateYCommandParameterInfo = - new CommandParameterInfo("rateY", int.class); + new CommandParameterInfo("rateY", Integer.class); colorControlmoveColorCommandParams.put("rateY", colorControlmoveColorrateYCommandParameterInfo); CommandParameterInfo colorControlmoveColoroptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveColorCommandParams.put( "optionsMask", colorControlmoveColoroptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveColoroptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveColorCommandParams.put( "optionsOverride", colorControlmoveColoroptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveColorInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5774,40 +5578,39 @@ public Map> getCommandMap() { Map colorControlmoveColorTemperatureCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveColorTemperaturemoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "moveMode", colorControlmoveColorTemperaturemoveModeCommandParameterInfo); CommandParameterInfo colorControlmoveColorTemperaturerateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "rate", colorControlmoveColorTemperaturerateCommandParameterInfo); CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMinimumCommandParameterInfo = - new CommandParameterInfo("colorTemperatureMinimum", int.class); + new CommandParameterInfo("colorTemperatureMinimum", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "colorTemperatureMinimum", colorControlmoveColorTemperaturecolorTemperatureMinimumCommandParameterInfo); CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMaximumCommandParameterInfo = - new CommandParameterInfo("colorTemperatureMaximum", int.class); + new CommandParameterInfo("colorTemperatureMaximum", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "colorTemperatureMaximum", colorControlmoveColorTemperaturecolorTemperatureMaximumCommandParameterInfo); CommandParameterInfo colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "optionsMask", colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveColorTemperatureCommandParams.put( "optionsOverride", colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveColorTemperatureInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5828,25 +5631,24 @@ public Map> getCommandMap() { Map colorControlmoveHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveHuemoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); colorControlmoveHueCommandParams.put( "moveMode", colorControlmoveHuemoveModeCommandParameterInfo); CommandParameterInfo colorControlmoveHuerateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); colorControlmoveHueCommandParams.put("rate", colorControlmoveHuerateCommandParameterInfo); CommandParameterInfo colorControlmoveHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveHueCommandParams.put( "optionsMask", colorControlmoveHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveHueCommandParams.put( "optionsOverride", colorControlmoveHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5864,26 +5666,25 @@ public Map> getCommandMap() { Map colorControlmoveSaturationCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveSaturationmoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); colorControlmoveSaturationCommandParams.put( "moveMode", colorControlmoveSaturationmoveModeCommandParameterInfo); CommandParameterInfo colorControlmoveSaturationrateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); colorControlmoveSaturationCommandParams.put( "rate", colorControlmoveSaturationrateCommandParameterInfo); CommandParameterInfo colorControlmoveSaturationoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveSaturationCommandParams.put( "optionsMask", colorControlmoveSaturationoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveSaturationoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveSaturationCommandParams.put( "optionsOverride", colorControlmoveSaturationoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveSaturationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5902,31 +5703,30 @@ public Map> getCommandMap() { Map colorControlmoveToColorCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveToColorcolorXCommandParameterInfo = - new CommandParameterInfo("colorX", int.class); + new CommandParameterInfo("colorX", Integer.class); colorControlmoveToColorCommandParams.put( "colorX", colorControlmoveToColorcolorXCommandParameterInfo); CommandParameterInfo colorControlmoveToColorcolorYCommandParameterInfo = - new CommandParameterInfo("colorY", int.class); + new CommandParameterInfo("colorY", Integer.class); colorControlmoveToColorCommandParams.put( "colorY", colorControlmoveToColorcolorYCommandParameterInfo); CommandParameterInfo colorControlmoveToColortransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlmoveToColorCommandParams.put( "transitionTime", colorControlmoveToColortransitionTimeCommandParameterInfo); CommandParameterInfo colorControlmoveToColoroptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveToColorCommandParams.put( "optionsMask", colorControlmoveToColoroptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveToColoroptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveToColorCommandParams.put( "optionsOverride", colorControlmoveToColoroptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveToColorInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5946,26 +5746,25 @@ public Map> getCommandMap() { Map colorControlmoveToColorTemperatureCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo = - new CommandParameterInfo("colorTemperature", int.class); + new CommandParameterInfo("colorTemperature", Integer.class); colorControlmoveToColorTemperatureCommandParams.put( "colorTemperature", colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo); CommandParameterInfo colorControlmoveToColorTemperaturetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlmoveToColorTemperatureCommandParams.put( "transitionTime", colorControlmoveToColorTemperaturetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlmoveToColorTemperatureoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveToColorTemperatureCommandParams.put( "optionsMask", colorControlmoveToColorTemperatureoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveToColorTemperatureoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveToColorTemperatureCommandParams.put( "optionsOverride", colorControlmoveToColorTemperatureoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveToColorTemperatureInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -5984,30 +5783,29 @@ public Map> getCommandMap() { Map colorControlmoveToHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveToHuehueCommandParameterInfo = - new CommandParameterInfo("hue", int.class); + new CommandParameterInfo("hue", Integer.class); colorControlmoveToHueCommandParams.put("hue", colorControlmoveToHuehueCommandParameterInfo); CommandParameterInfo colorControlmoveToHuedirectionCommandParameterInfo = - new CommandParameterInfo("direction", int.class); + new CommandParameterInfo("direction", Integer.class); colorControlmoveToHueCommandParams.put( "direction", colorControlmoveToHuedirectionCommandParameterInfo); CommandParameterInfo colorControlmoveToHuetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlmoveToHueCommandParams.put( "transitionTime", colorControlmoveToHuetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlmoveToHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveToHueCommandParams.put( "optionsMask", colorControlmoveToHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveToHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveToHueCommandParams.put( "optionsOverride", colorControlmoveToHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveToHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6026,31 +5824,30 @@ public Map> getCommandMap() { Map colorControlmoveToHueAndSaturationCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveToHueAndSaturationhueCommandParameterInfo = - new CommandParameterInfo("hue", int.class); + new CommandParameterInfo("hue", Integer.class); colorControlmoveToHueAndSaturationCommandParams.put( "hue", colorControlmoveToHueAndSaturationhueCommandParameterInfo); CommandParameterInfo colorControlmoveToHueAndSaturationsaturationCommandParameterInfo = - new CommandParameterInfo("saturation", int.class); + new CommandParameterInfo("saturation", Integer.class); colorControlmoveToHueAndSaturationCommandParams.put( "saturation", colorControlmoveToHueAndSaturationsaturationCommandParameterInfo); CommandParameterInfo colorControlmoveToHueAndSaturationtransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlmoveToHueAndSaturationCommandParams.put( "transitionTime", colorControlmoveToHueAndSaturationtransitionTimeCommandParameterInfo); CommandParameterInfo colorControlmoveToHueAndSaturationoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveToHueAndSaturationCommandParams.put( "optionsMask", colorControlmoveToHueAndSaturationoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveToHueAndSaturationoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveToHueAndSaturationCommandParams.put( "optionsOverride", colorControlmoveToHueAndSaturationoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveToHueAndSaturationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6070,26 +5867,25 @@ public Map> getCommandMap() { Map colorControlmoveToSaturationCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlmoveToSaturationsaturationCommandParameterInfo = - new CommandParameterInfo("saturation", int.class); + new CommandParameterInfo("saturation", Integer.class); colorControlmoveToSaturationCommandParams.put( "saturation", colorControlmoveToSaturationsaturationCommandParameterInfo); CommandParameterInfo colorControlmoveToSaturationtransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlmoveToSaturationCommandParams.put( "transitionTime", colorControlmoveToSaturationtransitionTimeCommandParameterInfo); CommandParameterInfo colorControlmoveToSaturationoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlmoveToSaturationCommandParams.put( "optionsMask", colorControlmoveToSaturationoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlmoveToSaturationoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlmoveToSaturationCommandParams.put( "optionsOverride", colorControlmoveToSaturationoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlmoveToSaturationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6108,29 +5904,28 @@ public Map> getCommandMap() { Map colorControlstepColorCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstepColorstepXCommandParameterInfo = - new CommandParameterInfo("stepX", int.class); + new CommandParameterInfo("stepX", Integer.class); colorControlstepColorCommandParams.put("stepX", colorControlstepColorstepXCommandParameterInfo); CommandParameterInfo colorControlstepColorstepYCommandParameterInfo = - new CommandParameterInfo("stepY", int.class); + new CommandParameterInfo("stepY", Integer.class); colorControlstepColorCommandParams.put("stepY", colorControlstepColorstepYCommandParameterInfo); CommandParameterInfo colorControlstepColortransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlstepColorCommandParams.put( "transitionTime", colorControlstepColortransitionTimeCommandParameterInfo); CommandParameterInfo colorControlstepColoroptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlstepColorCommandParams.put( "optionsMask", colorControlstepColoroptionsMaskCommandParameterInfo); CommandParameterInfo colorControlstepColoroptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlstepColorCommandParams.put( "optionsOverride", colorControlstepColoroptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlstepColorInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6149,45 +5944,44 @@ public Map> getCommandMap() { Map colorControlstepColorTemperatureCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstepColorTemperaturestepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); colorControlstepColorTemperatureCommandParams.put( "stepMode", colorControlstepColorTemperaturestepModeCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperaturestepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); colorControlstepColorTemperatureCommandParams.put( "stepSize", colorControlstepColorTemperaturestepSizeCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperaturetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlstepColorTemperatureCommandParams.put( "transitionTime", colorControlstepColorTemperaturetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMinimumCommandParameterInfo = - new CommandParameterInfo("colorTemperatureMinimum", int.class); + new CommandParameterInfo("colorTemperatureMinimum", Integer.class); colorControlstepColorTemperatureCommandParams.put( "colorTemperatureMinimum", colorControlstepColorTemperaturecolorTemperatureMinimumCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMaximumCommandParameterInfo = - new CommandParameterInfo("colorTemperatureMaximum", int.class); + new CommandParameterInfo("colorTemperatureMaximum", Integer.class); colorControlstepColorTemperatureCommandParams.put( "colorTemperatureMaximum", colorControlstepColorTemperaturecolorTemperatureMaximumCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperatureoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlstepColorTemperatureCommandParams.put( "optionsMask", colorControlstepColorTemperatureoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlstepColorTemperatureCommandParams.put( "optionsOverride", colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlstepColorTemperatureInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6209,31 +6003,30 @@ public Map> getCommandMap() { Map colorControlstepHueCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstepHuestepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); colorControlstepHueCommandParams.put( "stepMode", colorControlstepHuestepModeCommandParameterInfo); CommandParameterInfo colorControlstepHuestepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); colorControlstepHueCommandParams.put( "stepSize", colorControlstepHuestepSizeCommandParameterInfo); CommandParameterInfo colorControlstepHuetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlstepHueCommandParams.put( "transitionTime", colorControlstepHuetransitionTimeCommandParameterInfo); CommandParameterInfo colorControlstepHueoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlstepHueCommandParams.put( "optionsMask", colorControlstepHueoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlstepHueoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlstepHueCommandParams.put( "optionsOverride", colorControlstepHueoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlstepHueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6252,31 +6045,30 @@ public Map> getCommandMap() { Map colorControlstepSaturationCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstepSaturationstepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); colorControlstepSaturationCommandParams.put( "stepMode", colorControlstepSaturationstepModeCommandParameterInfo); CommandParameterInfo colorControlstepSaturationstepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); colorControlstepSaturationCommandParams.put( "stepSize", colorControlstepSaturationstepSizeCommandParameterInfo); CommandParameterInfo colorControlstepSaturationtransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); colorControlstepSaturationCommandParams.put( "transitionTime", colorControlstepSaturationtransitionTimeCommandParameterInfo); CommandParameterInfo colorControlstepSaturationoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlstepSaturationCommandParams.put( "optionsMask", colorControlstepSaturationoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlstepSaturationoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlstepSaturationCommandParams.put( "optionsOverride", colorControlstepSaturationoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlstepSaturationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6296,16 +6088,15 @@ public Map> getCommandMap() { Map colorControlstopMoveStepCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstopMoveStepoptionsMaskCommandParameterInfo = - new CommandParameterInfo("optionsMask", int.class); + new CommandParameterInfo("optionsMask", Integer.class); colorControlstopMoveStepCommandParams.put( "optionsMask", colorControlstopMoveStepoptionsMaskCommandParameterInfo); CommandParameterInfo colorControlstopMoveStepoptionsOverrideCommandParameterInfo = - new CommandParameterInfo("optionsOverride", int.class); + new CommandParameterInfo("optionsOverride", Integer.class); colorControlstopMoveStepCommandParams.put( "optionsOverride", colorControlstopMoveStepoptionsOverrideCommandParameterInfo); - // Populate commands InteractionInfo colorControlstopMoveStepInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6324,7 +6115,7 @@ public Map> getCommandMap() { Map contentLauncherlaunchContentRequestCommandParams = new LinkedHashMap(); CommandParameterInfo contentLauncherlaunchContentRequestautoPlayCommandParameterInfo = - new CommandParameterInfo("autoPlay", boolean.class); + new CommandParameterInfo("autoPlay", Boolean.class); contentLauncherlaunchContentRequestCommandParams.put( "autoPlay", contentLauncherlaunchContentRequestautoPlayCommandParameterInfo); @@ -6333,7 +6124,6 @@ public Map> getCommandMap() { contentLauncherlaunchContentRequestCommandParams.put( "data", contentLauncherlaunchContentRequestdataCommandParameterInfo); - // Populate commands InteractionInfo contentLauncherlaunchContentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6341,7 +6131,9 @@ public Map> getCommandMap() { .launchContentRequest( (ChipClusters.ContentLauncherCluster.LaunchResponseCallback) callback, (Boolean) commandArguments.get("autoPlay"), - (String) commandArguments.get("data")); + (String) commandArguments.get("data"), + (ArrayList) + commandArguments.get("search")); }, () -> new DelegatedLaunchResponseCallback(), contentLauncherlaunchContentRequestCommandParams); @@ -6359,12 +6151,6 @@ public Map> getCommandMap() { contentLauncherlaunchURLRequestCommandParams.put( "displayString", contentLauncherlaunchURLRequestdisplayStringCommandParameterInfo); - CommandParameterInfo contentLauncherlaunchURLRequestproviderNameCommandParameterInfo = - new CommandParameterInfo("providerName", String.class); - contentLauncherlaunchURLRequestCommandParams.put( - "providerName", contentLauncherlaunchURLRequestproviderNameCommandParameterInfo); - - // Populate commands InteractionInfo contentLauncherlaunchURLRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6373,7 +6159,8 @@ public Map> getCommandMap() { (ChipClusters.ContentLauncherCluster.LaunchResponseCallback) callback, (String) commandArguments.get("contentURL"), (String) commandArguments.get("displayString"), - (String) commandArguments.get("providerName")); + (ChipStructs.ContentLauncherClusterBrandingInformation) + commandArguments.get("brandingInformation")); }, () -> new DelegatedLaunchResponseCallback(), contentLauncherlaunchURLRequestCommandParams); @@ -6386,12 +6173,12 @@ public Map> getCommandMap() { Map diagnosticLogsretrieveLogsRequestCommandParams = new LinkedHashMap(); CommandParameterInfo diagnosticLogsretrieveLogsRequestintentCommandParameterInfo = - new CommandParameterInfo("intent", int.class); + new CommandParameterInfo("intent", Integer.class); diagnosticLogsretrieveLogsRequestCommandParams.put( "intent", diagnosticLogsretrieveLogsRequestintentCommandParameterInfo); CommandParameterInfo diagnosticLogsretrieveLogsRequestrequestedProtocolCommandParameterInfo = - new CommandParameterInfo("requestedProtocol", int.class); + new CommandParameterInfo("requestedProtocol", Integer.class); diagnosticLogsretrieveLogsRequestCommandParams.put( "requestedProtocol", diagnosticLogsretrieveLogsRequestrequestedProtocolCommandParameterInfo); @@ -6403,7 +6190,6 @@ public Map> getCommandMap() { "transferFileDesignator", diagnosticLogsretrieveLogsRequesttransferFileDesignatorCommandParameterInfo); - // Populate commands InteractionInfo diagnosticLogsretrieveLogsRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6422,25 +6208,13 @@ public Map> getCommandMap() { Map doorLockClusterInteractionInfoMap = new LinkedHashMap<>(); Map doorLockclearCredentialCommandParams = new LinkedHashMap(); - CommandParameterInfo doorLockclearCredentialcredentialTypeCommandParameterInfo = - new CommandParameterInfo("credentialType", int.class); - doorLockclearCredentialCommandParams.put( - "credentialType", doorLockclearCredentialcredentialTypeCommandParameterInfo); - - CommandParameterInfo doorLockclearCredentialcredentialIndexCommandParameterInfo = - new CommandParameterInfo("credentialIndex", int.class); - doorLockclearCredentialCommandParams.put( - "credentialIndex", doorLockclearCredentialcredentialIndexCommandParameterInfo); - - // Populate commands InteractionInfo doorLockclearCredentialInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DoorLockCluster) cluster) .clearCredential( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("credentialType"), - (Integer) commandArguments.get("credentialIndex")); + (ChipStructs.DoorLockClusterDlCredential) commandArguments.get("credential")); }, () -> new DelegatedDefaultClusterCallback(), doorLockclearCredentialCommandParams); @@ -6449,10 +6223,9 @@ public Map> getCommandMap() { Map doorLockclearUserCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockclearUseruserIndexCommandParameterInfo = - new CommandParameterInfo("userIndex", int.class); + new CommandParameterInfo("userIndex", Integer.class); doorLockclearUserCommandParams.put("userIndex", doorLockclearUseruserIndexCommandParameterInfo); - // Populate commands InteractionInfo doorLockclearUserInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6466,25 +6239,13 @@ public Map> getCommandMap() { doorLockClusterInteractionInfoMap.put("clearUser", doorLockclearUserInteractionInfo); Map doorLockgetCredentialStatusCommandParams = new LinkedHashMap(); - CommandParameterInfo doorLockgetCredentialStatuscredentialTypeCommandParameterInfo = - new CommandParameterInfo("credentialType", int.class); - doorLockgetCredentialStatusCommandParams.put( - "credentialType", doorLockgetCredentialStatuscredentialTypeCommandParameterInfo); - - CommandParameterInfo doorLockgetCredentialStatuscredentialIndexCommandParameterInfo = - new CommandParameterInfo("credentialIndex", int.class); - doorLockgetCredentialStatusCommandParams.put( - "credentialIndex", doorLockgetCredentialStatuscredentialIndexCommandParameterInfo); - - // Populate commands InteractionInfo doorLockgetCredentialStatusInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DoorLockCluster) cluster) .getCredentialStatus( (ChipClusters.DoorLockCluster.GetCredentialStatusResponseCallback) callback, - (Integer) commandArguments.get("credentialType"), - (Integer) commandArguments.get("credentialIndex")); + (ChipStructs.DoorLockClusterDlCredential) commandArguments.get("credential")); }, () -> new DelegatedGetCredentialStatusResponseCallback(), doorLockgetCredentialStatusCommandParams); @@ -6493,10 +6254,9 @@ public Map> getCommandMap() { Map doorLockgetUserCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockgetUseruserIndexCommandParameterInfo = - new CommandParameterInfo("userIndex", int.class); + new CommandParameterInfo("userIndex", Integer.class); doorLockgetUserCommandParams.put("userIndex", doorLockgetUseruserIndexCommandParameterInfo); - // Populate commands InteractionInfo doorLockgetUserInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6511,10 +6271,9 @@ public Map> getCommandMap() { Map doorLocklockDoorCommandParams = new LinkedHashMap(); CommandParameterInfo doorLocklockDoorpinCodeCommandParameterInfo = - new CommandParameterInfo("pinCode", byte[].class); + new CommandParameterInfo("pinCode", Optional.class); doorLocklockDoorCommandParams.put("pinCode", doorLocklockDoorpinCodeCommandParameterInfo); - // Populate commands InteractionInfo doorLocklockDoorInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6529,36 +6288,25 @@ public Map> getCommandMap() { Map doorLocksetCredentialCommandParams = new LinkedHashMap(); CommandParameterInfo doorLocksetCredentialoperationTypeCommandParameterInfo = - new CommandParameterInfo("operationType", int.class); + new CommandParameterInfo("operationType", Integer.class); doorLocksetCredentialCommandParams.put( "operationType", doorLocksetCredentialoperationTypeCommandParameterInfo); - CommandParameterInfo doorLocksetCredentialcredentialTypeCommandParameterInfo = - new CommandParameterInfo("credentialType", int.class); - doorLocksetCredentialCommandParams.put( - "credentialType", doorLocksetCredentialcredentialTypeCommandParameterInfo); - - CommandParameterInfo doorLocksetCredentialcredentialIndexCommandParameterInfo = - new CommandParameterInfo("credentialIndex", int.class); - doorLocksetCredentialCommandParams.put( - "credentialIndex", doorLocksetCredentialcredentialIndexCommandParameterInfo); - CommandParameterInfo doorLocksetCredentialcredentialDataCommandParameterInfo = new CommandParameterInfo("credentialData", byte[].class); doorLocksetCredentialCommandParams.put( "credentialData", doorLocksetCredentialcredentialDataCommandParameterInfo); CommandParameterInfo doorLocksetCredentialuserIndexCommandParameterInfo = - new CommandParameterInfo("userIndex", int.class); + new CommandParameterInfo("userIndex", Integer.class); doorLocksetCredentialCommandParams.put( "userIndex", doorLocksetCredentialuserIndexCommandParameterInfo); CommandParameterInfo doorLocksetCredentialuserStatusCommandParameterInfo = - new CommandParameterInfo("userStatus", int.class); + new CommandParameterInfo("userStatus", Integer.class); doorLocksetCredentialCommandParams.put( "userStatus", doorLocksetCredentialuserStatusCommandParameterInfo); - // Populate commands InteractionInfo doorLocksetCredentialInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6566,8 +6314,7 @@ public Map> getCommandMap() { .setCredential( (ChipClusters.DoorLockCluster.SetCredentialResponseCallback) callback, (Integer) commandArguments.get("operationType"), - (Integer) commandArguments.get("credentialType"), - (Integer) commandArguments.get("credentialIndex"), + (ChipStructs.DoorLockClusterDlCredential) commandArguments.get("credential"), (byte[]) commandArguments.get("credentialData"), (Integer) commandArguments.get("userIndex"), (Integer) commandArguments.get("userStatus")); @@ -6578,12 +6325,12 @@ public Map> getCommandMap() { Map doorLocksetUserCommandParams = new LinkedHashMap(); CommandParameterInfo doorLocksetUseroperationTypeCommandParameterInfo = - new CommandParameterInfo("operationType", int.class); + new CommandParameterInfo("operationType", Integer.class); doorLocksetUserCommandParams.put( "operationType", doorLocksetUseroperationTypeCommandParameterInfo); CommandParameterInfo doorLocksetUseruserIndexCommandParameterInfo = - new CommandParameterInfo("userIndex", int.class); + new CommandParameterInfo("userIndex", Integer.class); doorLocksetUserCommandParams.put("userIndex", doorLocksetUseruserIndexCommandParameterInfo); CommandParameterInfo doorLocksetUseruserNameCommandParameterInfo = @@ -6591,24 +6338,23 @@ public Map> getCommandMap() { doorLocksetUserCommandParams.put("userName", doorLocksetUseruserNameCommandParameterInfo); CommandParameterInfo doorLocksetUseruserUniqueIdCommandParameterInfo = - new CommandParameterInfo("userUniqueId", long.class); + new CommandParameterInfo("userUniqueId", Long.class); doorLocksetUserCommandParams.put( "userUniqueId", doorLocksetUseruserUniqueIdCommandParameterInfo); CommandParameterInfo doorLocksetUseruserStatusCommandParameterInfo = - new CommandParameterInfo("userStatus", int.class); + new CommandParameterInfo("userStatus", Integer.class); doorLocksetUserCommandParams.put("userStatus", doorLocksetUseruserStatusCommandParameterInfo); CommandParameterInfo doorLocksetUseruserTypeCommandParameterInfo = - new CommandParameterInfo("userType", int.class); + new CommandParameterInfo("userType", Integer.class); doorLocksetUserCommandParams.put("userType", doorLocksetUseruserTypeCommandParameterInfo); CommandParameterInfo doorLocksetUsercredentialRuleCommandParameterInfo = - new CommandParameterInfo("credentialRule", int.class); + new CommandParameterInfo("credentialRule", Integer.class); doorLocksetUserCommandParams.put( "credentialRule", doorLocksetUsercredentialRuleCommandParameterInfo); - // Populate commands InteractionInfo doorLocksetUserInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6629,10 +6375,9 @@ public Map> getCommandMap() { Map doorLockunlockDoorCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockunlockDoorpinCodeCommandParameterInfo = - new CommandParameterInfo("pinCode", byte[].class); + new CommandParameterInfo("pinCode", Optional.class); doorLockunlockDoorCommandParams.put("pinCode", doorLockunlockDoorpinCodeCommandParameterInfo); - // Populate commands InteractionInfo doorLockunlockDoorInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6652,7 +6397,6 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map ethernetNetworkDiagnosticsresetCountsCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo ethernetNetworkDiagnosticsresetCountsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6674,22 +6418,21 @@ public Map> getCommandMap() { Map generalCommissioningarmFailSafeCommandParams = new LinkedHashMap(); CommandParameterInfo generalCommissioningarmFailSafeexpiryLengthSecondsCommandParameterInfo = - new CommandParameterInfo("expiryLengthSeconds", int.class); + new CommandParameterInfo("expiryLengthSeconds", Integer.class); generalCommissioningarmFailSafeCommandParams.put( "expiryLengthSeconds", generalCommissioningarmFailSafeexpiryLengthSecondsCommandParameterInfo); CommandParameterInfo generalCommissioningarmFailSafebreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); generalCommissioningarmFailSafeCommandParams.put( "breadcrumb", generalCommissioningarmFailSafebreadcrumbCommandParameterInfo); CommandParameterInfo generalCommissioningarmFailSafetimeoutMsCommandParameterInfo = - new CommandParameterInfo("timeoutMs", long.class); + new CommandParameterInfo("timeoutMs", Long.class); generalCommissioningarmFailSafeCommandParams.put( "timeoutMs", generalCommissioningarmFailSafetimeoutMsCommandParameterInfo); - // Populate commands InteractionInfo generalCommissioningarmFailSafeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6707,7 +6450,6 @@ public Map> getCommandMap() { "armFailSafe", generalCommissioningarmFailSafeInteractionInfo); Map generalCommissioningcommissioningCompleteCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo generalCommissioningcommissioningCompleteInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6724,7 +6466,7 @@ public Map> getCommandMap() { Map generalCommissioningsetRegulatoryConfigCommandParams = new LinkedHashMap(); CommandParameterInfo generalCommissioningsetRegulatoryConfiglocationCommandParameterInfo = - new CommandParameterInfo("location", int.class); + new CommandParameterInfo("location", Integer.class); generalCommissioningsetRegulatoryConfigCommandParams.put( "location", generalCommissioningsetRegulatoryConfiglocationCommandParameterInfo); @@ -6734,16 +6476,15 @@ public Map> getCommandMap() { "countryCode", generalCommissioningsetRegulatoryConfigcountryCodeCommandParameterInfo); CommandParameterInfo generalCommissioningsetRegulatoryConfigbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); generalCommissioningsetRegulatoryConfigCommandParams.put( "breadcrumb", generalCommissioningsetRegulatoryConfigbreadcrumbCommandParameterInfo); CommandParameterInfo generalCommissioningsetRegulatoryConfigtimeoutMsCommandParameterInfo = - new CommandParameterInfo("timeoutMs", long.class); + new CommandParameterInfo("timeoutMs", Long.class); generalCommissioningsetRegulatoryConfigCommandParams.put( "timeoutMs", generalCommissioningsetRegulatoryConfigtimeoutMsCommandParameterInfo); - // Populate commands InteractionInfo generalCommissioningsetRegulatoryConfigInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6769,11 +6510,10 @@ public Map> getCommandMap() { Map groupKeyManagementkeySetReadCommandParams = new LinkedHashMap(); CommandParameterInfo groupKeyManagementkeySetReadgroupKeySetIDCommandParameterInfo = - new CommandParameterInfo("groupKeySetID", int.class); + new CommandParameterInfo("groupKeySetID", Integer.class); groupKeyManagementkeySetReadCommandParams.put( "groupKeySetID", groupKeyManagementkeySetReadgroupKeySetIDCommandParameterInfo); - // Populate commands InteractionInfo groupKeyManagementkeySetReadInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6789,11 +6529,10 @@ public Map> getCommandMap() { Map groupKeyManagementkeySetReadAllIndicesCommandParams = new LinkedHashMap(); CommandParameterInfo groupKeyManagementkeySetReadAllIndicesgroupKeySetIDsCommandParameterInfo = - new CommandParameterInfo("groupKeySetIDs", int.class); + new CommandParameterInfo("groupKeySetIDs", ArrayList.class); groupKeyManagementkeySetReadAllIndicesCommandParams.put( "groupKeySetIDs", groupKeyManagementkeySetReadAllIndicesgroupKeySetIDsCommandParameterInfo); - // Populate commands InteractionInfo groupKeyManagementkeySetReadAllIndicesInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6801,7 +6540,7 @@ public Map> getCommandMap() { .keySetReadAllIndices( (ChipClusters.GroupKeyManagementCluster.KeySetReadAllIndicesResponseCallback) callback, - (Integer) commandArguments.get("groupKeySetIDs")); + (ArrayList) commandArguments.get("groupKeySetIDs")); }, () -> new DelegatedKeySetReadAllIndicesResponseCallback(), groupKeyManagementkeySetReadAllIndicesCommandParams); @@ -6810,11 +6549,10 @@ public Map> getCommandMap() { Map groupKeyManagementkeySetRemoveCommandParams = new LinkedHashMap(); CommandParameterInfo groupKeyManagementkeySetRemovegroupKeySetIDCommandParameterInfo = - new CommandParameterInfo("groupKeySetID", int.class); + new CommandParameterInfo("groupKeySetID", Integer.class); groupKeyManagementkeySetRemoveCommandParams.put( "groupKeySetID", groupKeyManagementkeySetRemovegroupKeySetIDCommandParameterInfo); - // Populate commands InteractionInfo groupKeyManagementkeySetRemoveInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6829,61 +6567,14 @@ public Map> getCommandMap() { "keySetRemove", groupKeyManagementkeySetRemoveInteractionInfo); Map groupKeyManagementkeySetWriteCommandParams = new LinkedHashMap(); - CommandParameterInfo groupKeyManagementkeySetWritegroupKeySetIDCommandParameterInfo = - new CommandParameterInfo("groupKeySetID", int.class); - groupKeyManagementkeySetWriteCommandParams.put( - "groupKeySetID", groupKeyManagementkeySetWritegroupKeySetIDCommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWritesecurityPolicyCommandParameterInfo = - new CommandParameterInfo("securityPolicy", int.class); - groupKeyManagementkeySetWriteCommandParams.put( - "securityPolicy", groupKeyManagementkeySetWritesecurityPolicyCommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochKey0CommandParameterInfo = - new CommandParameterInfo("epochKey0", byte[].class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochKey0", groupKeyManagementkeySetWriteepochKey0CommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochStartTime0CommandParameterInfo = - new CommandParameterInfo("epochStartTime0", long.class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochStartTime0", groupKeyManagementkeySetWriteepochStartTime0CommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochKey1CommandParameterInfo = - new CommandParameterInfo("epochKey1", byte[].class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochKey1", groupKeyManagementkeySetWriteepochKey1CommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochStartTime1CommandParameterInfo = - new CommandParameterInfo("epochStartTime1", long.class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochStartTime1", groupKeyManagementkeySetWriteepochStartTime1CommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochKey2CommandParameterInfo = - new CommandParameterInfo("epochKey2", byte[].class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochKey2", groupKeyManagementkeySetWriteepochKey2CommandParameterInfo); - - CommandParameterInfo groupKeyManagementkeySetWriteepochStartTime2CommandParameterInfo = - new CommandParameterInfo("epochStartTime2", long.class); - groupKeyManagementkeySetWriteCommandParams.put( - "epochStartTime2", groupKeyManagementkeySetWriteepochStartTime2CommandParameterInfo); - - // Populate commands InteractionInfo groupKeyManagementkeySetWriteInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.GroupKeyManagementCluster) cluster) .keySetWrite( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("groupKeySetID"), - (Integer) commandArguments.get("securityPolicy"), - (byte[]) commandArguments.get("epochKey0"), - (Long) commandArguments.get("epochStartTime0"), - (byte[]) commandArguments.get("epochKey1"), - (Long) commandArguments.get("epochStartTime1"), - (byte[]) commandArguments.get("epochKey2"), - (Long) commandArguments.get("epochStartTime2")); + (ChipStructs.GroupKeyManagementClusterGroupKeySet) + commandArguments.get("groupKeySet")); }, () -> new DelegatedDefaultClusterCallback(), groupKeyManagementkeySetWriteCommandParams); @@ -6894,14 +6585,13 @@ public Map> getCommandMap() { Map groupsaddGroupCommandParams = new LinkedHashMap(); CommandParameterInfo groupsaddGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); groupsaddGroupCommandParams.put("groupId", groupsaddGroupgroupIdCommandParameterInfo); CommandParameterInfo groupsaddGroupgroupNameCommandParameterInfo = new CommandParameterInfo("groupName", String.class); groupsaddGroupCommandParams.put("groupName", groupsaddGroupgroupNameCommandParameterInfo); - // Populate commands InteractionInfo groupsaddGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6917,7 +6607,7 @@ public Map> getCommandMap() { Map groupsaddGroupIfIdentifyingCommandParams = new LinkedHashMap(); CommandParameterInfo groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); groupsaddGroupIfIdentifyingCommandParams.put( "groupId", groupsaddGroupIfIdentifyinggroupIdCommandParameterInfo); @@ -6926,7 +6616,6 @@ public Map> getCommandMap() { groupsaddGroupIfIdentifyingCommandParams.put( "groupName", groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo); - // Populate commands InteractionInfo groupsaddGroupIfIdentifyingInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6943,18 +6632,17 @@ public Map> getCommandMap() { Map groupsgetGroupMembershipCommandParams = new LinkedHashMap(); CommandParameterInfo groupsgetGroupMembershipgroupListCommandParameterInfo = - new CommandParameterInfo("groupList", int.class); + new CommandParameterInfo("groupList", ArrayList.class); groupsgetGroupMembershipCommandParams.put( "groupList", groupsgetGroupMembershipgroupListCommandParameterInfo); - // Populate commands InteractionInfo groupsgetGroupMembershipInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.GroupsCluster) cluster) .getGroupMembership( (ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback) callback, - (Integer) commandArguments.get("groupList")); + (ArrayList) commandArguments.get("groupList")); }, () -> new DelegatedGetGroupMembershipResponseCallback(), groupsgetGroupMembershipCommandParams); @@ -6962,7 +6650,6 @@ public Map> getCommandMap() { "getGroupMembership", groupsgetGroupMembershipInteractionInfo); Map groupsremoveAllGroupsCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo groupsremoveAllGroupsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6975,10 +6662,9 @@ public Map> getCommandMap() { Map groupsremoveGroupCommandParams = new LinkedHashMap(); CommandParameterInfo groupsremoveGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); groupsremoveGroupCommandParams.put("groupId", groupsremoveGroupgroupIdCommandParameterInfo); - // Populate commands InteractionInfo groupsremoveGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6993,10 +6679,9 @@ public Map> getCommandMap() { Map groupsviewGroupCommandParams = new LinkedHashMap(); CommandParameterInfo groupsviewGroupgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); groupsviewGroupCommandParams.put("groupId", groupsviewGroupgroupIdCommandParameterInfo); - // Populate commands InteractionInfo groupsviewGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7013,11 +6698,10 @@ public Map> getCommandMap() { Map identifyidentifyCommandParams = new LinkedHashMap(); CommandParameterInfo identifyidentifyidentifyTimeCommandParameterInfo = - new CommandParameterInfo("identifyTime", int.class); + new CommandParameterInfo("identifyTime", Integer.class); identifyidentifyCommandParams.put( "identifyTime", identifyidentifyidentifyTimeCommandParameterInfo); - // Populate commands InteractionInfo identifyidentifyInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7031,7 +6715,6 @@ public Map> getCommandMap() { identifyClusterInteractionInfoMap.put("identify", identifyidentifyInteractionInfo); Map identifyidentifyQueryCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo identifyidentifyQueryInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7045,16 +6728,15 @@ public Map> getCommandMap() { Map identifytriggerEffectCommandParams = new LinkedHashMap(); CommandParameterInfo identifytriggerEffecteffectIdentifierCommandParameterInfo = - new CommandParameterInfo("effectIdentifier", int.class); + new CommandParameterInfo("effectIdentifier", Integer.class); identifytriggerEffectCommandParams.put( "effectIdentifier", identifytriggerEffecteffectIdentifierCommandParameterInfo); CommandParameterInfo identifytriggerEffecteffectVariantCommandParameterInfo = - new CommandParameterInfo("effectVariant", int.class); + new CommandParameterInfo("effectVariant", Integer.class); identifytriggerEffectCommandParams.put( "effectVariant", identifytriggerEffecteffectVariantCommandParameterInfo); - // Populate commands InteractionInfo identifytriggerEffectInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7075,11 +6757,10 @@ public Map> getCommandMap() { Map keypadInputsendKeyRequestCommandParams = new LinkedHashMap(); CommandParameterInfo keypadInputsendKeyRequestkeyCodeCommandParameterInfo = - new CommandParameterInfo("keyCode", int.class); + new CommandParameterInfo("keyCode", Integer.class); keypadInputsendKeyRequestCommandParams.put( "keyCode", keypadInputsendKeyRequestkeyCodeCommandParameterInfo); - // Populate commands InteractionInfo keypadInputsendKeyRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7097,23 +6778,22 @@ public Map> getCommandMap() { Map levelControlmoveCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlmovemoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); levelControlmoveCommandParams.put("moveMode", levelControlmovemoveModeCommandParameterInfo); CommandParameterInfo levelControlmoverateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); levelControlmoveCommandParams.put("rate", levelControlmoverateCommandParameterInfo); CommandParameterInfo levelControlmoveoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", int.class); + new CommandParameterInfo("optionMask", Integer.class); levelControlmoveCommandParams.put("optionMask", levelControlmoveoptionMaskCommandParameterInfo); CommandParameterInfo levelControlmoveoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", int.class); + new CommandParameterInfo("optionOverride", Integer.class); levelControlmoveCommandParams.put( "optionOverride", levelControlmoveoptionOverrideCommandParameterInfo); - // Populate commands InteractionInfo levelControlmoveInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7131,26 +6811,25 @@ public Map> getCommandMap() { Map levelControlmoveToLevelCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlmoveToLevellevelCommandParameterInfo = - new CommandParameterInfo("level", int.class); + new CommandParameterInfo("level", Integer.class); levelControlmoveToLevelCommandParams.put( "level", levelControlmoveToLevellevelCommandParameterInfo); CommandParameterInfo levelControlmoveToLeveltransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); levelControlmoveToLevelCommandParams.put( "transitionTime", levelControlmoveToLeveltransitionTimeCommandParameterInfo); CommandParameterInfo levelControlmoveToLeveloptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", int.class); + new CommandParameterInfo("optionMask", Integer.class); levelControlmoveToLevelCommandParams.put( "optionMask", levelControlmoveToLeveloptionMaskCommandParameterInfo); CommandParameterInfo levelControlmoveToLeveloptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", int.class); + new CommandParameterInfo("optionOverride", Integer.class); levelControlmoveToLevelCommandParams.put( "optionOverride", levelControlmoveToLeveloptionOverrideCommandParameterInfo); - // Populate commands InteractionInfo levelControlmoveToLevelInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7169,16 +6848,15 @@ public Map> getCommandMap() { Map levelControlmoveToLevelWithOnOffCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlmoveToLevelWithOnOfflevelCommandParameterInfo = - new CommandParameterInfo("level", int.class); + new CommandParameterInfo("level", Integer.class); levelControlmoveToLevelWithOnOffCommandParams.put( "level", levelControlmoveToLevelWithOnOfflevelCommandParameterInfo); CommandParameterInfo levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); levelControlmoveToLevelWithOnOffCommandParams.put( "transitionTime", levelControlmoveToLevelWithOnOfftransitionTimeCommandParameterInfo); - // Populate commands InteractionInfo levelControlmoveToLevelWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7195,16 +6873,15 @@ public Map> getCommandMap() { Map levelControlmoveWithOnOffCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlmoveWithOnOffmoveModeCommandParameterInfo = - new CommandParameterInfo("moveMode", int.class); + new CommandParameterInfo("moveMode", Integer.class); levelControlmoveWithOnOffCommandParams.put( "moveMode", levelControlmoveWithOnOffmoveModeCommandParameterInfo); CommandParameterInfo levelControlmoveWithOnOffrateCommandParameterInfo = - new CommandParameterInfo("rate", int.class); + new CommandParameterInfo("rate", Integer.class); levelControlmoveWithOnOffCommandParams.put( "rate", levelControlmoveWithOnOffrateCommandParameterInfo); - // Populate commands InteractionInfo levelControlmoveWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7221,28 +6898,27 @@ public Map> getCommandMap() { Map levelControlstepCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlstepstepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); levelControlstepCommandParams.put("stepMode", levelControlstepstepModeCommandParameterInfo); CommandParameterInfo levelControlstepstepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); levelControlstepCommandParams.put("stepSize", levelControlstepstepSizeCommandParameterInfo); CommandParameterInfo levelControlsteptransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); levelControlstepCommandParams.put( "transitionTime", levelControlsteptransitionTimeCommandParameterInfo); CommandParameterInfo levelControlstepoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", int.class); + new CommandParameterInfo("optionMask", Integer.class); levelControlstepCommandParams.put("optionMask", levelControlstepoptionMaskCommandParameterInfo); CommandParameterInfo levelControlstepoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", int.class); + new CommandParameterInfo("optionOverride", Integer.class); levelControlstepCommandParams.put( "optionOverride", levelControlstepoptionOverrideCommandParameterInfo); - // Populate commands InteractionInfo levelControlstepInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7261,21 +6937,20 @@ public Map> getCommandMap() { Map levelControlstepWithOnOffCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlstepWithOnOffstepModeCommandParameterInfo = - new CommandParameterInfo("stepMode", int.class); + new CommandParameterInfo("stepMode", Integer.class); levelControlstepWithOnOffCommandParams.put( "stepMode", levelControlstepWithOnOffstepModeCommandParameterInfo); CommandParameterInfo levelControlstepWithOnOffstepSizeCommandParameterInfo = - new CommandParameterInfo("stepSize", int.class); + new CommandParameterInfo("stepSize", Integer.class); levelControlstepWithOnOffCommandParams.put( "stepSize", levelControlstepWithOnOffstepSizeCommandParameterInfo); CommandParameterInfo levelControlstepWithOnOfftransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); levelControlstepWithOnOffCommandParams.put( "transitionTime", levelControlstepWithOnOfftransitionTimeCommandParameterInfo); - // Populate commands InteractionInfo levelControlstepWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7293,15 +6968,14 @@ public Map> getCommandMap() { Map levelControlstopCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlstopoptionMaskCommandParameterInfo = - new CommandParameterInfo("optionMask", int.class); + new CommandParameterInfo("optionMask", Integer.class); levelControlstopCommandParams.put("optionMask", levelControlstopoptionMaskCommandParameterInfo); CommandParameterInfo levelControlstopoptionOverrideCommandParameterInfo = - new CommandParameterInfo("optionOverride", int.class); + new CommandParameterInfo("optionOverride", Integer.class); levelControlstopCommandParams.put( "optionOverride", levelControlstopoptionOverrideCommandParameterInfo); - // Populate commands InteractionInfo levelControlstopInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7316,7 +6990,6 @@ public Map> getCommandMap() { levelControlClusterInteractionInfoMap.put("stop", levelControlstopInteractionInfo); Map levelControlstopWithOnOffCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo levelControlstopWithOnOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7334,7 +7007,6 @@ public Map> getCommandMap() { Map lowPowerClusterInteractionInfoMap = new LinkedHashMap<>(); Map lowPowersleepCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo lowPowersleepInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7347,7 +7019,6 @@ public Map> getCommandMap() { Map mediaInputClusterInteractionInfoMap = new LinkedHashMap<>(); Map mediaInputhideInputStatusRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaInputhideInputStatusRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7361,7 +7032,7 @@ public Map> getCommandMap() { Map mediaInputrenameInputRequestCommandParams = new LinkedHashMap(); CommandParameterInfo mediaInputrenameInputRequestindexCommandParameterInfo = - new CommandParameterInfo("index", int.class); + new CommandParameterInfo("index", Integer.class); mediaInputrenameInputRequestCommandParams.put( "index", mediaInputrenameInputRequestindexCommandParameterInfo); @@ -7370,7 +7041,6 @@ public Map> getCommandMap() { mediaInputrenameInputRequestCommandParams.put( "name", mediaInputrenameInputRequestnameCommandParameterInfo); - // Populate commands InteractionInfo mediaInputrenameInputRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7387,11 +7057,10 @@ public Map> getCommandMap() { Map mediaInputselectInputRequestCommandParams = new LinkedHashMap(); CommandParameterInfo mediaInputselectInputRequestindexCommandParameterInfo = - new CommandParameterInfo("index", int.class); + new CommandParameterInfo("index", Integer.class); mediaInputselectInputRequestCommandParams.put( "index", mediaInputselectInputRequestindexCommandParameterInfo); - // Populate commands InteractionInfo mediaInputselectInputRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7405,7 +7074,6 @@ public Map> getCommandMap() { "selectInputRequest", mediaInputselectInputRequestInteractionInfo); Map mediaInputshowInputStatusRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaInputshowInputStatusRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7420,7 +7088,6 @@ public Map> getCommandMap() { Map mediaPlaybackClusterInteractionInfoMap = new LinkedHashMap<>(); Map mediaPlaybackfastForwardRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackfastForwardRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7434,7 +7101,6 @@ public Map> getCommandMap() { "fastForwardRequest", mediaPlaybackfastForwardRequestInteractionInfo); Map mediaPlaybacknextRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybacknextRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7448,7 +7114,6 @@ public Map> getCommandMap() { "nextRequest", mediaPlaybacknextRequestInteractionInfo); Map mediaPlaybackpauseRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackpauseRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7462,7 +7127,6 @@ public Map> getCommandMap() { "pauseRequest", mediaPlaybackpauseRequestInteractionInfo); Map mediaPlaybackplayRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackplayRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7476,7 +7140,6 @@ public Map> getCommandMap() { "playRequest", mediaPlaybackplayRequestInteractionInfo); Map mediaPlaybackpreviousRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackpreviousRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7490,7 +7153,6 @@ public Map> getCommandMap() { "previousRequest", mediaPlaybackpreviousRequestInteractionInfo); Map mediaPlaybackrewindRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackrewindRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7505,11 +7167,10 @@ public Map> getCommandMap() { Map mediaPlaybackseekRequestCommandParams = new LinkedHashMap(); CommandParameterInfo mediaPlaybackseekRequestpositionCommandParameterInfo = - new CommandParameterInfo("position", long.class); + new CommandParameterInfo("position", Long.class); mediaPlaybackseekRequestCommandParams.put( "position", mediaPlaybackseekRequestpositionCommandParameterInfo); - // Populate commands InteractionInfo mediaPlaybackseekRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7526,12 +7187,11 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo mediaPlaybackskipBackwardRequestdeltaPositionMillisecondsCommandParameterInfo = - new CommandParameterInfo("deltaPositionMilliseconds", long.class); + new CommandParameterInfo("deltaPositionMilliseconds", Long.class); mediaPlaybackskipBackwardRequestCommandParams.put( "deltaPositionMilliseconds", mediaPlaybackskipBackwardRequestdeltaPositionMillisecondsCommandParameterInfo); - // Populate commands InteractionInfo mediaPlaybackskipBackwardRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7548,12 +7208,11 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo mediaPlaybackskipForwardRequestdeltaPositionMillisecondsCommandParameterInfo = - new CommandParameterInfo("deltaPositionMilliseconds", long.class); + new CommandParameterInfo("deltaPositionMilliseconds", Long.class); mediaPlaybackskipForwardRequestCommandParams.put( "deltaPositionMilliseconds", mediaPlaybackskipForwardRequestdeltaPositionMillisecondsCommandParameterInfo); - // Populate commands InteractionInfo mediaPlaybackskipForwardRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7568,7 +7227,6 @@ public Map> getCommandMap() { "skipForwardRequest", mediaPlaybackskipForwardRequestInteractionInfo); Map mediaPlaybackstartOverRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackstartOverRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7582,7 +7240,6 @@ public Map> getCommandMap() { "startOverRequest", mediaPlaybackstartOverRequestInteractionInfo); Map mediaPlaybackstopRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo mediaPlaybackstopRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7599,11 +7256,10 @@ public Map> getCommandMap() { Map modeSelectchangeToModeCommandParams = new LinkedHashMap(); CommandParameterInfo modeSelectchangeToModenewModeCommandParameterInfo = - new CommandParameterInfo("newMode", int.class); + new CommandParameterInfo("newMode", Integer.class); modeSelectchangeToModeCommandParams.put( "newMode", modeSelectchangeToModenewModeCommandParameterInfo); - // Populate commands InteractionInfo modeSelectchangeToModeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7628,11 +7284,10 @@ public Map> getCommandMap() { CommandParameterInfo networkCommissioningaddOrUpdateThreadNetworkbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningaddOrUpdateThreadNetworkCommandParams.put( "breadcrumb", networkCommissioningaddOrUpdateThreadNetworkbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningaddOrUpdateThreadNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7660,11 +7315,10 @@ public Map> getCommandMap() { "credentials", networkCommissioningaddOrUpdateWiFiNetworkcredentialsCommandParameterInfo); CommandParameterInfo networkCommissioningaddOrUpdateWiFiNetworkbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningaddOrUpdateWiFiNetworkCommandParams.put( "breadcrumb", networkCommissioningaddOrUpdateWiFiNetworkbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningaddOrUpdateWiFiNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7688,11 +7342,10 @@ public Map> getCommandMap() { "networkID", networkCommissioningconnectNetworknetworkIDCommandParameterInfo); CommandParameterInfo networkCommissioningconnectNetworkbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningconnectNetworkCommandParams.put( "breadcrumb", networkCommissioningconnectNetworkbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningconnectNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7715,11 +7368,10 @@ public Map> getCommandMap() { "networkID", networkCommissioningremoveNetworknetworkIDCommandParameterInfo); CommandParameterInfo networkCommissioningremoveNetworkbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningremoveNetworkCommandParams.put( "breadcrumb", networkCommissioningremoveNetworkbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningremoveNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7742,16 +7394,15 @@ public Map> getCommandMap() { "networkID", networkCommissioningreorderNetworknetworkIDCommandParameterInfo); CommandParameterInfo networkCommissioningreorderNetworknetworkIndexCommandParameterInfo = - new CommandParameterInfo("networkIndex", int.class); + new CommandParameterInfo("networkIndex", Integer.class); networkCommissioningreorderNetworkCommandParams.put( "networkIndex", networkCommissioningreorderNetworknetworkIndexCommandParameterInfo); CommandParameterInfo networkCommissioningreorderNetworkbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningreorderNetworkCommandParams.put( "breadcrumb", networkCommissioningreorderNetworkbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningreorderNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7775,11 +7426,10 @@ public Map> getCommandMap() { "ssid", networkCommissioningscanNetworksssidCommandParameterInfo); CommandParameterInfo networkCommissioningscanNetworksbreadcrumbCommandParameterInfo = - new CommandParameterInfo("breadcrumb", long.class); + new CommandParameterInfo("breadcrumb", Long.class); networkCommissioningscanNetworksCommandParams.put( "breadcrumb", networkCommissioningscanNetworksbreadcrumbCommandParameterInfo); - // Populate commands InteractionInfo networkCommissioningscanNetworksInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7806,11 +7456,10 @@ public Map> getCommandMap() { "updateToken", otaSoftwareUpdateProviderapplyUpdateRequestupdateTokenCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderapplyUpdateRequestnewVersionCommandParameterInfo = - new CommandParameterInfo("newVersion", long.class); + new CommandParameterInfo("newVersion", Long.class); otaSoftwareUpdateProviderapplyUpdateRequestCommandParams.put( "newVersion", otaSoftwareUpdateProviderapplyUpdateRequestnewVersionCommandParameterInfo); - // Populate commands InteractionInfo otaSoftwareUpdateProviderapplyUpdateRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7835,12 +7484,11 @@ public Map> getCommandMap() { CommandParameterInfo otaSoftwareUpdateProvidernotifyUpdateAppliedsoftwareVersionCommandParameterInfo = - new CommandParameterInfo("softwareVersion", long.class); + new CommandParameterInfo("softwareVersion", Long.class); otaSoftwareUpdateProvidernotifyUpdateAppliedCommandParams.put( "softwareVersion", otaSoftwareUpdateProvidernotifyUpdateAppliedsoftwareVersionCommandParameterInfo); - // Populate commands InteractionInfo otaSoftwareUpdateProvidernotifyUpdateAppliedInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7857,51 +7505,50 @@ public Map> getCommandMap() { Map otaSoftwareUpdateProviderqueryImageCommandParams = new LinkedHashMap(); CommandParameterInfo otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo = - new CommandParameterInfo("vendorId", int.class); + new CommandParameterInfo("vendorId", Integer.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "vendorId", otaSoftwareUpdateProviderqueryImagevendorIdCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo = - new CommandParameterInfo("productId", int.class); + new CommandParameterInfo("productId", Integer.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "productId", otaSoftwareUpdateProviderqueryImageproductIdCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagesoftwareVersionCommandParameterInfo = - new CommandParameterInfo("softwareVersion", long.class); + new CommandParameterInfo("softwareVersion", Long.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "softwareVersion", otaSoftwareUpdateProviderqueryImagesoftwareVersionCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImageprotocolsSupportedCommandParameterInfo = - new CommandParameterInfo("protocolsSupported", int.class); + new CommandParameterInfo("protocolsSupported", ArrayList.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "protocolsSupported", otaSoftwareUpdateProviderqueryImageprotocolsSupportedCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagehardwareVersionCommandParameterInfo = - new CommandParameterInfo("hardwareVersion", int.class); + new CommandParameterInfo("hardwareVersion", Optional.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "hardwareVersion", otaSoftwareUpdateProviderqueryImagehardwareVersionCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagelocationCommandParameterInfo = - new CommandParameterInfo("location", String.class); + new CommandParameterInfo("location", Optional.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "location", otaSoftwareUpdateProviderqueryImagelocationCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagerequestorCanConsentCommandParameterInfo = - new CommandParameterInfo("requestorCanConsent", boolean.class); + new CommandParameterInfo("requestorCanConsent", Optional.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "requestorCanConsent", otaSoftwareUpdateProviderqueryImagerequestorCanConsentCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateProviderqueryImagemetadataForProviderCommandParameterInfo = - new CommandParameterInfo("metadataForProvider", byte[].class); + new CommandParameterInfo("metadataForProvider", Optional.class); otaSoftwareUpdateProviderqueryImageCommandParams.put( "metadataForProvider", otaSoftwareUpdateProviderqueryImagemetadataForProviderCommandParameterInfo); - // Populate commands InteractionInfo otaSoftwareUpdateProviderqueryImageInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7912,7 +7559,7 @@ public Map> getCommandMap() { (Integer) commandArguments.get("vendorId"), (Integer) commandArguments.get("productId"), (Long) commandArguments.get("softwareVersion"), - (Integer) commandArguments.get("protocolsSupported"), + (ArrayList) commandArguments.get("protocolsSupported"), (Optional) commandArguments.get("hardwareVersion"), (Optional) commandArguments.get("location"), (Optional) commandArguments.get("requestorCanConsent"), @@ -7929,36 +7576,35 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProviderproviderNodeIdCommandParameterInfo = - new CommandParameterInfo("providerNodeId", long.class); + new CommandParameterInfo("providerNodeId", Long.class); otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( "providerNodeId", otaSoftwareUpdateRequestorannounceOtaProviderproviderNodeIdCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo = - new CommandParameterInfo("vendorId", int.class); + new CommandParameterInfo("vendorId", Integer.class); otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( "vendorId", otaSoftwareUpdateRequestorannounceOtaProvidervendorIdCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo = - new CommandParameterInfo("announcementReason", int.class); + new CommandParameterInfo("announcementReason", Integer.class); otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( "announcementReason", otaSoftwareUpdateRequestorannounceOtaProviderannouncementReasonCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo = - new CommandParameterInfo("metadataForNode", byte[].class); + new CommandParameterInfo("metadataForNode", Optional.class); otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( "metadataForNode", otaSoftwareUpdateRequestorannounceOtaProvidermetadataForNodeCommandParameterInfo); CommandParameterInfo otaSoftwareUpdateRequestorannounceOtaProviderendpointCommandParameterInfo = - new CommandParameterInfo("endpoint", int.class); + new CommandParameterInfo("endpoint", Integer.class); otaSoftwareUpdateRequestorannounceOtaProviderCommandParams.put( "endpoint", otaSoftwareUpdateRequestorannounceOtaProviderendpointCommandParameterInfo); - // Populate commands InteractionInfo otaSoftwareUpdateRequestorannounceOtaProviderInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7982,7 +7628,6 @@ public Map> getCommandMap() { Map onOffClusterInteractionInfoMap = new LinkedHashMap<>(); Map onOffoffCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo onOffoffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7994,15 +7639,14 @@ public Map> getCommandMap() { Map onOffoffWithEffectCommandParams = new LinkedHashMap(); CommandParameterInfo onOffoffWithEffecteffectIdCommandParameterInfo = - new CommandParameterInfo("effectId", int.class); + new CommandParameterInfo("effectId", Integer.class); onOffoffWithEffectCommandParams.put("effectId", onOffoffWithEffecteffectIdCommandParameterInfo); CommandParameterInfo onOffoffWithEffecteffectVariantCommandParameterInfo = - new CommandParameterInfo("effectVariant", int.class); + new CommandParameterInfo("effectVariant", Integer.class); onOffoffWithEffectCommandParams.put( "effectVariant", onOffoffWithEffecteffectVariantCommandParameterInfo); - // Populate commands InteractionInfo onOffoffWithEffectInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8017,7 +7661,6 @@ public Map> getCommandMap() { onOffClusterInteractionInfoMap.put("offWithEffect", onOffoffWithEffectInteractionInfo); Map onOffonCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo onOffonInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8028,7 +7671,6 @@ public Map> getCommandMap() { onOffClusterInteractionInfoMap.put("on", onOffonInteractionInfo); Map onOffonWithRecallGlobalSceneCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo onOffonWithRecallGlobalSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8042,20 +7684,19 @@ public Map> getCommandMap() { Map onOffonWithTimedOffCommandParams = new LinkedHashMap(); CommandParameterInfo onOffonWithTimedOffonOffControlCommandParameterInfo = - new CommandParameterInfo("onOffControl", int.class); + new CommandParameterInfo("onOffControl", Integer.class); onOffonWithTimedOffCommandParams.put( "onOffControl", onOffonWithTimedOffonOffControlCommandParameterInfo); CommandParameterInfo onOffonWithTimedOffonTimeCommandParameterInfo = - new CommandParameterInfo("onTime", int.class); + new CommandParameterInfo("onTime", Integer.class); onOffonWithTimedOffCommandParams.put("onTime", onOffonWithTimedOffonTimeCommandParameterInfo); CommandParameterInfo onOffonWithTimedOffoffWaitTimeCommandParameterInfo = - new CommandParameterInfo("offWaitTime", int.class); + new CommandParameterInfo("offWaitTime", Integer.class); onOffonWithTimedOffCommandParams.put( "offWaitTime", onOffonWithTimedOffoffWaitTimeCommandParameterInfo); - // Populate commands InteractionInfo onOffonWithTimedOffInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8071,7 +7712,6 @@ public Map> getCommandMap() { onOffClusterInteractionInfoMap.put("onWithTimedOff", onOffonWithTimedOffInteractionInfo); Map onOfftoggleCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo onOfftoggleInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8094,7 +7734,7 @@ public Map> getCommandMap() { "NOCValue", operationalCredentialsaddNOCNOCValueCommandParameterInfo); CommandParameterInfo operationalCredentialsaddNOCICACValueCommandParameterInfo = - new CommandParameterInfo("ICACValue", byte[].class); + new CommandParameterInfo("ICACValue", Optional.class); operationalCredentialsaddNOCCommandParams.put( "ICACValue", operationalCredentialsaddNOCICACValueCommandParameterInfo); @@ -8104,16 +7744,15 @@ public Map> getCommandMap() { "IPKValue", operationalCredentialsaddNOCIPKValueCommandParameterInfo); CommandParameterInfo operationalCredentialsaddNOCcaseAdminNodeCommandParameterInfo = - new CommandParameterInfo("caseAdminNode", long.class); + new CommandParameterInfo("caseAdminNode", Long.class); operationalCredentialsaddNOCCommandParams.put( "caseAdminNode", operationalCredentialsaddNOCcaseAdminNodeCommandParameterInfo); CommandParameterInfo operationalCredentialsaddNOCadminVendorIdCommandParameterInfo = - new CommandParameterInfo("adminVendorId", int.class); + new CommandParameterInfo("adminVendorId", Integer.class); operationalCredentialsaddNOCCommandParams.put( "adminVendorId", operationalCredentialsaddNOCadminVendorIdCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsaddNOCInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8139,7 +7778,6 @@ public Map> getCommandMap() { "rootCertificate", operationalCredentialsaddTrustedRootCertificaterootCertificateCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsaddTrustedRootCertificateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8162,7 +7800,6 @@ public Map> getCommandMap() { "attestationNonce", operationalCredentialsattestationRequestattestationNonceCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsattestationRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8180,12 +7817,11 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo operationalCredentialscertificateChainRequestcertificateTypeCommandParameterInfo = - new CommandParameterInfo("certificateType", int.class); + new CommandParameterInfo("certificateType", Integer.class); operationalCredentialscertificateChainRequestCommandParams.put( "certificateType", operationalCredentialscertificateChainRequestcertificateTypeCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialscertificateChainRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8206,7 +7842,6 @@ public Map> getCommandMap() { operationalCredentialsopCSRRequestCommandParams.put( "CSRNonce", operationalCredentialsopCSRRequestCSRNonceCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsopCSRRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8222,11 +7857,10 @@ public Map> getCommandMap() { Map operationalCredentialsremoveFabricCommandParams = new LinkedHashMap(); CommandParameterInfo operationalCredentialsremoveFabricfabricIndexCommandParameterInfo = - new CommandParameterInfo("fabricIndex", int.class); + new CommandParameterInfo("fabricIndex", Integer.class); operationalCredentialsremoveFabricCommandParams.put( "fabricIndex", operationalCredentialsremoveFabricfabricIndexCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsremoveFabricInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8249,7 +7883,6 @@ public Map> getCommandMap() { "trustedRootIdentifier", operationalCredentialsremoveTrustedRootCertificatetrustedRootIdentifierCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsremoveTrustedRootCertificateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8270,7 +7903,6 @@ public Map> getCommandMap() { operationalCredentialsupdateFabricLabelCommandParams.put( "label", operationalCredentialsupdateFabricLabellabelCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsupdateFabricLabelInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8291,11 +7923,10 @@ public Map> getCommandMap() { "NOCValue", operationalCredentialsupdateNOCNOCValueCommandParameterInfo); CommandParameterInfo operationalCredentialsupdateNOCICACValueCommandParameterInfo = - new CommandParameterInfo("ICACValue", byte[].class); + new CommandParameterInfo("ICACValue", Optional.class); operationalCredentialsupdateNOCCommandParams.put( "ICACValue", operationalCredentialsupdateNOCICACValueCommandParameterInfo); - // Populate commands InteractionInfo operationalCredentialsupdateNOCInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8330,15 +7961,15 @@ public Map> getCommandMap() { Map scenesaddSceneCommandParams = new LinkedHashMap(); CommandParameterInfo scenesaddScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesaddSceneCommandParams.put("groupId", scenesaddScenegroupIdCommandParameterInfo); CommandParameterInfo scenesaddScenesceneIdCommandParameterInfo = - new CommandParameterInfo("sceneId", int.class); + new CommandParameterInfo("sceneId", Integer.class); scenesaddSceneCommandParams.put("sceneId", scenesaddScenesceneIdCommandParameterInfo); CommandParameterInfo scenesaddScenetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); scenesaddSceneCommandParams.put( "transitionTime", scenesaddScenetransitionTimeCommandParameterInfo); @@ -8346,19 +7977,6 @@ public Map> getCommandMap() { new CommandParameterInfo("sceneName", String.class); scenesaddSceneCommandParams.put("sceneName", scenesaddScenesceneNameCommandParameterInfo); - CommandParameterInfo scenesaddSceneclusterIdCommandParameterInfo = - new CommandParameterInfo("clusterId", long.class); - scenesaddSceneCommandParams.put("clusterId", scenesaddSceneclusterIdCommandParameterInfo); - - CommandParameterInfo scenesaddScenelengthCommandParameterInfo = - new CommandParameterInfo("length", int.class); - scenesaddSceneCommandParams.put("length", scenesaddScenelengthCommandParameterInfo); - - CommandParameterInfo scenesaddScenevalueCommandParameterInfo = - new CommandParameterInfo("value", int.class); - scenesaddSceneCommandParams.put("value", scenesaddScenevalueCommandParameterInfo); - - // Populate commands InteractionInfo scenesaddSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8369,9 +7987,8 @@ public Map> getCommandMap() { (Integer) commandArguments.get("sceneId"), (Integer) commandArguments.get("transitionTime"), (String) commandArguments.get("sceneName"), - (Long) commandArguments.get("clusterId"), - (Integer) commandArguments.get("length"), - (Integer) commandArguments.get("value")); + (ArrayList) + commandArguments.get("extensionFieldSets")); }, () -> new DelegatedAddSceneResponseCallback(), scenesaddSceneCommandParams); @@ -8379,11 +7996,10 @@ public Map> getCommandMap() { Map scenesgetSceneMembershipCommandParams = new LinkedHashMap(); CommandParameterInfo scenesgetSceneMembershipgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesgetSceneMembershipCommandParams.put( "groupId", scenesgetSceneMembershipgroupIdCommandParameterInfo); - // Populate commands InteractionInfo scenesgetSceneMembershipInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8399,19 +8015,18 @@ public Map> getCommandMap() { Map scenesrecallSceneCommandParams = new LinkedHashMap(); CommandParameterInfo scenesrecallScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesrecallSceneCommandParams.put("groupId", scenesrecallScenegroupIdCommandParameterInfo); CommandParameterInfo scenesrecallScenesceneIdCommandParameterInfo = - new CommandParameterInfo("sceneId", int.class); + new CommandParameterInfo("sceneId", Integer.class); scenesrecallSceneCommandParams.put("sceneId", scenesrecallScenesceneIdCommandParameterInfo); CommandParameterInfo scenesrecallScenetransitionTimeCommandParameterInfo = - new CommandParameterInfo("transitionTime", int.class); + new CommandParameterInfo("transitionTime", Integer.class); scenesrecallSceneCommandParams.put( "transitionTime", scenesrecallScenetransitionTimeCommandParameterInfo); - // Populate commands InteractionInfo scenesrecallSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8428,11 +8043,10 @@ public Map> getCommandMap() { Map scenesremoveAllScenesCommandParams = new LinkedHashMap(); CommandParameterInfo scenesremoveAllScenesgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesremoveAllScenesCommandParams.put( "groupId", scenesremoveAllScenesgroupIdCommandParameterInfo); - // Populate commands InteractionInfo scenesremoveAllScenesInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8447,14 +8061,13 @@ public Map> getCommandMap() { Map scenesremoveSceneCommandParams = new LinkedHashMap(); CommandParameterInfo scenesremoveScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesremoveSceneCommandParams.put("groupId", scenesremoveScenegroupIdCommandParameterInfo); CommandParameterInfo scenesremoveScenesceneIdCommandParameterInfo = - new CommandParameterInfo("sceneId", int.class); + new CommandParameterInfo("sceneId", Integer.class); scenesremoveSceneCommandParams.put("sceneId", scenesremoveScenesceneIdCommandParameterInfo); - // Populate commands InteractionInfo scenesremoveSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8470,14 +8083,13 @@ public Map> getCommandMap() { Map scenesstoreSceneCommandParams = new LinkedHashMap(); CommandParameterInfo scenesstoreScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesstoreSceneCommandParams.put("groupId", scenesstoreScenegroupIdCommandParameterInfo); CommandParameterInfo scenesstoreScenesceneIdCommandParameterInfo = - new CommandParameterInfo("sceneId", int.class); + new CommandParameterInfo("sceneId", Integer.class); scenesstoreSceneCommandParams.put("sceneId", scenesstoreScenesceneIdCommandParameterInfo); - // Populate commands InteractionInfo scenesstoreSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8493,14 +8105,13 @@ public Map> getCommandMap() { Map scenesviewSceneCommandParams = new LinkedHashMap(); CommandParameterInfo scenesviewScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", int.class); + new CommandParameterInfo("groupId", Integer.class); scenesviewSceneCommandParams.put("groupId", scenesviewScenegroupIdCommandParameterInfo); CommandParameterInfo scenesviewScenesceneIdCommandParameterInfo = - new CommandParameterInfo("sceneId", int.class); + new CommandParameterInfo("sceneId", Integer.class); scenesviewSceneCommandParams.put("sceneId", scenesviewScenesceneIdCommandParameterInfo); - // Populate commands InteractionInfo scenesviewSceneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8518,7 +8129,6 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map softwareDiagnosticsresetWatermarksCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo softwareDiagnosticsresetWatermarksInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8536,7 +8146,7 @@ public Map> getCommandMap() { Map targetNavigatornavigateTargetRequestCommandParams = new LinkedHashMap(); CommandParameterInfo targetNavigatornavigateTargetRequesttargetCommandParameterInfo = - new CommandParameterInfo("target", int.class); + new CommandParameterInfo("target", Integer.class); targetNavigatornavigateTargetRequestCommandParams.put( "target", targetNavigatornavigateTargetRequesttargetCommandParameterInfo); @@ -8545,7 +8155,6 @@ public Map> getCommandMap() { targetNavigatornavigateTargetRequestCommandParams.put( "data", targetNavigatornavigateTargetRequestdataCommandParameterInfo); - // Populate commands InteractionInfo targetNavigatornavigateTargetRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8566,61 +8175,13 @@ public Map> getCommandMap() { Map testClusterClusterInteractionInfoMap = new LinkedHashMap<>(); Map testClustersimpleStructEchoRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustersimpleStructEchoRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustersimpleStructEchoRequestCommandParams.put( - "a", testClustersimpleStructEchoRequestaCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustersimpleStructEchoRequestCommandParams.put( - "b", testClustersimpleStructEchoRequestbCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequestcCommandParameterInfo = - new CommandParameterInfo("c", int.class); - testClustersimpleStructEchoRequestCommandParams.put( - "c", testClustersimpleStructEchoRequestcCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequestdCommandParameterInfo = - new CommandParameterInfo("d", byte[].class); - testClustersimpleStructEchoRequestCommandParams.put( - "d", testClustersimpleStructEchoRequestdCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequesteCommandParameterInfo = - new CommandParameterInfo("e", String.class); - testClustersimpleStructEchoRequestCommandParams.put( - "e", testClustersimpleStructEchoRequesteCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequestfCommandParameterInfo = - new CommandParameterInfo("f", int.class); - testClustersimpleStructEchoRequestCommandParams.put( - "f", testClustersimpleStructEchoRequestfCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequestgCommandParameterInfo = - new CommandParameterInfo("g", float.class); - testClustersimpleStructEchoRequestCommandParams.put( - "g", testClustersimpleStructEchoRequestgCommandParameterInfo); - - CommandParameterInfo testClustersimpleStructEchoRequesthCommandParameterInfo = - new CommandParameterInfo("h", double.class); - testClustersimpleStructEchoRequestCommandParams.put( - "h", testClustersimpleStructEchoRequesthCommandParameterInfo); - - // Populate commands InteractionInfo testClustersimpleStructEchoRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .simpleStructEchoRequest( (ChipClusters.TestClusterCluster.SimpleStructResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b"), - (Integer) commandArguments.get("c"), - (byte[]) commandArguments.get("d"), - (String) commandArguments.get("e"), - (Integer) commandArguments.get("f"), - (Float) commandArguments.get("g"), - (Double) commandArguments.get("h")); + (ChipStructs.TestClusterClusterSimpleStruct) commandArguments.get("arg1")); }, () -> new DelegatedSimpleStructResponseCallback(), testClustersimpleStructEchoRequestCommandParams); @@ -8628,7 +8189,6 @@ public Map> getCommandMap() { "simpleStructEchoRequest", testClustersimpleStructEchoRequestInteractionInfo); Map testClustertestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo testClustertestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8640,16 +8200,15 @@ public Map> getCommandMap() { Map testClustertestAddArgumentsCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestAddArgumentsarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", Integer.class); testClustertestAddArgumentsCommandParams.put( "arg1", testClustertestAddArgumentsarg1CommandParameterInfo); CommandParameterInfo testClustertestAddArgumentsarg2CommandParameterInfo = - new CommandParameterInfo("arg2", int.class); + new CommandParameterInfo("arg2", Integer.class); testClustertestAddArgumentsCommandParams.put( "arg2", testClustertestAddArgumentsarg2CommandParameterInfo); - // Populate commands InteractionInfo testClustertestAddArgumentsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8666,21 +8225,20 @@ public Map> getCommandMap() { Map testClustertestEmitTestEventRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestEmitTestEventRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", Integer.class); testClustertestEmitTestEventRequestCommandParams.put( "arg1", testClustertestEmitTestEventRequestarg1CommandParameterInfo); CommandParameterInfo testClustertestEmitTestEventRequestarg2CommandParameterInfo = - new CommandParameterInfo("arg2", int.class); + new CommandParameterInfo("arg2", Integer.class); testClustertestEmitTestEventRequestCommandParams.put( "arg2", testClustertestEmitTestEventRequestarg2CommandParameterInfo); CommandParameterInfo testClustertestEmitTestEventRequestarg3CommandParameterInfo = - new CommandParameterInfo("arg3", boolean.class); + new CommandParameterInfo("arg3", Boolean.class); testClustertestEmitTestEventRequestCommandParams.put( "arg3", testClustertestEmitTestEventRequestarg3CommandParameterInfo); - // Populate commands InteractionInfo testClustertestEmitTestEventRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8698,16 +8256,15 @@ public Map> getCommandMap() { Map testClustertestEnumsRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestEnumsRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", Integer.class); testClustertestEnumsRequestCommandParams.put( "arg1", testClustertestEnumsRequestarg1CommandParameterInfo); CommandParameterInfo testClustertestEnumsRequestarg2CommandParameterInfo = - new CommandParameterInfo("arg2", int.class); + new CommandParameterInfo("arg2", Integer.class); testClustertestEnumsRequestCommandParams.put( "arg2", testClustertestEnumsRequestarg2CommandParameterInfo); - // Populate commands InteractionInfo testClustertestEnumsRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8724,18 +8281,17 @@ public Map> getCommandMap() { Map testClustertestListInt8UArgumentRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestListInt8UArgumentRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", ArrayList.class); testClustertestListInt8UArgumentRequestCommandParams.put( "arg1", testClustertestListInt8UArgumentRequestarg1CommandParameterInfo); - // Populate commands InteractionInfo testClustertestListInt8UArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testListInt8UArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("arg1")); + (ArrayList) commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestListInt8UArgumentRequestCommandParams); @@ -8744,11 +8300,10 @@ public Map> getCommandMap() { Map testClustertestListInt8UReverseRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestListInt8UReverseRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", ArrayList.class); testClustertestListInt8UReverseRequestCommandParams.put( "arg1", testClustertestListInt8UReverseRequestarg1CommandParameterInfo); - // Populate commands InteractionInfo testClustertestListInt8UReverseRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8756,7 +8311,7 @@ public Map> getCommandMap() { .testListInt8UReverseRequest( (ChipClusters.TestClusterCluster.TestListInt8UReverseResponseCallback) callback, - (Integer) commandArguments.get("arg1")); + (ArrayList) commandArguments.get("arg1")); }, () -> new DelegatedTestListInt8UReverseResponseCallback(), testClustertestListInt8UReverseRequestCommandParams); @@ -8765,43 +8320,14 @@ public Map> getCommandMap() { Map testClustertestListNestedStructListArgumentRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustertestListNestedStructListArgumentRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustertestListNestedStructListArgumentRequestCommandParams.put( - "a", testClustertestListNestedStructListArgumentRequestaCommandParameterInfo); - - CommandParameterInfo testClustertestListNestedStructListArgumentRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustertestListNestedStructListArgumentRequestCommandParams.put( - "b", testClustertestListNestedStructListArgumentRequestbCommandParameterInfo); - - CommandParameterInfo testClustertestListNestedStructListArgumentRequesteCommandParameterInfo = - new CommandParameterInfo("e", long.class); - testClustertestListNestedStructListArgumentRequestCommandParams.put( - "e", testClustertestListNestedStructListArgumentRequesteCommandParameterInfo); - - CommandParameterInfo testClustertestListNestedStructListArgumentRequestfCommandParameterInfo = - new CommandParameterInfo("f", byte[].class); - testClustertestListNestedStructListArgumentRequestCommandParams.put( - "f", testClustertestListNestedStructListArgumentRequestfCommandParameterInfo); - - CommandParameterInfo testClustertestListNestedStructListArgumentRequestgCommandParameterInfo = - new CommandParameterInfo("g", int.class); - testClustertestListNestedStructListArgumentRequestCommandParams.put( - "g", testClustertestListNestedStructListArgumentRequestgCommandParameterInfo); - - // Populate commands InteractionInfo testClustertestListNestedStructListArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testListNestedStructListArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b"), - (Long) commandArguments.get("e"), - (byte[]) commandArguments.get("f"), - (Integer) commandArguments.get("g")); + (ArrayList) + commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestListNestedStructListArgumentRequestCommandParams); @@ -8810,61 +8336,14 @@ public Map> getCommandMap() { testClustertestListNestedStructListArgumentRequestInteractionInfo); Map testClustertestListStructArgumentRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustertestListStructArgumentRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustertestListStructArgumentRequestCommandParams.put( - "a", testClustertestListStructArgumentRequestaCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustertestListStructArgumentRequestCommandParams.put( - "b", testClustertestListStructArgumentRequestbCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequestcCommandParameterInfo = - new CommandParameterInfo("c", int.class); - testClustertestListStructArgumentRequestCommandParams.put( - "c", testClustertestListStructArgumentRequestcCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequestdCommandParameterInfo = - new CommandParameterInfo("d", byte[].class); - testClustertestListStructArgumentRequestCommandParams.put( - "d", testClustertestListStructArgumentRequestdCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequesteCommandParameterInfo = - new CommandParameterInfo("e", String.class); - testClustertestListStructArgumentRequestCommandParams.put( - "e", testClustertestListStructArgumentRequesteCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequestfCommandParameterInfo = - new CommandParameterInfo("f", int.class); - testClustertestListStructArgumentRequestCommandParams.put( - "f", testClustertestListStructArgumentRequestfCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequestgCommandParameterInfo = - new CommandParameterInfo("g", float.class); - testClustertestListStructArgumentRequestCommandParams.put( - "g", testClustertestListStructArgumentRequestgCommandParameterInfo); - - CommandParameterInfo testClustertestListStructArgumentRequesthCommandParameterInfo = - new CommandParameterInfo("h", double.class); - testClustertestListStructArgumentRequestCommandParams.put( - "h", testClustertestListStructArgumentRequesthCommandParameterInfo); - - // Populate commands InteractionInfo testClustertestListStructArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testListStructArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b"), - (Integer) commandArguments.get("c"), - (byte[]) commandArguments.get("d"), - (String) commandArguments.get("e"), - (Integer) commandArguments.get("f"), - (Float) commandArguments.get("g"), - (Double) commandArguments.get("h")); + (ArrayList) + commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestListStructArgumentRequestCommandParams); @@ -8872,25 +8351,13 @@ public Map> getCommandMap() { "testListStructArgumentRequest", testClustertestListStructArgumentRequestInteractionInfo); Map testClustertestNestedStructArgumentRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustertestNestedStructArgumentRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustertestNestedStructArgumentRequestCommandParams.put( - "a", testClustertestNestedStructArgumentRequestaCommandParameterInfo); - - CommandParameterInfo testClustertestNestedStructArgumentRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustertestNestedStructArgumentRequestCommandParams.put( - "b", testClustertestNestedStructArgumentRequestbCommandParameterInfo); - - // Populate commands InteractionInfo testClustertestNestedStructArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testNestedStructArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b")); + (ChipStructs.TestClusterClusterNestedStruct) commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestNestedStructArgumentRequestCommandParams); @@ -8899,43 +8366,14 @@ public Map> getCommandMap() { testClustertestNestedStructArgumentRequestInteractionInfo); Map testClustertestNestedStructListArgumentRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustertestNestedStructListArgumentRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustertestNestedStructListArgumentRequestCommandParams.put( - "a", testClustertestNestedStructListArgumentRequestaCommandParameterInfo); - - CommandParameterInfo testClustertestNestedStructListArgumentRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustertestNestedStructListArgumentRequestCommandParams.put( - "b", testClustertestNestedStructListArgumentRequestbCommandParameterInfo); - - CommandParameterInfo testClustertestNestedStructListArgumentRequesteCommandParameterInfo = - new CommandParameterInfo("e", long.class); - testClustertestNestedStructListArgumentRequestCommandParams.put( - "e", testClustertestNestedStructListArgumentRequesteCommandParameterInfo); - - CommandParameterInfo testClustertestNestedStructListArgumentRequestfCommandParameterInfo = - new CommandParameterInfo("f", byte[].class); - testClustertestNestedStructListArgumentRequestCommandParams.put( - "f", testClustertestNestedStructListArgumentRequestfCommandParameterInfo); - - CommandParameterInfo testClustertestNestedStructListArgumentRequestgCommandParameterInfo = - new CommandParameterInfo("g", int.class); - testClustertestNestedStructListArgumentRequestCommandParams.put( - "g", testClustertestNestedStructListArgumentRequestgCommandParameterInfo); - - // Populate commands InteractionInfo testClustertestNestedStructListArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testNestedStructListArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b"), - (Long) commandArguments.get("e"), - (byte[]) commandArguments.get("f"), - (Integer) commandArguments.get("g")); + (ChipStructs.TestClusterClusterNestedStructList) + commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestNestedStructListArgumentRequestCommandParams); @@ -8944,7 +8382,6 @@ public Map> getCommandMap() { testClustertestNestedStructListArgumentRequestInteractionInfo); Map testClustertestNotHandledCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo testClustertestNotHandledInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8958,11 +8395,10 @@ public Map> getCommandMap() { Map testClustertestNullableOptionalRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestNullableOptionalRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", int.class); + new CommandParameterInfo("arg1", Optional.class); testClustertestNullableOptionalRequestCommandParams.put( "arg1", testClustertestNullableOptionalRequestarg1CommandParameterInfo); - // Populate commands InteractionInfo testClustertestNullableOptionalRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8979,11 +8415,10 @@ public Map> getCommandMap() { Map testClustertestSimpleOptionalArgumentRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestSimpleOptionalArgumentRequestarg1CommandParameterInfo = - new CommandParameterInfo("arg1", boolean.class); + new CommandParameterInfo("arg1", Optional.class); testClustertestSimpleOptionalArgumentRequestCommandParams.put( "arg1", testClustertestSimpleOptionalArgumentRequestarg1CommandParameterInfo); - // Populate commands InteractionInfo testClustertestSimpleOptionalArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8999,7 +8434,6 @@ public Map> getCommandMap() { testClustertestSimpleOptionalArgumentRequestInteractionInfo); Map testClustertestSpecificCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo testClustertestSpecificInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9013,61 +8447,13 @@ public Map> getCommandMap() { "testSpecific", testClustertestSpecificInteractionInfo); Map testClustertestStructArgumentRequestCommandParams = new LinkedHashMap(); - CommandParameterInfo testClustertestStructArgumentRequestaCommandParameterInfo = - new CommandParameterInfo("a", int.class); - testClustertestStructArgumentRequestCommandParams.put( - "a", testClustertestStructArgumentRequestaCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequestbCommandParameterInfo = - new CommandParameterInfo("b", boolean.class); - testClustertestStructArgumentRequestCommandParams.put( - "b", testClustertestStructArgumentRequestbCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequestcCommandParameterInfo = - new CommandParameterInfo("c", int.class); - testClustertestStructArgumentRequestCommandParams.put( - "c", testClustertestStructArgumentRequestcCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequestdCommandParameterInfo = - new CommandParameterInfo("d", byte[].class); - testClustertestStructArgumentRequestCommandParams.put( - "d", testClustertestStructArgumentRequestdCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequesteCommandParameterInfo = - new CommandParameterInfo("e", String.class); - testClustertestStructArgumentRequestCommandParams.put( - "e", testClustertestStructArgumentRequesteCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequestfCommandParameterInfo = - new CommandParameterInfo("f", int.class); - testClustertestStructArgumentRequestCommandParams.put( - "f", testClustertestStructArgumentRequestfCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequestgCommandParameterInfo = - new CommandParameterInfo("g", float.class); - testClustertestStructArgumentRequestCommandParams.put( - "g", testClustertestStructArgumentRequestgCommandParameterInfo); - - CommandParameterInfo testClustertestStructArgumentRequesthCommandParameterInfo = - new CommandParameterInfo("h", double.class); - testClustertestStructArgumentRequestCommandParams.put( - "h", testClustertestStructArgumentRequesthCommandParameterInfo); - - // Populate commands InteractionInfo testClustertestStructArgumentRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TestClusterCluster) cluster) .testStructArgumentRequest( (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, - (Integer) commandArguments.get("a"), - (Boolean) commandArguments.get("b"), - (Integer) commandArguments.get("c"), - (byte[]) commandArguments.get("d"), - (String) commandArguments.get("e"), - (Integer) commandArguments.get("f"), - (Float) commandArguments.get("g"), - (Double) commandArguments.get("h")); + (ChipStructs.TestClusterClusterSimpleStruct) commandArguments.get("arg1")); }, () -> new DelegatedBooleanResponseCallback(), testClustertestStructArgumentRequestCommandParams); @@ -9075,7 +8461,6 @@ public Map> getCommandMap() { "testStructArgumentRequest", testClustertestStructArgumentRequestInteractionInfo); Map testClustertestUnknownCommandCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo testClustertestUnknownCommandInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9088,7 +8473,6 @@ public Map> getCommandMap() { "testUnknownCommand", testClustertestUnknownCommandInteractionInfo); Map testClustertimedInvokeRequestCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo testClustertimedInvokeRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9103,7 +8487,6 @@ public Map> getCommandMap() { Map thermostatClusterInteractionInfoMap = new LinkedHashMap<>(); Map thermostatclearWeeklyScheduleCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo thermostatclearWeeklyScheduleInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9116,7 +8499,6 @@ public Map> getCommandMap() { "clearWeeklySchedule", thermostatclearWeeklyScheduleInteractionInfo); Map thermostatgetRelayStatusLogCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo thermostatgetRelayStatusLogInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9131,16 +8513,15 @@ public Map> getCommandMap() { Map thermostatgetWeeklyScheduleCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatgetWeeklyScheduledaysToReturnCommandParameterInfo = - new CommandParameterInfo("daysToReturn", int.class); + new CommandParameterInfo("daysToReturn", Integer.class); thermostatgetWeeklyScheduleCommandParams.put( "daysToReturn", thermostatgetWeeklyScheduledaysToReturnCommandParameterInfo); CommandParameterInfo thermostatgetWeeklySchedulemodeToReturnCommandParameterInfo = - new CommandParameterInfo("modeToReturn", int.class); + new CommandParameterInfo("modeToReturn", Integer.class); thermostatgetWeeklyScheduleCommandParams.put( "modeToReturn", thermostatgetWeeklySchedulemodeToReturnCommandParameterInfo); - // Populate commands InteractionInfo thermostatgetWeeklyScheduleInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9158,28 +8539,27 @@ public Map> getCommandMap() { new LinkedHashMap(); CommandParameterInfo thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo = - new CommandParameterInfo("numberOfTransitionsForSequence", int.class); + new CommandParameterInfo("numberOfTransitionsForSequence", Integer.class); thermostatsetWeeklyScheduleCommandParams.put( "numberOfTransitionsForSequence", thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo); CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo = - new CommandParameterInfo("dayOfWeekForSequence", int.class); + new CommandParameterInfo("dayOfWeekForSequence", Integer.class); thermostatsetWeeklyScheduleCommandParams.put( "dayOfWeekForSequence", thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo); CommandParameterInfo thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo = - new CommandParameterInfo("modeForSequence", int.class); + new CommandParameterInfo("modeForSequence", Integer.class); thermostatsetWeeklyScheduleCommandParams.put( "modeForSequence", thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo); CommandParameterInfo thermostatsetWeeklySchedulepayloadCommandParameterInfo = - new CommandParameterInfo("payload", int.class); + new CommandParameterInfo("payload", ArrayList.class); thermostatsetWeeklyScheduleCommandParams.put( "payload", thermostatsetWeeklySchedulepayloadCommandParameterInfo); - // Populate commands InteractionInfo thermostatsetWeeklyScheduleInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9189,7 +8569,7 @@ public Map> getCommandMap() { (Integer) commandArguments.get("numberOfTransitionsForSequence"), (Integer) commandArguments.get("dayOfWeekForSequence"), (Integer) commandArguments.get("modeForSequence"), - (Integer) commandArguments.get("payload")); + (ArrayList) commandArguments.get("payload")); }, () -> new DelegatedDefaultClusterCallback(), thermostatsetWeeklyScheduleCommandParams); @@ -9198,16 +8578,15 @@ public Map> getCommandMap() { Map thermostatsetpointRaiseLowerCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatsetpointRaiseLowermodeCommandParameterInfo = - new CommandParameterInfo("mode", int.class); + new CommandParameterInfo("mode", Integer.class); thermostatsetpointRaiseLowerCommandParams.put( "mode", thermostatsetpointRaiseLowermodeCommandParameterInfo); CommandParameterInfo thermostatsetpointRaiseLoweramountCommandParameterInfo = - new CommandParameterInfo("amount", int.class); + new CommandParameterInfo("amount", Integer.class); thermostatsetpointRaiseLowerCommandParams.put( "amount", thermostatsetpointRaiseLoweramountCommandParameterInfo); - // Populate commands InteractionInfo thermostatsetpointRaiseLowerInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9231,7 +8610,6 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map threadNetworkDiagnosticsresetCountsCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo threadNetworkDiagnosticsresetCountsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9254,7 +8632,6 @@ public Map> getCommandMap() { new LinkedHashMap<>(); Map wiFiNetworkDiagnosticsresetCountsCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo wiFiNetworkDiagnosticsresetCountsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9269,7 +8646,6 @@ public Map> getCommandMap() { Map windowCoveringClusterInteractionInfoMap = new LinkedHashMap<>(); Map windowCoveringdownOrCloseCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo windowCoveringdownOrCloseInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9283,19 +8659,18 @@ public Map> getCommandMap() { Map windowCoveringgoToLiftPercentageCommandParams = new LinkedHashMap(); CommandParameterInfo windowCoveringgoToLiftPercentageliftPercentageValueCommandParameterInfo = - new CommandParameterInfo("liftPercentageValue", int.class); + new CommandParameterInfo("liftPercentageValue", Integer.class); windowCoveringgoToLiftPercentageCommandParams.put( "liftPercentageValue", windowCoveringgoToLiftPercentageliftPercentageValueCommandParameterInfo); CommandParameterInfo windowCoveringgoToLiftPercentageliftPercent100thsValueCommandParameterInfo = - new CommandParameterInfo("liftPercent100thsValue", int.class); + new CommandParameterInfo("liftPercent100thsValue", Integer.class); windowCoveringgoToLiftPercentageCommandParams.put( "liftPercent100thsValue", windowCoveringgoToLiftPercentageliftPercent100thsValueCommandParameterInfo); - // Populate commands InteractionInfo windowCoveringgoToLiftPercentageInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9312,11 +8687,10 @@ public Map> getCommandMap() { Map windowCoveringgoToLiftValueCommandParams = new LinkedHashMap(); CommandParameterInfo windowCoveringgoToLiftValueliftValueCommandParameterInfo = - new CommandParameterInfo("liftValue", int.class); + new CommandParameterInfo("liftValue", Integer.class); windowCoveringgoToLiftValueCommandParams.put( "liftValue", windowCoveringgoToLiftValueliftValueCommandParameterInfo); - // Populate commands InteractionInfo windowCoveringgoToLiftValueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9332,19 +8706,18 @@ public Map> getCommandMap() { Map windowCoveringgoToTiltPercentageCommandParams = new LinkedHashMap(); CommandParameterInfo windowCoveringgoToTiltPercentagetiltPercentageValueCommandParameterInfo = - new CommandParameterInfo("tiltPercentageValue", int.class); + new CommandParameterInfo("tiltPercentageValue", Integer.class); windowCoveringgoToTiltPercentageCommandParams.put( "tiltPercentageValue", windowCoveringgoToTiltPercentagetiltPercentageValueCommandParameterInfo); CommandParameterInfo windowCoveringgoToTiltPercentagetiltPercent100thsValueCommandParameterInfo = - new CommandParameterInfo("tiltPercent100thsValue", int.class); + new CommandParameterInfo("tiltPercent100thsValue", Integer.class); windowCoveringgoToTiltPercentageCommandParams.put( "tiltPercent100thsValue", windowCoveringgoToTiltPercentagetiltPercent100thsValueCommandParameterInfo); - // Populate commands InteractionInfo windowCoveringgoToTiltPercentageInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9361,11 +8734,10 @@ public Map> getCommandMap() { Map windowCoveringgoToTiltValueCommandParams = new LinkedHashMap(); CommandParameterInfo windowCoveringgoToTiltValuetiltValueCommandParameterInfo = - new CommandParameterInfo("tiltValue", int.class); + new CommandParameterInfo("tiltValue", Integer.class); windowCoveringgoToTiltValueCommandParams.put( "tiltValue", windowCoveringgoToTiltValuetiltValueCommandParameterInfo); - // Populate commands InteractionInfo windowCoveringgoToTiltValueInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9380,7 +8752,6 @@ public Map> getCommandMap() { "goToTiltValue", windowCoveringgoToTiltValueInteractionInfo); Map windowCoveringstopMotionCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo windowCoveringstopMotionInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -9393,7 +8764,6 @@ public Map> getCommandMap() { "stopMotion", windowCoveringstopMotionInteractionInfo); Map windowCoveringupOrOpenCommandParams = new LinkedHashMap(); - // Populate commands InteractionInfo windowCoveringupOrOpenInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 7b0070d5be20ba..04df1c40eedd72 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -81,7 +81,7 @@ public Map> getWriteAttributeMap() { Map writeBasicLocalConfigDisabledCommandParams = new LinkedHashMap(); CommandParameterInfo basiclocalConfigDisabledCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeBasicLocalConfigDisabledCommandParams.put( "value", basiclocalConfigDisabledCommandParameterInfo); InteractionInfo writeBasicLocalConfigDisabledAttributeInteractionInfo = @@ -100,7 +100,7 @@ public Map> getWriteAttributeMap() { Map writeBinaryInputBasicOutOfServiceCommandParams = new LinkedHashMap(); CommandParameterInfo binaryInputBasicoutOfServiceCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeBinaryInputBasicOutOfServiceCommandParams.put( "value", binaryInputBasicoutOfServiceCommandParameterInfo); InteractionInfo writeBinaryInputBasicOutOfServiceAttributeInteractionInfo = @@ -117,7 +117,7 @@ public Map> getWriteAttributeMap() { Map writeBinaryInputBasicPresentValueCommandParams = new LinkedHashMap(); CommandParameterInfo binaryInputBasicpresentValueCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeBinaryInputBasicPresentValueCommandParams.put( "value", binaryInputBasicpresentValueCommandParameterInfo); InteractionInfo writeBinaryInputBasicPresentValueAttributeInteractionInfo = @@ -146,7 +146,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorControlOptionsCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorControlOptionsCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorControlOptionsCommandParams.put( "value", colorControlcolorControlOptionsCommandParameterInfo); InteractionInfo writeColorControlColorControlOptionsAttributeInteractionInfo = @@ -164,7 +164,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlWhitePointXCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlwhitePointXCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlWhitePointXCommandParams.put( "value", colorControlwhitePointXCommandParameterInfo); InteractionInfo writeColorControlWhitePointXAttributeInteractionInfo = @@ -181,7 +181,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlWhitePointYCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlwhitePointYCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlWhitePointYCommandParams.put( "value", colorControlwhitePointYCommandParameterInfo); InteractionInfo writeColorControlWhitePointYAttributeInteractionInfo = @@ -198,7 +198,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointRXCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointRXCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointRXCommandParams.put( "value", colorControlcolorPointRXCommandParameterInfo); InteractionInfo writeColorControlColorPointRXAttributeInteractionInfo = @@ -215,7 +215,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointRYCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointRYCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointRYCommandParams.put( "value", colorControlcolorPointRYCommandParameterInfo); InteractionInfo writeColorControlColorPointRYAttributeInteractionInfo = @@ -232,7 +232,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointRIntensityCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointRIntensityCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointRIntensityCommandParams.put( "value", colorControlcolorPointRIntensityCommandParameterInfo); InteractionInfo writeColorControlColorPointRIntensityAttributeInteractionInfo = @@ -250,7 +250,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointGXCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointGXCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointGXCommandParams.put( "value", colorControlcolorPointGXCommandParameterInfo); InteractionInfo writeColorControlColorPointGXAttributeInteractionInfo = @@ -267,7 +267,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointGYCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointGYCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointGYCommandParams.put( "value", colorControlcolorPointGYCommandParameterInfo); InteractionInfo writeColorControlColorPointGYAttributeInteractionInfo = @@ -284,7 +284,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointGIntensityCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointGIntensityCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointGIntensityCommandParams.put( "value", colorControlcolorPointGIntensityCommandParameterInfo); InteractionInfo writeColorControlColorPointGIntensityAttributeInteractionInfo = @@ -302,7 +302,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointBXCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointBXCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointBXCommandParams.put( "value", colorControlcolorPointBXCommandParameterInfo); InteractionInfo writeColorControlColorPointBXAttributeInteractionInfo = @@ -319,7 +319,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointBYCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointBYCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointBYCommandParams.put( "value", colorControlcolorPointBYCommandParameterInfo); InteractionInfo writeColorControlColorPointBYAttributeInteractionInfo = @@ -336,7 +336,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlColorPointBIntensityCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlcolorPointBIntensityCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlColorPointBIntensityCommandParams.put( "value", colorControlcolorPointBIntensityCommandParameterInfo); InteractionInfo writeColorControlColorPointBIntensityAttributeInteractionInfo = @@ -354,7 +354,7 @@ public Map> getWriteAttributeMap() { Map writeColorControlStartUpColorTemperatureMiredsCommandParams = new LinkedHashMap(); CommandParameterInfo colorControlstartUpColorTemperatureMiredsCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeColorControlStartUpColorTemperatureMiredsCommandParams.put( "value", colorControlstartUpColorTemperatureMiredsCommandParameterInfo); InteractionInfo writeColorControlStartUpColorTemperatureMiredsAttributeInteractionInfo = @@ -374,7 +374,7 @@ public Map> getWriteAttributeMap() { Map writeContentLauncherSupportedStreamingProtocolsCommandParams = new LinkedHashMap(); CommandParameterInfo contentLaunchersupportedStreamingProtocolsCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeContentLauncherSupportedStreamingProtocolsCommandParams.put( "value", contentLaunchersupportedStreamingProtocolsCommandParameterInfo); InteractionInfo writeContentLauncherSupportedStreamingProtocolsAttributeInteractionInfo = @@ -414,7 +414,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockAutoRelockTimeCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockautoRelockTimeCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeDoorLockAutoRelockTimeCommandParams.put( "value", doorLockautoRelockTimeCommandParameterInfo); InteractionInfo writeDoorLockAutoRelockTimeAttributeInteractionInfo = @@ -431,7 +431,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockSoundVolumeCommandParams = new LinkedHashMap(); CommandParameterInfo doorLocksoundVolumeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeDoorLockSoundVolumeCommandParams.put("value", doorLocksoundVolumeCommandParameterInfo); InteractionInfo writeDoorLockSoundVolumeAttributeInteractionInfo = new InteractionInfo( @@ -447,7 +447,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockOperatingModeCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockoperatingModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeDoorLockOperatingModeCommandParams.put("value", doorLockoperatingModeCommandParameterInfo); InteractionInfo writeDoorLockOperatingModeAttributeInteractionInfo = new InteractionInfo( @@ -463,7 +463,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockEnableOneTouchLockingCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockenableOneTouchLockingCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeDoorLockEnableOneTouchLockingCommandParams.put( "value", doorLockenableOneTouchLockingCommandParameterInfo); InteractionInfo writeDoorLockEnableOneTouchLockingAttributeInteractionInfo = @@ -481,7 +481,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockEnablePrivacyModeButtonCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockenablePrivacyModeButtonCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeDoorLockEnablePrivacyModeButtonCommandParams.put( "value", doorLockenablePrivacyModeButtonCommandParameterInfo); InteractionInfo writeDoorLockEnablePrivacyModeButtonAttributeInteractionInfo = @@ -499,7 +499,7 @@ public Map> getWriteAttributeMap() { Map writeDoorLockWrongCodeEntryLimitCommandParams = new LinkedHashMap(); CommandParameterInfo doorLockwrongCodeEntryLimitCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeDoorLockWrongCodeEntryLimitCommandParams.put( "value", doorLockwrongCodeEntryLimitCommandParameterInfo); InteractionInfo writeDoorLockWrongCodeEntryLimitAttributeInteractionInfo = @@ -529,7 +529,7 @@ public Map> getWriteAttributeMap() { Map writeGeneralCommissioningBreadcrumbCommandParams = new LinkedHashMap(); CommandParameterInfo generalCommissioningbreadcrumbCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeGeneralCommissioningBreadcrumbCommandParams.put( "value", generalCommissioningbreadcrumbCommandParameterInfo); InteractionInfo writeGeneralCommissioningBreadcrumbAttributeInteractionInfo = @@ -554,7 +554,7 @@ public Map> getWriteAttributeMap() { Map writeIdentifyIdentifyTimeCommandParams = new LinkedHashMap(); CommandParameterInfo identifyidentifyTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeIdentifyIdentifyTimeCommandParams.put("value", identifyidentifyTimeCommandParameterInfo); InteractionInfo writeIdentifyIdentifyTimeAttributeInteractionInfo = new InteractionInfo( @@ -576,7 +576,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlOptionsCommandParams = new LinkedHashMap(); CommandParameterInfo levelControloptionsCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlOptionsCommandParams.put("value", levelControloptionsCommandParameterInfo); InteractionInfo writeLevelControlOptionsAttributeInteractionInfo = new InteractionInfo( @@ -592,7 +592,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlOnOffTransitionTimeCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlonOffTransitionTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlOnOffTransitionTimeCommandParams.put( "value", levelControlonOffTransitionTimeCommandParameterInfo); InteractionInfo writeLevelControlOnOffTransitionTimeAttributeInteractionInfo = @@ -610,7 +610,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlOnLevelCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlonLevelCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlOnLevelCommandParams.put("value", levelControlonLevelCommandParameterInfo); InteractionInfo writeLevelControlOnLevelAttributeInteractionInfo = new InteractionInfo( @@ -626,7 +626,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlOnTransitionTimeCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlonTransitionTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlOnTransitionTimeCommandParams.put( "value", levelControlonTransitionTimeCommandParameterInfo); InteractionInfo writeLevelControlOnTransitionTimeAttributeInteractionInfo = @@ -644,7 +644,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlOffTransitionTimeCommandParams = new LinkedHashMap(); CommandParameterInfo levelControloffTransitionTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlOffTransitionTimeCommandParams.put( "value", levelControloffTransitionTimeCommandParameterInfo); InteractionInfo writeLevelControlOffTransitionTimeAttributeInteractionInfo = @@ -662,7 +662,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlDefaultMoveRateCommandParams = new LinkedHashMap(); CommandParameterInfo levelControldefaultMoveRateCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlDefaultMoveRateCommandParams.put( "value", levelControldefaultMoveRateCommandParameterInfo); InteractionInfo writeLevelControlDefaultMoveRateAttributeInteractionInfo = @@ -679,7 +679,7 @@ public Map> getWriteAttributeMap() { Map writeLevelControlStartUpCurrentLevelCommandParams = new LinkedHashMap(); CommandParameterInfo levelControlstartUpCurrentLevelCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeLevelControlStartUpCurrentLevelCommandParams.put( "value", levelControlstartUpCurrentLevelCommandParameterInfo); InteractionInfo writeLevelControlStartUpCurrentLevelAttributeInteractionInfo = @@ -727,7 +727,7 @@ public Map> getWriteAttributeMap() { Map writeModeSelectOnModeCommandParams = new LinkedHashMap(); CommandParameterInfo modeSelectonModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeModeSelectOnModeCommandParams.put("value", modeSelectonModeCommandParameterInfo); InteractionInfo writeModeSelectOnModeAttributeInteractionInfo = new InteractionInfo( @@ -745,7 +745,7 @@ public Map> getWriteAttributeMap() { Map writeNetworkCommissioningInterfaceEnabledCommandParams = new LinkedHashMap(); CommandParameterInfo networkCommissioninginterfaceEnabledCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeNetworkCommissioningInterfaceEnabledCommandParams.put( "value", networkCommissioninginterfaceEnabledCommandParameterInfo); InteractionInfo writeNetworkCommissioningInterfaceEnabledAttributeInteractionInfo = @@ -775,7 +775,7 @@ public Map> getWriteAttributeMap() { Map writeOnOffOnTimeCommandParams = new LinkedHashMap(); CommandParameterInfo onOffonTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeOnOffOnTimeCommandParams.put("value", onOffonTimeCommandParameterInfo); InteractionInfo writeOnOffOnTimeAttributeInteractionInfo = new InteractionInfo( @@ -790,7 +790,7 @@ public Map> getWriteAttributeMap() { Map writeOnOffOffWaitTimeCommandParams = new LinkedHashMap(); CommandParameterInfo onOffoffWaitTimeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeOnOffOffWaitTimeCommandParams.put("value", onOffoffWaitTimeCommandParameterInfo); InteractionInfo writeOnOffOffWaitTimeAttributeInteractionInfo = new InteractionInfo( @@ -806,7 +806,7 @@ public Map> getWriteAttributeMap() { Map writeOnOffStartUpOnOffCommandParams = new LinkedHashMap(); CommandParameterInfo onOffstartUpOnOffCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeOnOffStartUpOnOffCommandParams.put("value", onOffstartUpOnOffCommandParameterInfo); InteractionInfo writeOnOffStartUpOnOffAttributeInteractionInfo = new InteractionInfo( @@ -825,7 +825,7 @@ public Map> getWriteAttributeMap() { Map writeOnOffSwitchConfigurationSwitchActionsCommandParams = new LinkedHashMap(); CommandParameterInfo onOffSwitchConfigurationswitchActionsCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeOnOffSwitchConfigurationSwitchActionsCommandParams.put( "value", onOffSwitchConfigurationswitchActionsCommandParameterInfo); InteractionInfo writeOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo = @@ -856,7 +856,7 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlLifetimeRunningHoursCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControllifetimeRunningHoursCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writePumpConfigurationAndControlLifetimeRunningHoursCommandParams.put( "value", pumpConfigurationAndControllifetimeRunningHoursCommandParameterInfo); InteractionInfo writePumpConfigurationAndControlLifetimeRunningHoursAttributeInteractionInfo = @@ -875,7 +875,7 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams.put( "value", pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo); InteractionInfo writePumpConfigurationAndControlLifetimeEnergyConsumedAttributeInteractionInfo = @@ -893,7 +893,7 @@ public Map> getWriteAttributeMap() { Map writePumpConfigurationAndControlOperationModeCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControloperationModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writePumpConfigurationAndControlOperationModeCommandParams.put( "value", pumpConfigurationAndControloperationModeCommandParameterInfo); InteractionInfo writePumpConfigurationAndControlOperationModeAttributeInteractionInfo = @@ -911,7 +911,7 @@ public Map> getWriteAttributeMap() { Map writePumpConfigurationAndControlControlModeCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControlcontrolModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writePumpConfigurationAndControlControlModeCommandParams.put( "value", pumpConfigurationAndControlcontrolModeCommandParameterInfo); InteractionInfo writePumpConfigurationAndControlControlModeAttributeInteractionInfo = @@ -946,7 +946,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterBooleanCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterbooleanCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeTestClusterBooleanCommandParams.put("value", testClusterbooleanCommandParameterInfo); InteractionInfo writeTestClusterBooleanAttributeInteractionInfo = new InteractionInfo( @@ -962,7 +962,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterBitmap8CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterbitmap8CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterBitmap8CommandParams.put("value", testClusterbitmap8CommandParameterInfo); InteractionInfo writeTestClusterBitmap8AttributeInteractionInfo = new InteractionInfo( @@ -978,7 +978,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterBitmap16CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterbitmap16CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterBitmap16CommandParams.put("value", testClusterbitmap16CommandParameterInfo); InteractionInfo writeTestClusterBitmap16AttributeInteractionInfo = new InteractionInfo( @@ -994,7 +994,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterBitmap32CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterbitmap32CommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterBitmap32CommandParams.put("value", testClusterbitmap32CommandParameterInfo); InteractionInfo writeTestClusterBitmap32AttributeInteractionInfo = new InteractionInfo( @@ -1010,7 +1010,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterBitmap64CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterbitmap64CommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterBitmap64CommandParams.put("value", testClusterbitmap64CommandParameterInfo); InteractionInfo writeTestClusterBitmap64AttributeInteractionInfo = new InteractionInfo( @@ -1026,7 +1026,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt8uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint8uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterInt8uCommandParams.put("value", testClusterint8uCommandParameterInfo); InteractionInfo writeTestClusterInt8uAttributeInteractionInfo = new InteractionInfo( @@ -1042,7 +1042,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt16uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint16uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterInt16uCommandParams.put("value", testClusterint16uCommandParameterInfo); InteractionInfo writeTestClusterInt16uAttributeInteractionInfo = new InteractionInfo( @@ -1058,7 +1058,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt24uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint24uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt24uCommandParams.put("value", testClusterint24uCommandParameterInfo); InteractionInfo writeTestClusterInt24uAttributeInteractionInfo = new InteractionInfo( @@ -1074,7 +1074,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt32uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint32uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt32uCommandParams.put("value", testClusterint32uCommandParameterInfo); InteractionInfo writeTestClusterInt32uAttributeInteractionInfo = new InteractionInfo( @@ -1090,7 +1090,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt40uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint40uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt40uCommandParams.put("value", testClusterint40uCommandParameterInfo); InteractionInfo writeTestClusterInt40uAttributeInteractionInfo = new InteractionInfo( @@ -1106,7 +1106,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt48uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint48uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt48uCommandParams.put("value", testClusterint48uCommandParameterInfo); InteractionInfo writeTestClusterInt48uAttributeInteractionInfo = new InteractionInfo( @@ -1122,7 +1122,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt56uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint56uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt56uCommandParams.put("value", testClusterint56uCommandParameterInfo); InteractionInfo writeTestClusterInt56uAttributeInteractionInfo = new InteractionInfo( @@ -1138,7 +1138,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt64uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint64uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt64uCommandParams.put("value", testClusterint64uCommandParameterInfo); InteractionInfo writeTestClusterInt64uAttributeInteractionInfo = new InteractionInfo( @@ -1154,7 +1154,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt8sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint8sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterInt8sCommandParams.put("value", testClusterint8sCommandParameterInfo); InteractionInfo writeTestClusterInt8sAttributeInteractionInfo = new InteractionInfo( @@ -1170,7 +1170,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt16sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint16sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterInt16sCommandParams.put("value", testClusterint16sCommandParameterInfo); InteractionInfo writeTestClusterInt16sAttributeInteractionInfo = new InteractionInfo( @@ -1186,7 +1186,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt24sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint24sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt24sCommandParams.put("value", testClusterint24sCommandParameterInfo); InteractionInfo writeTestClusterInt24sAttributeInteractionInfo = new InteractionInfo( @@ -1202,7 +1202,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt32sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint32sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt32sCommandParams.put("value", testClusterint32sCommandParameterInfo); InteractionInfo writeTestClusterInt32sAttributeInteractionInfo = new InteractionInfo( @@ -1218,7 +1218,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt40sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint40sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt40sCommandParams.put("value", testClusterint40sCommandParameterInfo); InteractionInfo writeTestClusterInt40sAttributeInteractionInfo = new InteractionInfo( @@ -1234,7 +1234,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt48sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint48sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt48sCommandParams.put("value", testClusterint48sCommandParameterInfo); InteractionInfo writeTestClusterInt48sAttributeInteractionInfo = new InteractionInfo( @@ -1250,7 +1250,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt56sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint56sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt56sCommandParams.put("value", testClusterint56sCommandParameterInfo); InteractionInfo writeTestClusterInt56sAttributeInteractionInfo = new InteractionInfo( @@ -1266,7 +1266,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterInt64sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterint64sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterInt64sCommandParams.put("value", testClusterint64sCommandParameterInfo); InteractionInfo writeTestClusterInt64sAttributeInteractionInfo = new InteractionInfo( @@ -1282,7 +1282,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterEnum8CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterenum8CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterEnum8CommandParams.put("value", testClusterenum8CommandParameterInfo); InteractionInfo writeTestClusterEnum8AttributeInteractionInfo = new InteractionInfo( @@ -1298,7 +1298,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterEnum16CommandParams = new LinkedHashMap(); CommandParameterInfo testClusterenum16CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterEnum16CommandParams.put("value", testClusterenum16CommandParameterInfo); InteractionInfo writeTestClusterEnum16AttributeInteractionInfo = new InteractionInfo( @@ -1314,7 +1314,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterFloatSingleCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterfloatSingleCommandParameterInfo = - new CommandParameterInfo("value", float.class); + new CommandParameterInfo("value", Float.class); writeTestClusterFloatSingleCommandParams.put( "value", testClusterfloatSingleCommandParameterInfo); InteractionInfo writeTestClusterFloatSingleAttributeInteractionInfo = @@ -1331,7 +1331,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterFloatDoubleCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterfloatDoubleCommandParameterInfo = - new CommandParameterInfo("value", double.class); + new CommandParameterInfo("value", Double.class); writeTestClusterFloatDoubleCommandParams.put( "value", testClusterfloatDoubleCommandParameterInfo); InteractionInfo writeTestClusterFloatDoubleAttributeInteractionInfo = @@ -1415,7 +1415,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterEpochUsCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterepochUsCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterEpochUsCommandParams.put("value", testClusterepochUsCommandParameterInfo); InteractionInfo writeTestClusterEpochUsAttributeInteractionInfo = new InteractionInfo( @@ -1431,7 +1431,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterEpochSCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterepochSCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterEpochSCommandParams.put("value", testClusterepochSCommandParameterInfo); InteractionInfo writeTestClusterEpochSAttributeInteractionInfo = new InteractionInfo( @@ -1447,7 +1447,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterVendorIdCommandParams = new LinkedHashMap(); CommandParameterInfo testClustervendorIdCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterVendorIdCommandParams.put("value", testClustervendorIdCommandParameterInfo); InteractionInfo writeTestClusterVendorIdAttributeInteractionInfo = new InteractionInfo( @@ -1463,7 +1463,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterEnumAttrCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterenumAttrCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterEnumAttrCommandParams.put("value", testClusterenumAttrCommandParameterInfo); InteractionInfo writeTestClusterEnumAttrAttributeInteractionInfo = new InteractionInfo( @@ -1479,7 +1479,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterRangeRestrictedInt8uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterrangeRestrictedInt8uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterRangeRestrictedInt8uCommandParams.put( "value", testClusterrangeRestrictedInt8uCommandParameterInfo); InteractionInfo writeTestClusterRangeRestrictedInt8uAttributeInteractionInfo = @@ -1497,7 +1497,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterRangeRestrictedInt8sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterrangeRestrictedInt8sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterRangeRestrictedInt8sCommandParams.put( "value", testClusterrangeRestrictedInt8sCommandParameterInfo); InteractionInfo writeTestClusterRangeRestrictedInt8sAttributeInteractionInfo = @@ -1515,7 +1515,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterRangeRestrictedInt16uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterrangeRestrictedInt16uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterRangeRestrictedInt16uCommandParams.put( "value", testClusterrangeRestrictedInt16uCommandParameterInfo); InteractionInfo writeTestClusterRangeRestrictedInt16uAttributeInteractionInfo = @@ -1533,7 +1533,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterRangeRestrictedInt16sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterrangeRestrictedInt16sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterRangeRestrictedInt16sCommandParams.put( "value", testClusterrangeRestrictedInt16sCommandParameterInfo); InteractionInfo writeTestClusterRangeRestrictedInt16sAttributeInteractionInfo = @@ -1551,7 +1551,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterTimedWriteBooleanCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertimedWriteBooleanCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeTestClusterTimedWriteBooleanCommandParams.put( "value", testClustertimedWriteBooleanCommandParameterInfo); InteractionInfo writeTestClusterTimedWriteBooleanAttributeInteractionInfo = @@ -1571,7 +1571,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterUnsupportedCommandParams = new LinkedHashMap(); CommandParameterInfo testClusterunsupportedCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeTestClusterUnsupportedCommandParams.put( "value", testClusterunsupportedCommandParameterInfo); InteractionInfo writeTestClusterUnsupportedAttributeInteractionInfo = @@ -1588,7 +1588,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableBooleanCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableBooleanCommandParameterInfo = - new CommandParameterInfo("value", boolean.class); + new CommandParameterInfo("value", Boolean.class); writeTestClusterNullableBooleanCommandParams.put( "value", testClusternullableBooleanCommandParameterInfo); InteractionInfo writeTestClusterNullableBooleanAttributeInteractionInfo = @@ -1605,7 +1605,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableBitmap8CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableBitmap8CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableBitmap8CommandParams.put( "value", testClusternullableBitmap8CommandParameterInfo); InteractionInfo writeTestClusterNullableBitmap8AttributeInteractionInfo = @@ -1622,7 +1622,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableBitmap16CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableBitmap16CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableBitmap16CommandParams.put( "value", testClusternullableBitmap16CommandParameterInfo); InteractionInfo writeTestClusterNullableBitmap16AttributeInteractionInfo = @@ -1639,7 +1639,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableBitmap32CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableBitmap32CommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableBitmap32CommandParams.put( "value", testClusternullableBitmap32CommandParameterInfo); InteractionInfo writeTestClusterNullableBitmap32AttributeInteractionInfo = @@ -1656,7 +1656,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableBitmap64CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableBitmap64CommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableBitmap64CommandParams.put( "value", testClusternullableBitmap64CommandParameterInfo); InteractionInfo writeTestClusterNullableBitmap64AttributeInteractionInfo = @@ -1673,7 +1673,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt8uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt8uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableInt8uCommandParams.put( "value", testClusternullableInt8uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt8uAttributeInteractionInfo = @@ -1690,7 +1690,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt16uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt16uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableInt16uCommandParams.put( "value", testClusternullableInt16uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt16uAttributeInteractionInfo = @@ -1707,7 +1707,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt24uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt24uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt24uCommandParams.put( "value", testClusternullableInt24uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt24uAttributeInteractionInfo = @@ -1724,7 +1724,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt32uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt32uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt32uCommandParams.put( "value", testClusternullableInt32uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt32uAttributeInteractionInfo = @@ -1741,7 +1741,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt40uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt40uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt40uCommandParams.put( "value", testClusternullableInt40uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt40uAttributeInteractionInfo = @@ -1758,7 +1758,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt48uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt48uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt48uCommandParams.put( "value", testClusternullableInt48uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt48uAttributeInteractionInfo = @@ -1775,7 +1775,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt56uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt56uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt56uCommandParams.put( "value", testClusternullableInt56uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt56uAttributeInteractionInfo = @@ -1792,7 +1792,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt64uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt64uCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt64uCommandParams.put( "value", testClusternullableInt64uCommandParameterInfo); InteractionInfo writeTestClusterNullableInt64uAttributeInteractionInfo = @@ -1809,7 +1809,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt8sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt8sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableInt8sCommandParams.put( "value", testClusternullableInt8sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt8sAttributeInteractionInfo = @@ -1826,7 +1826,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt16sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt16sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableInt16sCommandParams.put( "value", testClusternullableInt16sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt16sAttributeInteractionInfo = @@ -1843,7 +1843,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt24sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt24sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt24sCommandParams.put( "value", testClusternullableInt24sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt24sAttributeInteractionInfo = @@ -1860,7 +1860,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt32sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt32sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt32sCommandParams.put( "value", testClusternullableInt32sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt32sAttributeInteractionInfo = @@ -1877,7 +1877,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt40sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt40sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt40sCommandParams.put( "value", testClusternullableInt40sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt40sAttributeInteractionInfo = @@ -1894,7 +1894,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt48sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt48sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt48sCommandParams.put( "value", testClusternullableInt48sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt48sAttributeInteractionInfo = @@ -1911,7 +1911,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt56sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt56sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt56sCommandParams.put( "value", testClusternullableInt56sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt56sAttributeInteractionInfo = @@ -1928,7 +1928,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableInt64sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableInt64sCommandParameterInfo = - new CommandParameterInfo("value", long.class); + new CommandParameterInfo("value", Long.class); writeTestClusterNullableInt64sCommandParams.put( "value", testClusternullableInt64sCommandParameterInfo); InteractionInfo writeTestClusterNullableInt64sAttributeInteractionInfo = @@ -1945,7 +1945,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableEnum8CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableEnum8CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableEnum8CommandParams.put( "value", testClusternullableEnum8CommandParameterInfo); InteractionInfo writeTestClusterNullableEnum8AttributeInteractionInfo = @@ -1962,7 +1962,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableEnum16CommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableEnum16CommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableEnum16CommandParams.put( "value", testClusternullableEnum16CommandParameterInfo); InteractionInfo writeTestClusterNullableEnum16AttributeInteractionInfo = @@ -1979,7 +1979,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableFloatSingleCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableFloatSingleCommandParameterInfo = - new CommandParameterInfo("value", float.class); + new CommandParameterInfo("value", Float.class); writeTestClusterNullableFloatSingleCommandParams.put( "value", testClusternullableFloatSingleCommandParameterInfo); InteractionInfo writeTestClusterNullableFloatSingleAttributeInteractionInfo = @@ -1997,7 +1997,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableFloatDoubleCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableFloatDoubleCommandParameterInfo = - new CommandParameterInfo("value", double.class); + new CommandParameterInfo("value", Double.class); writeTestClusterNullableFloatDoubleCommandParams.put( "value", testClusternullableFloatDoubleCommandParameterInfo); InteractionInfo writeTestClusterNullableFloatDoubleAttributeInteractionInfo = @@ -2051,7 +2051,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableEnumAttrCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableEnumAttrCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableEnumAttrCommandParams.put( "value", testClusternullableEnumAttrCommandParameterInfo); InteractionInfo writeTestClusterNullableEnumAttrAttributeInteractionInfo = @@ -2068,7 +2068,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableRangeRestrictedInt8uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableRangeRestrictedInt8uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableRangeRestrictedInt8uCommandParams.put( "value", testClusternullableRangeRestrictedInt8uCommandParameterInfo); InteractionInfo writeTestClusterNullableRangeRestrictedInt8uAttributeInteractionInfo = @@ -2086,7 +2086,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableRangeRestrictedInt8sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableRangeRestrictedInt8sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableRangeRestrictedInt8sCommandParams.put( "value", testClusternullableRangeRestrictedInt8sCommandParameterInfo); InteractionInfo writeTestClusterNullableRangeRestrictedInt8sAttributeInteractionInfo = @@ -2104,7 +2104,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableRangeRestrictedInt16uCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableRangeRestrictedInt16uCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableRangeRestrictedInt16uCommandParams.put( "value", testClusternullableRangeRestrictedInt16uCommandParameterInfo); InteractionInfo writeTestClusterNullableRangeRestrictedInt16uAttributeInteractionInfo = @@ -2122,7 +2122,7 @@ public Map> getWriteAttributeMap() { Map writeTestClusterNullableRangeRestrictedInt16sCommandParams = new LinkedHashMap(); CommandParameterInfo testClusternullableRangeRestrictedInt16sCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTestClusterNullableRangeRestrictedInt16sCommandParams.put( "value", testClusternullableRangeRestrictedInt16sCommandParameterInfo); InteractionInfo writeTestClusterNullableRangeRestrictedInt16sAttributeInteractionInfo = @@ -2142,7 +2142,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatOccupiedCoolingSetpointCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatoccupiedCoolingSetpointCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatOccupiedCoolingSetpointCommandParams.put( "value", thermostatoccupiedCoolingSetpointCommandParameterInfo); InteractionInfo writeThermostatOccupiedCoolingSetpointAttributeInteractionInfo = @@ -2160,7 +2160,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatOccupiedHeatingSetpointCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatoccupiedHeatingSetpointCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatOccupiedHeatingSetpointCommandParams.put( "value", thermostatoccupiedHeatingSetpointCommandParameterInfo); InteractionInfo writeThermostatOccupiedHeatingSetpointAttributeInteractionInfo = @@ -2178,7 +2178,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatMinHeatSetpointLimitCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatminHeatSetpointLimitCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatMinHeatSetpointLimitCommandParams.put( "value", thermostatminHeatSetpointLimitCommandParameterInfo); InteractionInfo writeThermostatMinHeatSetpointLimitAttributeInteractionInfo = @@ -2196,7 +2196,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatMaxHeatSetpointLimitCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatmaxHeatSetpointLimitCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatMaxHeatSetpointLimitCommandParams.put( "value", thermostatmaxHeatSetpointLimitCommandParameterInfo); InteractionInfo writeThermostatMaxHeatSetpointLimitAttributeInteractionInfo = @@ -2214,7 +2214,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatMinCoolSetpointLimitCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatminCoolSetpointLimitCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatMinCoolSetpointLimitCommandParams.put( "value", thermostatminCoolSetpointLimitCommandParameterInfo); InteractionInfo writeThermostatMinCoolSetpointLimitAttributeInteractionInfo = @@ -2232,7 +2232,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatMaxCoolSetpointLimitCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatmaxCoolSetpointLimitCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatMaxCoolSetpointLimitCommandParams.put( "value", thermostatmaxCoolSetpointLimitCommandParameterInfo); InteractionInfo writeThermostatMaxCoolSetpointLimitAttributeInteractionInfo = @@ -2250,7 +2250,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatMinSetpointDeadBandCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatminSetpointDeadBandCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatMinSetpointDeadBandCommandParams.put( "value", thermostatminSetpointDeadBandCommandParameterInfo); InteractionInfo writeThermostatMinSetpointDeadBandAttributeInteractionInfo = @@ -2268,7 +2268,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatControlSequenceOfOperationCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatcontrolSequenceOfOperationCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatControlSequenceOfOperationCommandParams.put( "value", thermostatcontrolSequenceOfOperationCommandParameterInfo); InteractionInfo writeThermostatControlSequenceOfOperationAttributeInteractionInfo = @@ -2286,7 +2286,7 @@ public Map> getWriteAttributeMap() { Map writeThermostatSystemModeCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatsystemModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatSystemModeCommandParams.put("value", thermostatsystemModeCommandParameterInfo); InteractionInfo writeThermostatSystemModeAttributeInteractionInfo = new InteractionInfo( @@ -2307,7 +2307,7 @@ public Map> getWriteAttributeMap() { new LinkedHashMap(); CommandParameterInfo thermostatUserInterfaceConfigurationtemperatureDisplayModeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatUserInterfaceConfigurationTemperatureDisplayModeCommandParams.put( "value", thermostatUserInterfaceConfigurationtemperatureDisplayModeCommandParameterInfo); InteractionInfo @@ -2328,7 +2328,7 @@ public Map> getWriteAttributeMap() { writeThermostatUserInterfaceConfigurationKeypadLockoutCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatUserInterfaceConfigurationkeypadLockoutCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatUserInterfaceConfigurationKeypadLockoutCommandParams.put( "value", thermostatUserInterfaceConfigurationkeypadLockoutCommandParameterInfo); InteractionInfo writeThermostatUserInterfaceConfigurationKeypadLockoutAttributeInteractionInfo = @@ -2348,7 +2348,7 @@ public Map> getWriteAttributeMap() { new LinkedHashMap(); CommandParameterInfo thermostatUserInterfaceConfigurationscheduleProgrammingVisibilityCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCommandParams.put( "value", thermostatUserInterfaceConfigurationscheduleProgrammingVisibilityCommandParameterInfo); @@ -2376,7 +2376,7 @@ public Map> getWriteAttributeMap() { Map writeTimeFormatLocalizationHourFormatCommandParams = new LinkedHashMap(); CommandParameterInfo timeFormatLocalizationhourFormatCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTimeFormatLocalizationHourFormatCommandParams.put( "value", timeFormatLocalizationhourFormatCommandParameterInfo); InteractionInfo writeTimeFormatLocalizationHourFormatAttributeInteractionInfo = @@ -2393,7 +2393,7 @@ public Map> getWriteAttributeMap() { Map writeTimeFormatLocalizationActiveCalendarTypeCommandParams = new LinkedHashMap(); CommandParameterInfo timeFormatLocalizationactiveCalendarTypeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeTimeFormatLocalizationActiveCalendarTypeCommandParams.put( "value", timeFormatLocalizationactiveCalendarTypeCommandParameterInfo); InteractionInfo writeTimeFormatLocalizationActiveCalendarTypeAttributeInteractionInfo = @@ -2419,7 +2419,7 @@ public Map> getWriteAttributeMap() { Map writeWindowCoveringModeCommandParams = new LinkedHashMap(); CommandParameterInfo windowCoveringmodeCommandParameterInfo = - new CommandParameterInfo("value", int.class); + new CommandParameterInfo("value", Integer.class); writeWindowCoveringModeCommandParams.put("value", windowCoveringmodeCommandParameterInfo); InteractionInfo writeWindowCoveringModeAttributeInteractionInfo = new InteractionInfo( diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 19e6218790dd43..2f4761401e5dc8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -25,9 +25,9 @@ #import "CHIPCommandPayloadsObjc.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" -#import "CHIPListUtils_internal.h" #import "CHIPStructsObjc.h" +#include #include using chip::Callback::Callback; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 78d7266e95cd0c..9917ce84541a81 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -22,11 +22,11 @@ #import "CHIPCluster_internal.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" -#import "CHIPListUtils_internal.h" #import "zap-generated/CHIPTestClustersObjc.h" #import "zap-generated/tests/CHIPClustersTest.h" +#include #include using chip::Callback::Callback; From 76e17b33b2f6130043e65f996116920bd6ae8789 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:43:52 -0500 Subject: [PATCH 3/8] loop fix (#13828) --- src/include/platform/AttributeList.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/platform/AttributeList.h b/src/include/platform/AttributeList.h index 1a1a133a0b7688..75bc34089c2ad8 100644 --- a/src/include/platform/AttributeList.h +++ b/src/include/platform/AttributeList.h @@ -37,7 +37,7 @@ class AttributeList { public: Iterator(const AttributeList * AttributeList, int index); - T operator*() const; + const T & operator*() const; Iterator & operator++(); bool operator!=(const Iterator & other) const; @@ -114,7 +114,7 @@ inline AttributeList::Iterator::Iterator(const AttributeList * pAttr {} template -inline T AttributeList::Iterator::operator*() const +inline const T & AttributeList::Iterator::operator*() const { return mAttributeListPtr->operator[](mIndex); } From 9714464c7f1ba9af6c1b6c431f423a2433fbec17 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 21 Jan 2022 17:00:09 -0500 Subject: [PATCH 4/8] Ran zap regen (#13837) --- .../app1/zap-generated/CHIPClusters.cpp | 18 +++++++++--------- .../app2/zap-generated/CHIPClusters.cpp | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp index 13cc9f6dad651e..457d4f05c136ed 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.cpp @@ -76,7 +76,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -119,7 +119,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -162,7 +162,7 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -204,7 +204,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -246,7 +246,7 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -288,7 +288,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -331,7 +331,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -373,7 +373,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -417,7 +417,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp index 13cc9f6dad651e..457d4f05c136ed 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.cpp @@ -76,7 +76,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -119,7 +119,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -162,7 +162,7 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -204,7 +204,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -246,7 +246,7 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -288,7 +288,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -331,7 +331,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -373,7 +373,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. @@ -417,7 +417,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - SuccessOrExit(err = mDevice->SendCommands(sender.get())); + SuccessOrExit(err = mDevice->SendCommands(sender.get(), mTimeout)); // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object // now. From a6c36e2f20b25c11198f71936789a44c05d3aee4 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 21 Jan 2022 17:33:19 -0500 Subject: [PATCH 5/8] Update ZAP to pick up reportability changes. (#13802) We can now explicitly default all attributes to "reportable". XML files will be able to set reportingPolicy="prohibited" for things that the Matter spec decides are not subscribable. --- src/app/zap-templates/zcl/zcl.json | 2 +- .../data_model/controller-clusters.matter | 2 +- .../python/chip/clusters/CHIPClusters.py | 1 + .../CHIP/zap-generated/CHIPClustersObjc.h | 4 ++ .../CHIP/zap-generated/CHIPClustersObjc.mm | 18 ++++++++ third_party/zap/repo | 2 +- .../zap-generated/cluster/Commands.h | 46 +++++++++++++++++++ 7 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 9b5ef11f101753..e61c272394d9c9 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -88,5 +88,5 @@ "commandDiscovery": true } }, - "defaultReportable": true + "defaultReportingPolicy": "mandatory" } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 6ed9021d8578ca..feadc65972985e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2320,7 +2320,7 @@ client cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } - readonly nosubscribe attribute NOCStruct NOCs[] = 0; + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 249033c9b28d71..ac70de06e3d252 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3326,6 +3326,7 @@ class ChipClusters: "attributeName": "NOCs", "attributeId": 0x00000000, "type": "", + "reportable": True, }, 0x00000001: { "attributeName": "FabricsList", diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 070c19d5b47fb0..f87e7a3b3bbcd9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -3107,6 +3107,10 @@ NS_ASSUME_NONNULL_BEGIN NSError * _Nullable error))completionHandler; - (void)readAttributeNOCsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNOCsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 2f4761401e5dc8..7509278a1e24af 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -12980,6 +12980,24 @@ new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( }); } +- (void)subscribeAttributeNOCsWithMinInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + minInterval, maxInterval, + CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + }, + subscriptionEstablishedHandler); +} + - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/third_party/zap/repo b/third_party/zap/repo index d57a2656ed73c1..1f8065a628fbe9 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit d57a2656ed73c12a72e393ab65cb0a729b9593a9 +Subproject commit 1f8065a628fbe9c9b01a1070755f43ac0985dc5b diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 384ebd02d12741..038067ac719f27 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -32819,6 +32819,51 @@ class ReadOperationalCredentialsNOCs : public ModelCommand } }; +class ReportOperationalCredentialsNOCs : public ModelCommand +{ +public: + ReportOperationalCredentialsNOCs() : ModelCommand("report") + { + AddArgument("attr-name", "nocs"); + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval); + AddArgument("wait", 0, 1, &mWait); + ModelCommand::AddArguments(); + } + + ~ReportOperationalCredentialsNOCs() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) ReportAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + + auto subscriptionEstablishedCallback = mWait ? OnDefaultSuccessResponseWithoutExit : OnDefaultSuccessResponse; + return cluster.SubscribeAttribute( + this, OnValueReport, OnDefaultFailure, mMinInterval, mMaxInterval, subscriptionEstablishedCallback); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } + + static void OnValueReport( + void * context, + const chip::app::DataModel::DecodableList & + value) + { + LogValue("OperationalCredentials.NOCs report", 0, value); + } + +private: + uint16_t mMinInterval; + uint16_t mMaxInterval; + bool mWait; +}; + /* * Attribute FabricsList */ @@ -61606,6 +61651,7 @@ void registerClusterOperationalCredentials(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // From f6d24b26bf0b77ea23f1bac7718a1a80d96e9356 Mon Sep 17 00:00:00 2001 From: Austin Hsieh Date: Mon, 24 Jan 2022 12:37:54 -0800 Subject: [PATCH 6/8] Use UniquePtr, fix templates --- .../java/templates/CHIPClusters-JNI.zapt | 9 +- .../java/templates/CHIPClustersWrite-JNI.zapt | 8 +- .../java/templates/ChipStructs-java.zapt | 17 +- .../java/templates/partials/encode_value.zapt | 10 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 2016 ++++----------- .../zap-generated/CHIPClustersWrite-JNI.cpp | 1409 +++-------- .../chip/devicecontroller/ChipStructs.java | 2187 ++++++++--------- 7 files changed, 1933 insertions(+), 3723 deletions(-) diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index e7e70bb837e2fd..18866d15401aa2 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -13,12 +13,12 @@ #include #include #include -#include #include #include #include #include #include +#include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME @@ -55,8 +55,8 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) ListFreer listFreer; chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; {{#chip_cluster_command_arguments}} {{>encode_value target=(concat "request." (asLowerCamelCase label)) source=(asLowerCamelCase label) cluster=(asUpperCamelCase parent.parent.name) depth=0}} {{/chip_cluster_command_arguments}} @@ -86,9 +86,6 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, {{asLowerCamelCase name}}) {{/if}} VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), [](chip::JniByteArray * jniByteArray){ chip::Platform::Delete(jniByteArray);}); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), [](chip::JniUtfString * jniString){ chip::Platform::Delete(jniString);}); - onSuccess.release(); onFailure.release(); } diff --git a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt index 3b846ddc6574cb..9829fc1e7e491d 100644 --- a/src/controller/java/templates/CHIPClustersWrite-JNI.zapt +++ b/src/controller/java/templates/CHIPClustersWrite-JNI.zapt @@ -18,6 +18,7 @@ #include #include #include +#include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME @@ -37,8 +38,8 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase na using TypeInfo = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Attributes::{{asUpperCamelCase name}}::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; {{>encode_value target="cppValue" source="value" cluster=(asUpperCamelCase parent.name) depth=0}} @@ -66,9 +67,6 @@ JNI_METHOD(void, {{asUpperCamelCase ../name}}Cluster, write{{asUpperCamelCase na {{/if}} VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), [](chip::JniByteArray * jniByteArray){ chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), [](chip::JniUtfString * jniString){ chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } diff --git a/src/controller/java/templates/ChipStructs-java.zapt b/src/controller/java/templates/ChipStructs-java.zapt index 937efcc3279918..317b9a518c2c71 100644 --- a/src/controller/java/templates/ChipStructs-java.zapt +++ b/src/controller/java/templates/ChipStructs-java.zapt @@ -1,19 +1,22 @@ {{> header}} -{{#if (chip_has_client_clusters)}} package chip.devicecontroller; +{{#if (chip_has_client_clusters)}} import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.Optional; +{{/if}} +{{! TODO: Use AutoValue for inner classes. }} public class ChipStructs { - -{{#zcl_clusters}} +{{#if (chip_has_client_clusters)}} +{{#chip_client_clusters}} {{#zcl_structs}} {{#if itemCnt}} public static class {{asUpperCamelCase parent.name}}Cluster{{asUnderlyingType name}} { {{#zcl_struct_items}} +{{! TODO: This uses the vague type List for some list types. }} public {{asJavaType type null parent.parent.name includeAnnotations=true}} {{asLowerCamelCase (asSymbol label)}}; {{/zcl_struct_items}} @@ -51,8 +54,6 @@ public {{asJavaType type null parent.parent.name includeAnnotations=true}} {{asL {{/if}} {{/zcl_structs}} -{{/zcl_clusters}} - -} - -{{/if}} \ No newline at end of file +{{/chip_client_clusters}} +{{/if}} +} \ No newline at end of file diff --git a/src/controller/java/templates/partials/encode_value.zapt b/src/controller/java/templates/partials/encode_value.zapt index ad314afacfa3fe..111444b1083f87 100644 --- a/src/controller/java/templates/partials/encode_value.zapt +++ b/src/controller/java/templates/partials/encode_value.zapt @@ -33,13 +33,11 @@ } } {{else if (isOctetString type)}} - auto {{source}}Jni = chip::Platform::New(env, static_cast({{source}})); - cleanupByteArrays.push_back({{source}}Jni); - {{target}} = {{source}}Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast({{source}}))); + {{target}} = cleanupByteArrays.back()->byteSpan(); {{else if (isCharString type)}} - auto {{source}}Jni = chip::Platform::New(env, static_cast({{source}})); - cleanupStrings.push_back({{source}}Jni); - {{target}} = {{source}}Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast({{source}}))); + {{target}} = cleanupStrings.back()->charSpan(); {{else}} {{#if_is_struct type}} {{#zcl_struct_items_by_struct_name type}} diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 2cc26192ca7f75..9543012bc9c284 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -33,8 +33,8 @@ #include #include #include -#include #include +#include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME @@ -231,11 +231,10 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::GetSetupPINRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto tempAccountIdentifierJni = chip::Platform::New(env, static_cast(tempAccountIdentifier)); - cleanupStrings.push_back(tempAccountIdentifierJni); - request.tempAccountIdentifier = tempAccountIdentifierJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(tempAccountIdentifier))); + request.tempAccountIdentifier = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -265,11 +264,6 @@ JNI_METHOD(void, AccountLoginCluster, getSetupPINRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -284,14 +278,12 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::LoginRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto tempAccountIdentifierJni = chip::Platform::New(env, static_cast(tempAccountIdentifier)); - cleanupStrings.push_back(tempAccountIdentifierJni); - request.tempAccountIdentifier = tempAccountIdentifierJni->charSpan(); - auto setupPINJni = chip::Platform::New(env, static_cast(setupPIN)); - cleanupStrings.push_back(setupPINJni); - request.setupPIN = setupPINJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(tempAccountIdentifier))); + request.tempAccountIdentifier = cleanupStrings.back()->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(setupPIN))); + request.setupPIN = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -325,11 +317,6 @@ JNI_METHOD(void, AccountLoginCluster, loginRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -343,8 +330,8 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest) ListFreer listFreer; chip::app::Clusters::AccountLogin::Commands::LogoutRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -371,11 +358,6 @@ JNI_METHOD(void, AccountLoginCluster, logoutRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -473,8 +455,8 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.commissioningTimeout = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(commissioningTimeout)); @@ -510,11 +492,6 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openBasicCommissioningWindow AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -529,20 +506,18 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.commissioningTimeout = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(commissioningTimeout)); - auto PAKEVerifierJni = chip::Platform::New(env, static_cast(PAKEVerifier)); - cleanupByteArrays.push_back(PAKEVerifierJni); - request.PAKEVerifier = PAKEVerifierJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(PAKEVerifier))); + request.PAKEVerifier = cleanupByteArrays.back()->byteSpan(); request.discriminator = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(discriminator)); request.iterations = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(iterations)); - auto saltJni = chip::Platform::New(env, static_cast(salt)); - cleanupByteArrays.push_back(saltJni); - request.salt = saltJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(salt))); + request.salt = cleanupByteArrays.back()->byteSpan(); request.passcodeID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(passcodeID)); @@ -578,11 +553,6 @@ JNI_METHOD(void, AdministratorCommissioningCluster, openCommissioningWindow) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -596,8 +566,8 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -631,11 +601,6 @@ JNI_METHOD(void, AdministratorCommissioningCluster, revokeCommissioning) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1200,8 +1165,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::HideAppRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject application_catalogVendorIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", application_catalogVendorIdItem_0); @@ -1210,10 +1175,9 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) jobject application_applicationIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", application_applicationIdItem_0); - auto application_applicationIdItem_0Jni = - chip::Platform::New(env, static_cast(application_applicationIdItem_0)); - cleanupStrings.push_back(application_applicationIdItem_0Jni); - request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(application_applicationIdItem_0))); + request.application.applicationId = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -1250,11 +1214,6 @@ JNI_METHOD(void, ApplicationLauncherCluster, hideAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1268,11 +1227,10 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::LaunchAppRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto dataJni = chip::Platform::New(env, static_cast(data)); - cleanupStrings.push_back(dataJni); - request.data = dataJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(data))); + request.data = cleanupStrings.back()->charSpan(); jobject application_catalogVendorIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", application_catalogVendorIdItem_0); @@ -1281,10 +1239,9 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) jobject application_applicationIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", application_applicationIdItem_0); - auto application_applicationIdItem_0Jni = - chip::Platform::New(env, static_cast(application_applicationIdItem_0)); - cleanupStrings.push_back(application_applicationIdItem_0Jni); - request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(application_applicationIdItem_0))); + request.application.applicationId = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -1321,11 +1278,6 @@ JNI_METHOD(void, ApplicationLauncherCluster, launchAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1339,8 +1291,8 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) ListFreer listFreer; chip::app::Clusters::ApplicationLauncher::Commands::StopAppRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject application_catalogVendorIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "catalogVendorId", "Ljava/lang/Integer;", application_catalogVendorIdItem_0); @@ -1349,10 +1301,9 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) jobject application_applicationIdItem_0; chip::JniReferences::GetInstance().GetObjectField(application, "applicationId", "Ljava/lang/String;", application_applicationIdItem_0); - auto application_applicationIdItem_0Jni = - chip::Platform::New(env, static_cast(application_applicationIdItem_0)); - cleanupStrings.push_back(application_applicationIdItem_0Jni); - request.application.applicationId = application_applicationIdItem_0Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(application_applicationIdItem_0))); + request.application.applicationId = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -1389,11 +1340,6 @@ JNI_METHOD(void, ApplicationLauncherCluster, stopAppRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1533,13 +1479,12 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::RenameOutputRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.index = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); - auto nameJni = chip::Platform::New(env, static_cast(name)); - cleanupStrings.push_back(nameJni); - request.name = nameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(name))); + request.name = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1573,11 +1518,6 @@ JNI_METHOD(void, AudioOutputCluster, renameOutputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1591,8 +1531,8 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::SelectOutputRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.index = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); @@ -1628,11 +1568,6 @@ JNI_METHOD(void, AudioOutputCluster, selectOutputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1805,8 +1740,8 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) ListFreer listFreer; chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.percentOpen = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(percentOpen)); @@ -1842,11 +1777,6 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlGoToPercent) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1860,8 +1790,8 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop) ListFreer listFreer; chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1895,11 +1825,6 @@ JNI_METHOD(void, BarrierControlCluster, barrierControlStop) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2145,8 +2070,8 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing) ListFreer listFreer; chip::app::Clusters::Basic::Commands::MfgSpecificPing::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2180,11 +2105,6 @@ JNI_METHOD(void, BasicCluster, mfgSpecificPing) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3174,8 +3094,8 @@ JNI_METHOD(void, BindingCluster, bind) ListFreer listFreer; chip::app::Clusters::Binding::Commands::Bind::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.nodeId = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); request.groupId = static_cast>( @@ -3217,11 +3137,6 @@ JNI_METHOD(void, BindingCluster, bind) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3236,8 +3151,8 @@ JNI_METHOD(void, BindingCluster, unbind) ListFreer listFreer; chip::app::Clusters::Binding::Commands::Unbind::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.nodeId = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(nodeId)); request.groupId = static_cast>( @@ -3279,11 +3194,6 @@ JNI_METHOD(void, BindingCluster, unbind) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3502,8 +3412,8 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::DisableAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3547,11 +3457,6 @@ JNI_METHOD(void, BridgedActionsCluster, disableAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3566,8 +3471,8 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3613,11 +3518,6 @@ JNI_METHOD(void, BridgedActionsCluster, disableActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3631,8 +3531,8 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::EnableAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3676,11 +3576,6 @@ JNI_METHOD(void, BridgedActionsCluster, enableAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3695,8 +3590,8 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3742,11 +3637,6 @@ JNI_METHOD(void, BridgedActionsCluster, enableActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3760,8 +3650,8 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::InstantAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3805,11 +3695,6 @@ JNI_METHOD(void, BridgedActionsCluster, instantAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3824,8 +3709,8 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3871,11 +3756,6 @@ JNI_METHOD(void, BridgedActionsCluster, instantActionWithTransition) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3889,8 +3769,8 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::PauseAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -3934,11 +3814,6 @@ JNI_METHOD(void, BridgedActionsCluster, pauseAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3953,8 +3828,8 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -4000,11 +3875,6 @@ JNI_METHOD(void, BridgedActionsCluster, pauseActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4018,8 +3888,8 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -4063,11 +3933,6 @@ JNI_METHOD(void, BridgedActionsCluster, resumeAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4081,8 +3946,8 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StartAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -4126,11 +3991,6 @@ JNI_METHOD(void, BridgedActionsCluster, startAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4145,8 +4005,8 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -4192,11 +4052,6 @@ JNI_METHOD(void, BridgedActionsCluster, startActionWithDuration) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4210,8 +4065,8 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) ListFreer listFreer; chip::app::Clusters::BridgedActions::Commands::StopAction::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.actionID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(actionID)); if (invokeID != nullptr) @@ -4255,11 +4110,6 @@ JNI_METHOD(void, BridgedActionsCluster, stopAction) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4556,8 +4406,8 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) ListFreer listFreer; chip::app::Clusters::Channel::Commands::ChangeChannelByNumberRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.majorNumber = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(majorNumber)); request.minorNumber = static_cast>( @@ -4595,11 +4445,6 @@ JNI_METHOD(void, ChannelCluster, changeChannelByNumberRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4613,11 +4458,10 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) ListFreer listFreer; chip::app::Clusters::Channel::Commands::ChangeChannelRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto matchJni = chip::Platform::New(env, static_cast(match)); - cleanupStrings.push_back(matchJni); - request.match = matchJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(match))); + request.match = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess(Platform::New(callback), @@ -4653,11 +4497,6 @@ JNI_METHOD(void, ChannelCluster, changeChannelRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4671,8 +4510,8 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest) ListFreer listFreer; chip::app::Clusters::Channel::Commands::SkipChannelRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.count = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(count)); @@ -4708,11 +4547,6 @@ JNI_METHOD(void, ChannelCluster, skipChannelRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4849,8 +4683,8 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.updateFlags = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(updateFlags)); request.action = static_cast>( @@ -4898,11 +4732,6 @@ JNI_METHOD(void, ColorControlCluster, colorLoopSet) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4917,8 +4746,8 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -4960,11 +4789,6 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4979,8 +4803,8 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.enhancedHue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); request.direction = static_cast>( @@ -5024,11 +4848,6 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5043,8 +4862,8 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.enhancedHue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(enhancedHue)); request.saturation = static_cast>( @@ -5088,11 +4907,6 @@ JNI_METHOD(void, ColorControlCluster, enhancedMoveToHueAndSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5107,8 +4921,8 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -5152,11 +4966,6 @@ JNI_METHOD(void, ColorControlCluster, enhancedStepHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5171,8 +4980,8 @@ JNI_METHOD(void, ColorControlCluster, moveColor) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.rateX = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(rateX)); request.rateY = @@ -5214,11 +5023,6 @@ JNI_METHOD(void, ColorControlCluster, moveColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5233,8 +5037,8 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -5280,11 +5084,6 @@ JNI_METHOD(void, ColorControlCluster, moveColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5299,8 +5098,8 @@ JNI_METHOD(void, ColorControlCluster, moveHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -5342,11 +5141,6 @@ JNI_METHOD(void, ColorControlCluster, moveHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5361,8 +5155,8 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -5404,11 +5198,6 @@ JNI_METHOD(void, ColorControlCluster, moveSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5423,8 +5212,8 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.colorX = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorX)); request.colorY = static_cast>( @@ -5468,11 +5257,6 @@ JNI_METHOD(void, ColorControlCluster, moveToColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5487,8 +5271,8 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.colorTemperature = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(colorTemperature)); request.transitionTime = static_cast>( @@ -5530,11 +5314,6 @@ JNI_METHOD(void, ColorControlCluster, moveToColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5549,8 +5328,8 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.hue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); request.direction = static_cast>( @@ -5594,11 +5373,6 @@ JNI_METHOD(void, ColorControlCluster, moveToHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5613,8 +5387,8 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.hue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(hue)); request.saturation = static_cast>( @@ -5658,11 +5432,6 @@ JNI_METHOD(void, ColorControlCluster, moveToHueAndSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5677,8 +5446,8 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.saturation = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(saturation)); request.transitionTime = static_cast>( @@ -5720,11 +5489,6 @@ JNI_METHOD(void, ColorControlCluster, moveToSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5739,8 +5503,8 @@ JNI_METHOD(void, ColorControlCluster, stepColor) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColor::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepX = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(stepX)); request.stepY = @@ -5784,11 +5548,6 @@ JNI_METHOD(void, ColorControlCluster, stepColor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5804,8 +5563,8 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -5853,11 +5612,6 @@ JNI_METHOD(void, ColorControlCluster, stepColorTemperature) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5872,8 +5626,8 @@ JNI_METHOD(void, ColorControlCluster, stepHue) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -5917,11 +5671,6 @@ JNI_METHOD(void, ColorControlCluster, stepHue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5936,8 +5685,8 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -5981,11 +5730,6 @@ JNI_METHOD(void, ColorControlCluster, stepSaturation) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6000,8 +5744,8 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.optionsMask = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(optionsMask)); request.optionsOverride = static_cast>( @@ -6039,11 +5783,6 @@ JNI_METHOD(void, ColorControlCluster, stopMoveStep) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8070,13 +7809,12 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) ListFreer listFreer; chip::app::Clusters::ContentLauncher::Commands::LaunchContentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.autoPlay = static_cast>( chip::JniReferences::GetInstance().BooleanToPrimitive(autoPlay)); - auto dataJni = chip::Platform::New(env, static_cast(data)); - cleanupStrings.push_back(dataJni); - request.data = dataJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(data))); + request.data = cleanupStrings.back()->charSpan(); { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -8118,10 +7856,9 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) jobject element_2_valueItem_3; chip::JniReferences::GetInstance().GetObjectField(element_2, "value", "Ljava/lang/String;", element_2_valueItem_3); - auto element_2_valueItem_3Jni = - chip::Platform::New(env, static_cast(element_2_valueItem_3)); - cleanupStrings.push_back(element_2_valueItem_3Jni); - listHolder_2->mList[i_2].value = element_2_valueItem_3Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_2_valueItem_3))); + listHolder_2->mList[i_2].value = cleanupStrings.back()->charSpan(); jobject element_2_externalIDListItem_3; chip::JniReferences::GetInstance().GetObjectField(element_2, "externalIDList", "Ljava/util/ArrayList;", element_2_externalIDListItem_3); @@ -8144,17 +7881,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) jobject element_4_nameItem_5; chip::JniReferences::GetInstance().GetObjectField(element_4, "name", "Ljava/lang/String;", element_4_nameItem_5); - auto element_4_nameItem_5Jni = chip::Platform::New( - env, static_cast(element_4_nameItem_5)); - cleanupStrings.push_back(element_4_nameItem_5Jni); - listHolder_4->mList[i_4].name = element_4_nameItem_5Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(element_4_nameItem_5))); + listHolder_4->mList[i_4].name = cleanupStrings.back()->charSpan(); jobject element_4_valueItem_5; chip::JniReferences::GetInstance().GetObjectField(element_4, "value", "Ljava/lang/String;", element_4_valueItem_5); - auto element_4_valueItem_5Jni = chip::Platform::New( - env, static_cast(element_4_valueItem_5)); - cleanupStrings.push_back(element_4_valueItem_5Jni); - listHolder_4->mList[i_4].value = element_4_valueItem_5Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(element_4_valueItem_5))); + listHolder_4->mList[i_4].value = cleanupStrings.back()->charSpan(); } listHolder_2->mList[i_2].externalIDList = ListType_4(listHolder_4->mList, element_2_externalIDListItem_3Size); @@ -8215,11 +7950,6 @@ JNI_METHOD(void, ContentLauncherCluster, launchContentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8234,21 +7964,18 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) ListFreer listFreer; chip::app::Clusters::ContentLauncher::Commands::LaunchURLRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto contentURLJni = chip::Platform::New(env, static_cast(contentURL)); - cleanupStrings.push_back(contentURLJni); - request.contentURL = contentURLJni->charSpan(); - auto displayStringJni = chip::Platform::New(env, static_cast(displayString)); - cleanupStrings.push_back(displayStringJni); - request.displayString = displayStringJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(contentURL))); + request.contentURL = cleanupStrings.back()->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(displayString))); + request.displayString = cleanupStrings.back()->charSpan(); jobject brandingInformation_providerNameItem_0; chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "providerName", "Ljava/lang/String;", brandingInformation_providerNameItem_0); - auto brandingInformation_providerNameItem_0Jni = - chip::Platform::New(env, static_cast(brandingInformation_providerNameItem_0)); - cleanupStrings.push_back(brandingInformation_providerNameItem_0Jni); - request.brandingInformation.providerName = brandingInformation_providerNameItem_0Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_providerNameItem_0))); + request.brandingInformation.providerName = cleanupStrings.back()->charSpan(); jobject brandingInformation_backgroundItem_0; chip::JniReferences::GetInstance().GetObjectField(brandingInformation, "background", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterStyleInformation;", @@ -8256,17 +7983,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) jobject brandingInformation_backgroundItem_0_imageUrlItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "imageUrl", "Ljava/lang/String;", brandingInformation_backgroundItem_0_imageUrlItem_1); - auto brandingInformation_backgroundItem_0_imageUrlItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_backgroundItem_0_imageUrlItem_1)); - cleanupStrings.push_back(brandingInformation_backgroundItem_0_imageUrlItem_1Jni); - request.brandingInformation.background.imageUrl = brandingInformation_backgroundItem_0_imageUrlItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(brandingInformation_backgroundItem_0_imageUrlItem_1))); + request.brandingInformation.background.imageUrl = cleanupStrings.back()->charSpan(); jobject brandingInformation_backgroundItem_0_colorItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "color", "Ljava/lang/String;", brandingInformation_backgroundItem_0_colorItem_1); - auto brandingInformation_backgroundItem_0_colorItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_backgroundItem_0_colorItem_1)); - cleanupStrings.push_back(brandingInformation_backgroundItem_0_colorItem_1Jni); - request.brandingInformation.background.color = brandingInformation_backgroundItem_0_colorItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(brandingInformation_backgroundItem_0_colorItem_1))); + request.brandingInformation.background.color = cleanupStrings.back()->charSpan(); jobject brandingInformation_backgroundItem_0_sizeItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_backgroundItem_0, "size", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", @@ -8299,17 +8024,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) jobject brandingInformation_logoItem_0_imageUrlItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "imageUrl", "Ljava/lang/String;", brandingInformation_logoItem_0_imageUrlItem_1); - auto brandingInformation_logoItem_0_imageUrlItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_logoItem_0_imageUrlItem_1)); - cleanupStrings.push_back(brandingInformation_logoItem_0_imageUrlItem_1Jni); - request.brandingInformation.logo.imageUrl = brandingInformation_logoItem_0_imageUrlItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_logoItem_0_imageUrlItem_1))); + request.brandingInformation.logo.imageUrl = cleanupStrings.back()->charSpan(); jobject brandingInformation_logoItem_0_colorItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "color", "Ljava/lang/String;", brandingInformation_logoItem_0_colorItem_1); - auto brandingInformation_logoItem_0_colorItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_logoItem_0_colorItem_1)); - cleanupStrings.push_back(brandingInformation_logoItem_0_colorItem_1Jni); - request.brandingInformation.logo.color = brandingInformation_logoItem_0_colorItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_logoItem_0_colorItem_1))); + request.brandingInformation.logo.color = cleanupStrings.back()->charSpan(); jobject brandingInformation_logoItem_0_sizeItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_logoItem_0, "size", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", @@ -8339,17 +8062,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) jobject brandingInformation_progressBarItem_0_imageUrlItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "imageUrl", "Ljava/lang/String;", brandingInformation_progressBarItem_0_imageUrlItem_1); - auto brandingInformation_progressBarItem_0_imageUrlItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_progressBarItem_0_imageUrlItem_1)); - cleanupStrings.push_back(brandingInformation_progressBarItem_0_imageUrlItem_1Jni); - request.brandingInformation.progressBar.imageUrl = brandingInformation_progressBarItem_0_imageUrlItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(brandingInformation_progressBarItem_0_imageUrlItem_1))); + request.brandingInformation.progressBar.imageUrl = cleanupStrings.back()->charSpan(); jobject brandingInformation_progressBarItem_0_colorItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "color", "Ljava/lang/String;", brandingInformation_progressBarItem_0_colorItem_1); - auto brandingInformation_progressBarItem_0_colorItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_progressBarItem_0_colorItem_1)); - cleanupStrings.push_back(brandingInformation_progressBarItem_0_colorItem_1Jni); - request.brandingInformation.progressBar.color = brandingInformation_progressBarItem_0_colorItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(brandingInformation_progressBarItem_0_colorItem_1))); + request.brandingInformation.progressBar.color = cleanupStrings.back()->charSpan(); jobject brandingInformation_progressBarItem_0_sizeItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_progressBarItem_0, "size", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", @@ -8382,17 +8103,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) jobject brandingInformation_splashItem_0_imageUrlItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "imageUrl", "Ljava/lang/String;", brandingInformation_splashItem_0_imageUrlItem_1); - auto brandingInformation_splashItem_0_imageUrlItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_splashItem_0_imageUrlItem_1)); - cleanupStrings.push_back(brandingInformation_splashItem_0_imageUrlItem_1Jni); - request.brandingInformation.splash.imageUrl = brandingInformation_splashItem_0_imageUrlItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_splashItem_0_imageUrlItem_1))); + request.brandingInformation.splash.imageUrl = cleanupStrings.back()->charSpan(); jobject brandingInformation_splashItem_0_colorItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "color", "Ljava/lang/String;", brandingInformation_splashItem_0_colorItem_1); - auto brandingInformation_splashItem_0_colorItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_splashItem_0_colorItem_1)); - cleanupStrings.push_back(brandingInformation_splashItem_0_colorItem_1Jni); - request.brandingInformation.splash.color = brandingInformation_splashItem_0_colorItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_splashItem_0_colorItem_1))); + request.brandingInformation.splash.color = cleanupStrings.back()->charSpan(); jobject brandingInformation_splashItem_0_sizeItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_splashItem_0, "size", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", @@ -8422,17 +8141,15 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) jobject brandingInformation_waterMarkItem_0_imageUrlItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "imageUrl", "Ljava/lang/String;", brandingInformation_waterMarkItem_0_imageUrlItem_1); - auto brandingInformation_waterMarkItem_0_imageUrlItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_waterMarkItem_0_imageUrlItem_1)); - cleanupStrings.push_back(brandingInformation_waterMarkItem_0_imageUrlItem_1Jni); - request.brandingInformation.waterMark.imageUrl = brandingInformation_waterMarkItem_0_imageUrlItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(brandingInformation_waterMarkItem_0_imageUrlItem_1))); + request.brandingInformation.waterMark.imageUrl = cleanupStrings.back()->charSpan(); jobject brandingInformation_waterMarkItem_0_colorItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "color", "Ljava/lang/String;", brandingInformation_waterMarkItem_0_colorItem_1); - auto brandingInformation_waterMarkItem_0_colorItem_1Jni = - chip::Platform::New(env, static_cast(brandingInformation_waterMarkItem_0_colorItem_1)); - cleanupStrings.push_back(brandingInformation_waterMarkItem_0_colorItem_1Jni); - request.brandingInformation.waterMark.color = brandingInformation_waterMarkItem_0_colorItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(brandingInformation_waterMarkItem_0_colorItem_1))); + request.brandingInformation.waterMark.color = cleanupStrings.back()->charSpan(); jobject brandingInformation_waterMarkItem_0_sizeItem_1; chip::JniReferences::GetInstance().GetObjectField(brandingInformation_waterMarkItem_0, "size", "Lchip/devicecontroller/ChipStructs$ContentLauncherClusterDimension;", @@ -8492,11 +8209,6 @@ JNI_METHOD(void, ContentLauncherCluster, launchURLRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8909,15 +8621,15 @@ JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) ListFreer listFreer; chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.intent = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(intent)); request.requestedProtocol = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(requestedProtocol)); - auto transferFileDesignatorJni = chip::Platform::New(env, static_cast(transferFileDesignator)); - cleanupByteArrays.push_back(transferFileDesignatorJni); - request.transferFileDesignator = transferFileDesignatorJni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(transferFileDesignator))); + request.transferFileDesignator = cleanupByteArrays.back()->byteSpan(); std::unique_ptr @@ -8954,11 +8666,6 @@ JNI_METHOD(void, DiagnosticLogsCluster, retrieveLogsRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9019,8 +8726,8 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject credential_credentialTypeItem_0; chip::JniReferences::GetInstance().GetObjectField(credential, "credentialType", "Ljava/lang/Integer;", credential_credentialTypeItem_0); @@ -9064,11 +8771,6 @@ JNI_METHOD(void, DoorLockCluster, clearCredential) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9082,8 +8784,8 @@ JNI_METHOD(void, DoorLockCluster, clearUser) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.userIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); @@ -9119,11 +8821,6 @@ JNI_METHOD(void, DoorLockCluster, clearUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9137,8 +8834,8 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject credential_credentialTypeItem_0; chip::JniReferences::GetInstance().GetObjectField(credential, "credentialType", "Ljava/lang/Integer;", credential_credentialTypeItem_0); @@ -9185,11 +8882,6 @@ JNI_METHOD(void, DoorLockCluster, getCredentialStatus) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9203,8 +8895,8 @@ JNI_METHOD(void, DoorLockCluster, getUser) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetUser::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.userIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); @@ -9241,11 +8933,6 @@ JNI_METHOD(void, DoorLockCluster, getUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9259,16 +8946,15 @@ JNI_METHOD(void, DoorLockCluster, lockDoor) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (pinCode != nullptr) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(pinCode, optionalValue_0); - auto & definedValue_0 = request.pinCode.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); + auto & definedValue_0 = request.pinCode.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); } std::unique_ptr onSuccess( @@ -9303,11 +8989,6 @@ JNI_METHOD(void, DoorLockCluster, lockDoor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9322,8 +9003,8 @@ JNI_METHOD(void, DoorLockCluster, setCredential) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetCredential::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.operationType = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); jobject credential_credentialTypeItem_0; @@ -9336,9 +9017,8 @@ JNI_METHOD(void, DoorLockCluster, setCredential) credential_credentialIndexItem_0); request.credential.credentialIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(credential_credentialIndexItem_0)); - auto credentialDataJni = chip::Platform::New(env, static_cast(credentialData)); - cleanupByteArrays.push_back(credentialDataJni); - request.credentialData = credentialDataJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(credentialData))); + request.credentialData = cleanupByteArrays.back()->byteSpan(); request.userIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(userIndex)); request.userStatus = static_cast>( @@ -9378,11 +9058,6 @@ JNI_METHOD(void, DoorLockCluster, setCredential) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9397,8 +9072,8 @@ JNI_METHOD(void, DoorLockCluster, setUser) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetUser::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.operationType = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(operationType)); request.userIndex = static_cast>( @@ -9410,9 +9085,8 @@ JNI_METHOD(void, DoorLockCluster, setUser) else { auto & nonNullValue_0 = request.userName.SetNonNull(); - auto userNameJni = chip::Platform::New(env, static_cast(userName)); - cleanupStrings.push_back(userNameJni); - nonNullValue_0 = userNameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(userName))); + nonNullValue_0 = cleanupStrings.back()->charSpan(); } if (userUniqueId == nullptr) { @@ -9463,11 +9137,6 @@ JNI_METHOD(void, DoorLockCluster, setUser) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -9481,16 +9150,15 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor) ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (pinCode != nullptr) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(pinCode, optionalValue_0); - auto & definedValue_0 = request.pinCode.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); + auto & definedValue_0 = request.pinCode.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); } std::unique_ptr onSuccess( @@ -9525,11 +9193,6 @@ JNI_METHOD(void, DoorLockCluster, unlockDoor) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -10714,8 +10377,8 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) ListFreer listFreer; chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -10749,11 +10412,6 @@ JNI_METHOD(void, EthernetNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -11587,8 +11245,8 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.expiryLengthSeconds = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(expiryLengthSeconds)); request.breadcrumb = static_cast>( @@ -11631,11 +11289,6 @@ JNI_METHOD(void, GeneralCommissioningCluster, armFailSafe) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -11649,8 +11302,8 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr @@ -11688,11 +11341,6 @@ JNI_METHOD(void, GeneralCommissioningCluster, commissioningComplete) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -11707,13 +11355,12 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) ListFreer listFreer; chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.location = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(location)); - auto countryCodeJni = chip::Platform::New(env, static_cast(countryCode)); - cleanupStrings.push_back(countryCodeJni); - request.countryCode = countryCodeJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(countryCode))); + request.countryCode = cleanupStrings.back()->charSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); request.timeoutMs = static_cast>( @@ -11755,11 +11402,6 @@ JNI_METHOD(void, GeneralCommissioningCluster, setRegulatoryConfig) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12403,8 +12045,8 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupKeySetID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); @@ -12443,11 +12085,6 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRead) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12461,8 +12098,8 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -12524,11 +12161,6 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetReadAllIndices) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12542,8 +12174,8 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupKeySetID = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySetID)); @@ -12579,11 +12211,6 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetRemove) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12597,8 +12224,8 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject groupKeySet_groupKeySetIDItem_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "groupKeySetID", "Ljava/lang/Integer;", groupKeySet_groupKeySetIDItem_0); @@ -12611,10 +12238,9 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) chip::JniReferences::GetInstance().IntegerToPrimitive(groupKeySet_securityPolicyItem_0)); jobject groupKeySet_epochKey0Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey0", "[B", groupKeySet_epochKey0Item_0); - auto groupKeySet_epochKey0Item_0Jni = - chip::Platform::New(env, static_cast(groupKeySet_epochKey0Item_0)); - cleanupByteArrays.push_back(groupKeySet_epochKey0Item_0Jni); - request.groupKeySet.epochKey0 = groupKeySet_epochKey0Item_0Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(groupKeySet_epochKey0Item_0))); + request.groupKeySet.epochKey0 = cleanupByteArrays.back()->byteSpan(); jobject groupKeySet_epochStartTime0Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime0", "Ljava/lang/Long;", groupKeySet_epochStartTime0Item_0); @@ -12622,10 +12248,9 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) chip::JniReferences::GetInstance().LongToPrimitive(groupKeySet_epochStartTime0Item_0)); jobject groupKeySet_epochKey1Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey1", "[B", groupKeySet_epochKey1Item_0); - auto groupKeySet_epochKey1Item_0Jni = - chip::Platform::New(env, static_cast(groupKeySet_epochKey1Item_0)); - cleanupByteArrays.push_back(groupKeySet_epochKey1Item_0Jni); - request.groupKeySet.epochKey1 = groupKeySet_epochKey1Item_0Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(groupKeySet_epochKey1Item_0))); + request.groupKeySet.epochKey1 = cleanupByteArrays.back()->byteSpan(); jobject groupKeySet_epochStartTime1Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime1", "Ljava/lang/Long;", groupKeySet_epochStartTime1Item_0); @@ -12633,10 +12258,9 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) chip::JniReferences::GetInstance().LongToPrimitive(groupKeySet_epochStartTime1Item_0)); jobject groupKeySet_epochKey2Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochKey2", "[B", groupKeySet_epochKey2Item_0); - auto groupKeySet_epochKey2Item_0Jni = - chip::Platform::New(env, static_cast(groupKeySet_epochKey2Item_0)); - cleanupByteArrays.push_back(groupKeySet_epochKey2Item_0Jni); - request.groupKeySet.epochKey2 = groupKeySet_epochKey2Item_0Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(groupKeySet_epochKey2Item_0))); + request.groupKeySet.epochKey2 = cleanupByteArrays.back()->byteSpan(); jobject groupKeySet_epochStartTime2Item_0; chip::JniReferences::GetInstance().GetObjectField(groupKeySet, "epochStartTime2", "Ljava/lang/Long;", groupKeySet_epochStartTime2Item_0); @@ -12675,11 +12299,6 @@ JNI_METHOD(void, GroupKeyManagementCluster, keySetWrite) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12931,13 +12550,12 @@ JNI_METHOD(void, GroupsCluster, addGroup) ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - auto groupNameJni = chip::Platform::New(env, static_cast(groupName)); - cleanupStrings.push_back(groupNameJni); - request.groupName = groupNameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(groupName))); + request.groupName = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), @@ -12972,11 +12590,6 @@ JNI_METHOD(void, GroupsCluster, addGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -12990,13 +12603,12 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); - auto groupNameJni = chip::Platform::New(env, static_cast(groupName)); - cleanupStrings.push_back(groupNameJni); - request.groupName = groupNameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(groupName))); + request.groupName = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -13030,11 +12642,6 @@ JNI_METHOD(void, GroupsCluster, addGroupIfIdentifying) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13048,8 +12655,8 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) ListFreer listFreer; chip::app::Clusters::Groups::Commands::GetGroupMembership::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -13110,11 +12717,6 @@ JNI_METHOD(void, GroupsCluster, getGroupMembership) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13128,8 +12730,8 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups) ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -13163,11 +12765,6 @@ JNI_METHOD(void, GroupsCluster, removeAllGroups) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13181,8 +12778,8 @@ JNI_METHOD(void, GroupsCluster, removeGroup) ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); @@ -13220,11 +12817,6 @@ JNI_METHOD(void, GroupsCluster, removeGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13238,8 +12830,8 @@ JNI_METHOD(void, GroupsCluster, viewGroup) ListFreer listFreer; chip::app::Clusters::Groups::Commands::ViewGroup::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); @@ -13276,11 +12868,6 @@ JNI_METHOD(void, GroupsCluster, viewGroup) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13415,8 +13002,8 @@ JNI_METHOD(void, IdentifyCluster, identify) ListFreer listFreer; chip::app::Clusters::Identify::Commands::Identify::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.identifyTime = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(identifyTime)); @@ -13452,11 +13039,6 @@ JNI_METHOD(void, IdentifyCluster, identify) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13470,8 +13052,8 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) ListFreer listFreer; chip::app::Clusters::Identify::Commands::IdentifyQuery::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -13507,11 +13089,6 @@ JNI_METHOD(void, IdentifyCluster, identifyQuery) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -13526,8 +13103,8 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) ListFreer listFreer; chip::app::Clusters::Identify::Commands::TriggerEffect::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.effectIdentifier = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(effectIdentifier)); request.effectVariant = static_cast>( @@ -13565,11 +13142,6 @@ JNI_METHOD(void, IdentifyCluster, triggerEffect) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14023,8 +13595,8 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) ListFreer listFreer; chip::app::Clusters::KeypadInput::Commands::SendKeyRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.keyCode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(keyCode)); @@ -14062,11 +13634,6 @@ JNI_METHOD(void, KeypadInputCluster, sendKeyRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14165,8 +13732,8 @@ JNI_METHOD(void, LevelControlCluster, move) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -14208,11 +13775,6 @@ JNI_METHOD(void, LevelControlCluster, move) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14227,8 +13789,8 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.level = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); request.transitionTime = static_cast>( @@ -14270,11 +13832,6 @@ JNI_METHOD(void, LevelControlCluster, moveToLevel) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14289,8 +13846,8 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.level = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(level)); request.transitionTime = static_cast>( @@ -14328,11 +13885,6 @@ JNI_METHOD(void, LevelControlCluster, moveToLevelWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14346,8 +13898,8 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.moveMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(moveMode)); request.rate = @@ -14385,11 +13937,6 @@ JNI_METHOD(void, LevelControlCluster, moveWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14404,8 +13951,8 @@ JNI_METHOD(void, LevelControlCluster, step) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -14449,11 +13996,6 @@ JNI_METHOD(void, LevelControlCluster, step) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14468,8 +14010,8 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.stepMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(stepMode)); request.stepSize = static_cast>( @@ -14509,11 +14051,6 @@ JNI_METHOD(void, LevelControlCluster, stepWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14528,8 +14065,8 @@ JNI_METHOD(void, LevelControlCluster, stop) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.optionMask = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(optionMask)); request.optionOverride = static_cast>( @@ -14567,11 +14104,6 @@ JNI_METHOD(void, LevelControlCluster, stop) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -14585,8 +14117,8 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14620,11 +14152,6 @@ JNI_METHOD(void, LevelControlCluster, stopWithOnOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15373,8 +14900,8 @@ JNI_METHOD(void, LowPowerCluster, sleep) ListFreer listFreer; chip::app::Clusters::LowPower::Commands::Sleep::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15408,11 +14935,6 @@ JNI_METHOD(void, LowPowerCluster, sleep) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15510,8 +15032,8 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::HideInputStatusRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15545,11 +15067,6 @@ JNI_METHOD(void, MediaInputCluster, hideInputStatusRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15563,13 +15080,12 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::RenameInputRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.index = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); - auto nameJni = chip::Platform::New(env, static_cast(name)); - cleanupStrings.push_back(nameJni); - request.name = nameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(name))); + request.name = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15603,11 +15119,6 @@ JNI_METHOD(void, MediaInputCluster, renameInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15621,8 +15132,8 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::SelectInputRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.index = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(index)); @@ -15658,11 +15169,6 @@ JNI_METHOD(void, MediaInputCluster, selectInputRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15676,8 +15182,8 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::ShowInputStatusRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15711,11 +15217,6 @@ JNI_METHOD(void, MediaInputCluster, showInputStatusRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15888,8 +15389,8 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::FastForwardRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -15925,11 +15426,6 @@ JNI_METHOD(void, MediaPlaybackCluster, fastForwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15943,8 +15439,8 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::NextRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -15980,11 +15476,6 @@ JNI_METHOD(void, MediaPlaybackCluster, nextRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -15998,8 +15489,8 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PauseRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16035,11 +15526,6 @@ JNI_METHOD(void, MediaPlaybackCluster, pauseRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16053,8 +15539,8 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PlayRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16090,11 +15576,6 @@ JNI_METHOD(void, MediaPlaybackCluster, playRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16108,8 +15589,8 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::PreviousRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16145,11 +15626,6 @@ JNI_METHOD(void, MediaPlaybackCluster, previousRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16163,8 +15639,8 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::RewindRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16200,11 +15676,6 @@ JNI_METHOD(void, MediaPlaybackCluster, rewindRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16218,8 +15689,8 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SeekRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.position = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(position)); @@ -16257,11 +15728,6 @@ JNI_METHOD(void, MediaPlaybackCluster, seekRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16275,8 +15741,8 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipBackwardRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.deltaPositionMilliseconds = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); @@ -16314,11 +15780,6 @@ JNI_METHOD(void, MediaPlaybackCluster, skipBackwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16332,8 +15793,8 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::SkipForwardRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.deltaPositionMilliseconds = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(deltaPositionMilliseconds)); @@ -16371,11 +15832,6 @@ JNI_METHOD(void, MediaPlaybackCluster, skipForwardRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16389,8 +15845,8 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StartOverRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16426,11 +15882,6 @@ JNI_METHOD(void, MediaPlaybackCluster, startOverRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16444,8 +15895,8 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::StopRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess(Platform::New(callback), @@ -16481,11 +15932,6 @@ JNI_METHOD(void, MediaPlaybackCluster, stopRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -16805,8 +16251,8 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode) ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.newMode = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(newMode)); @@ -16842,11 +16288,6 @@ JNI_METHOD(void, ModeSelectCluster, changeToMode) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17131,11 +16572,10 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto operationalDatasetJni = chip::Platform::New(env, static_cast(operationalDataset)); - cleanupByteArrays.push_back(operationalDatasetJni); - request.operationalDataset = operationalDatasetJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(operationalDataset))); + request.operationalDataset = cleanupByteArrays.back()->byteSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); @@ -17174,11 +16614,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateThreadNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17193,14 +16628,12 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto ssidJni = chip::Platform::New(env, static_cast(ssid)); - cleanupByteArrays.push_back(ssidJni); - request.ssid = ssidJni->byteSpan(); - auto credentialsJni = chip::Platform::New(env, static_cast(credentials)); - cleanupByteArrays.push_back(credentialsJni); - request.credentials = credentialsJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(ssid))); + request.ssid = cleanupByteArrays.back()->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(credentials))); + request.credentials = cleanupByteArrays.back()->byteSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); @@ -17239,11 +16672,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, addOrUpdateWiFiNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17258,11 +16686,10 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); - cleanupByteArrays.push_back(networkIDJni); - request.networkID = networkIDJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(networkID))); + request.networkID = cleanupByteArrays.back()->byteSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); @@ -17301,11 +16728,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, connectNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17320,11 +16742,10 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); - cleanupByteArrays.push_back(networkIDJni); - request.networkID = networkIDJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(networkID))); + request.networkID = cleanupByteArrays.back()->byteSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); @@ -17363,11 +16784,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, removeNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17382,11 +16798,10 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto networkIDJni = chip::Platform::New(env, static_cast(networkID)); - cleanupByteArrays.push_back(networkIDJni); - request.networkID = networkIDJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(networkID))); + request.networkID = cleanupByteArrays.back()->byteSpan(); request.networkIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(networkIndex)); request.breadcrumb = static_cast>( @@ -17427,11 +16842,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, reorderNetwork) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17445,11 +16855,10 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) ListFreer listFreer; chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto ssidJni = chip::Platform::New(env, static_cast(ssid)); - cleanupByteArrays.push_back(ssidJni); - request.ssid = ssidJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(ssid))); + request.ssid = cleanupByteArrays.back()->byteSpan(); request.breadcrumb = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(breadcrumb)); @@ -17488,11 +16897,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, scanNetworks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17892,11 +17296,10 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto updateTokenJni = chip::Platform::New(env, static_cast(updateToken)); - cleanupByteArrays.push_back(updateTokenJni); - request.updateToken = updateTokenJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(updateToken))); + request.updateToken = cleanupByteArrays.back()->byteSpan(); request.newVersion = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(newVersion)); @@ -17935,11 +17338,6 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, applyUpdateRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -17954,11 +17352,10 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto updateTokenJni = chip::Platform::New(env, static_cast(updateToken)); - cleanupByteArrays.push_back(updateTokenJni); - request.updateToken = updateTokenJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(updateToken))); + request.updateToken = cleanupByteArrays.back()->byteSpan(); request.softwareVersion = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(softwareVersion)); @@ -17994,11 +17391,6 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, notifyUpdateApplied) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18014,8 +17406,8 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) ListFreer listFreer; chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.vendorId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(vendorId)); request.productId = static_cast>( @@ -18058,10 +17450,9 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(location, optionalValue_0); - auto & definedValue_0 = request.location.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupStrings.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->charSpan(); + auto & definedValue_0 = request.location.Emplace(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupStrings.back()->charSpan(); } if (requestorCanConsent != nullptr) { @@ -18075,10 +17466,9 @@ JNI_METHOD(void, OtaSoftwareUpdateProviderCluster, queryImage) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(metadataForProvider, optionalValue_0); - auto & definedValue_0 = request.metadataForProvider.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); + auto & definedValue_0 = request.metadataForProvider.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); } std::unique_ptr cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.providerNodeId = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(providerNodeId)); request.vendorId = static_cast>( @@ -18234,10 +17619,9 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(metadataForNode, optionalValue_0); - auto & definedValue_0 = request.metadataForNode.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); + auto & definedValue_0 = request.metadataForNode.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); } request.endpoint = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(endpoint)); @@ -18274,11 +17658,6 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, announceOtaProvider) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18734,8 +18113,8 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -18769,11 +18148,6 @@ JNI_METHOD(void, OnOffCluster, off)(JNIEnv * env, jobject self, jlong clusterPtr AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18788,8 +18162,8 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OffWithEffect::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.effectId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(effectId)); request.effectVariant = static_cast>( @@ -18827,11 +18201,6 @@ JNI_METHOD(void, OnOffCluster, offWithEffect) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18844,8 +18213,8 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -18879,11 +18248,6 @@ JNI_METHOD(void, OnOffCluster, on)(JNIEnv * env, jobject self, jlong clusterPtr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18897,8 +18261,8 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -18932,11 +18296,6 @@ JNI_METHOD(void, OnOffCluster, onWithRecallGlobalScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -18951,8 +18310,8 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) ListFreer listFreer; chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.onOffControl = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(onOffControl)); request.onTime = static_cast>( @@ -18992,11 +18351,6 @@ JNI_METHOD(void, OnOffCluster, onWithTimedOff) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19009,8 +18363,8 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Toggle::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -19044,11 +18398,6 @@ JNI_METHOD(void, OnOffCluster, toggle)(JNIEnv * env, jobject self, jlong cluster AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19528,23 +18877,20 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto NOCValueJni = chip::Platform::New(env, static_cast(NOCValue)); - cleanupByteArrays.push_back(NOCValueJni); - request.NOCValue = NOCValueJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(NOCValue))); + request.NOCValue = cleanupByteArrays.back()->byteSpan(); if (ICACValue != nullptr) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, optionalValue_0); - auto & definedValue_0 = request.ICACValue.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); - } - auto IPKValueJni = chip::Platform::New(env, static_cast(IPKValue)); - cleanupByteArrays.push_back(IPKValueJni); - request.IPKValue = IPKValueJni->byteSpan(); + auto & definedValue_0 = request.ICACValue.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); + } + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(IPKValue))); + request.IPKValue = cleanupByteArrays.back()->byteSpan(); request.caseAdminNode = static_cast>( chip::JniReferences::GetInstance().LongToPrimitive(caseAdminNode)); request.adminVendorId = static_cast>( @@ -19585,11 +18931,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, addNOC) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19603,11 +18944,10 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto rootCertificateJni = chip::Platform::New(env, static_cast(rootCertificate)); - cleanupByteArrays.push_back(rootCertificateJni); - request.rootCertificate = rootCertificateJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(rootCertificate))); + request.rootCertificate = cleanupByteArrays.back()->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -19641,11 +18981,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, addTrustedRootCertificate) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19659,11 +18994,10 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto attestationNonceJni = chip::Platform::New(env, static_cast(attestationNonce)); - cleanupByteArrays.push_back(attestationNonceJni); - request.attestationNonce = attestationNonceJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(attestationNonce))); + request.attestationNonce = cleanupByteArrays.back()->byteSpan(); std::unique_ptr @@ -19700,11 +19034,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, attestationRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19718,8 +19047,8 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.certificateType = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(certificateType)); @@ -19759,11 +19088,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, certificateChainRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19777,11 +19101,10 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto CSRNonceJni = chip::Platform::New(env, static_cast(CSRNonce)); - cleanupByteArrays.push_back(CSRNonceJni); - request.CSRNonce = CSRNonceJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(CSRNonce))); + request.CSRNonce = cleanupByteArrays.back()->byteSpan(); std::unique_ptr @@ -19818,11 +19141,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, opCSRRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19836,8 +19154,8 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.fabricIndex = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex)); @@ -19876,11 +19194,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeFabric) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19894,11 +19207,11 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto trustedRootIdentifierJni = chip::Platform::New(env, static_cast(trustedRootIdentifier)); - cleanupByteArrays.push_back(trustedRootIdentifierJni); - request.trustedRootIdentifier = trustedRootIdentifierJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(trustedRootIdentifier))); + request.trustedRootIdentifier = cleanupByteArrays.back()->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -19932,11 +19245,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, removeTrustedRootCertificate) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -19950,11 +19258,10 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto labelJni = chip::Platform::New(env, static_cast(label)); - cleanupStrings.push_back(labelJni); - request.label = labelJni->charSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(label))); + request.label = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -19991,11 +19298,6 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateFabricLabel) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -20010,19 +19312,17 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; - auto NOCValueJni = chip::Platform::New(env, static_cast(NOCValue)); - cleanupByteArrays.push_back(NOCValueJni); - request.NOCValue = NOCValueJni->byteSpan(); + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(NOCValue))); + request.NOCValue = cleanupByteArrays.back()->byteSpan(); if (ICACValue != nullptr) { jobject optionalValue_0; chip::JniReferences::GetInstance().GetOptionalValue(ICACValue, optionalValue_0); - auto & definedValue_0 = request.ICACValue.Emplace(); - auto optionalValue_0Jni = chip::Platform::New(env, static_cast(optionalValue_0)); - cleanupByteArrays.push_back(optionalValue_0Jni); - definedValue_0 = optionalValue_0Jni->byteSpan(); + auto & definedValue_0 = request.ICACValue.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); } std::unique_ptr cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); request.sceneId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(sceneId)); request.transitionTime = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(transitionTime)); - auto sceneNameJni = chip::Platform::New(env, static_cast(sceneName)); - cleanupStrings.push_back(sceneNameJni); - request.sceneName = sceneNameJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(sceneName))); + request.sceneName = cleanupStrings.back()->charSpan(); { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -22499,11 +21793,6 @@ JNI_METHOD(void, ScenesCluster, addScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22517,8 +21806,8 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); @@ -22557,11 +21846,6 @@ JNI_METHOD(void, ScenesCluster, getSceneMembership) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22576,8 +21860,8 @@ JNI_METHOD(void, ScenesCluster, recallScene) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RecallScene::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); request.sceneId = static_cast>( @@ -22617,11 +21901,6 @@ JNI_METHOD(void, ScenesCluster, recallScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22635,8 +21914,8 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); @@ -22674,11 +21953,6 @@ JNI_METHOD(void, ScenesCluster, removeAllScenes) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22692,8 +21966,8 @@ JNI_METHOD(void, ScenesCluster, removeScene) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::RemoveScene::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); request.sceneId = static_cast>( @@ -22733,11 +22007,6 @@ JNI_METHOD(void, ScenesCluster, removeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22751,8 +22020,8 @@ JNI_METHOD(void, ScenesCluster, storeScene) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::StoreScene::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); request.sceneId = static_cast>( @@ -22791,11 +22060,6 @@ JNI_METHOD(void, ScenesCluster, storeScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -22809,8 +22073,8 @@ JNI_METHOD(void, ScenesCluster, viewScene) ListFreer listFreer; chip::app::Clusters::Scenes::Commands::ViewScene::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.groupId = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(groupId)); request.sceneId = static_cast>( @@ -22849,11 +22113,6 @@ JNI_METHOD(void, ScenesCluster, viewScene) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -23136,8 +22395,8 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) ListFreer listFreer; chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -23171,11 +22430,6 @@ JNI_METHOD(void, SoftwareDiagnosticsCluster, resetWatermarks) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -23694,13 +22948,12 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTargetRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.target = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(target)); - auto dataJni = chip::Platform::New(env, static_cast(data)); - cleanupStrings.push_back(dataJni); - request.data = dataJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(data))); + request.data = cleanupStrings.back()->charSpan(); std::unique_ptr @@ -23737,11 +22990,6 @@ JNI_METHOD(void, TargetNavigatorCluster, navigateTargetRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24153,8 +23401,8 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject arg1_aItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); request.arg1.a = static_cast>( @@ -24169,14 +23417,12 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0)); jobject arg1_dItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "d", "[B", arg1_dItem_0); - auto arg1_dItem_0Jni = chip::Platform::New(env, static_cast(arg1_dItem_0)); - cleanupByteArrays.push_back(arg1_dItem_0Jni); - request.arg1.d = arg1_dItem_0Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_dItem_0))); + request.arg1.d = cleanupByteArrays.back()->byteSpan(); jobject arg1_eItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "e", "Ljava/lang/String;", arg1_eItem_0); - auto arg1_eItem_0Jni = chip::Platform::New(env, static_cast(arg1_eItem_0)); - cleanupStrings.push_back(arg1_eItem_0Jni); - request.arg1.e = arg1_eItem_0Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_eItem_0))); + request.arg1.e = cleanupStrings.back()->charSpan(); jobject arg1_fItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "f", "Ljava/lang/Integer;", arg1_fItem_0); request.arg1.f = static_cast>( @@ -24225,11 +23471,6 @@ JNI_METHOD(void, TestClusterCluster, simpleStructEchoRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24243,8 +23484,8 @@ JNI_METHOD(void, TestClusterCluster, test) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::Test::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -24278,11 +23519,6 @@ JNI_METHOD(void, TestClusterCluster, test) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24296,8 +23532,8 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.arg1 = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); request.arg2 = @@ -24338,11 +23574,6 @@ JNI_METHOD(void, TestClusterCluster, testAddArguments) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24357,8 +23588,8 @@ JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.arg1 = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); request.arg2 = @@ -24401,11 +23632,6 @@ JNI_METHOD(void, TestClusterCluster, testEmitTestEventRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24419,8 +23645,8 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.arg1 = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(arg1)); request.arg2 = @@ -24460,11 +23686,6 @@ JNI_METHOD(void, TestClusterCluster, testEnumsRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24478,8 +23699,8 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -24539,11 +23760,6 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24557,8 +23773,8 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -24619,11 +23835,6 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24637,8 +23848,8 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -24681,17 +23892,15 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1_cItem_2)); jobject element_0_cItem_1_dItem_2; chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "d", "[B", element_0_cItem_1_dItem_2); - auto element_0_cItem_1_dItem_2Jni = - chip::Platform::New(env, static_cast(element_0_cItem_1_dItem_2)); - cleanupByteArrays.push_back(element_0_cItem_1_dItem_2Jni); - listHolder_0->mList[i_0].c.d = element_0_cItem_1_dItem_2Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_cItem_1_dItem_2))); + listHolder_0->mList[i_0].c.d = cleanupByteArrays.back()->byteSpan(); jobject element_0_cItem_1_eItem_2; chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "e", "Ljava/lang/String;", element_0_cItem_1_eItem_2); - auto element_0_cItem_1_eItem_2Jni = - chip::Platform::New(env, static_cast(element_0_cItem_1_eItem_2)); - cleanupStrings.push_back(element_0_cItem_1_eItem_2Jni); - listHolder_0->mList[i_0].c.e = element_0_cItem_1_eItem_2Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_cItem_1_eItem_2))); + listHolder_0->mList[i_0].c.e = cleanupStrings.back()->charSpan(); jobject element_0_cItem_1_fItem_2; chip::JniReferences::GetInstance().GetObjectField(element_0_cItem_1, "f", "Ljava/lang/Integer;", element_0_cItem_1_fItem_2); @@ -24740,17 +23949,15 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_cItem_3)); jobject element_2_dItem_3; chip::JniReferences::GetInstance().GetObjectField(element_2, "d", "[B", element_2_dItem_3); - auto element_2_dItem_3Jni = - chip::Platform::New(env, static_cast(element_2_dItem_3)); - cleanupByteArrays.push_back(element_2_dItem_3Jni); - listHolder_2->mList[i_2].d = element_2_dItem_3Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_2_dItem_3))); + listHolder_2->mList[i_2].d = cleanupByteArrays.back()->byteSpan(); jobject element_2_eItem_3; chip::JniReferences::GetInstance().GetObjectField(element_2, "e", "Ljava/lang/String;", element_2_eItem_3); - auto element_2_eItem_3Jni = - chip::Platform::New(env, static_cast(element_2_eItem_3)); - cleanupStrings.push_back(element_2_eItem_3Jni); - listHolder_2->mList[i_2].e = element_2_eItem_3Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_2_eItem_3))); + listHolder_2->mList[i_2].e = cleanupStrings.back()->charSpan(); jobject element_2_fItem_3; chip::JniReferences::GetInstance().GetObjectField(element_2, "f", "Ljava/lang/Integer;", element_2_fItem_3); @@ -24816,9 +24023,9 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) { jobject element_2; chip::JniReferences::GetInstance().GetArrayListItem(element_0_fItem_1, i_2, element_2); - auto element_2Jni = chip::Platform::New(env, static_cast(element_2)); - cleanupByteArrays.push_back(element_2Jni); - listHolder_2->mList[i_2] = element_2Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_2))); + listHolder_2->mList[i_2] = cleanupByteArrays.back()->byteSpan(); } listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0_fItem_1Size); } @@ -24896,11 +24103,6 @@ JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -24914,8 +24116,8 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; using ListMemberType_0 = ListMemberTypeGetter::Type; @@ -24944,15 +24146,14 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_cItem_1)); jobject element_0_dItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "d", "[B", element_0_dItem_1); - auto element_0_dItem_1Jni = - chip::Platform::New(env, static_cast(element_0_dItem_1)); - cleanupByteArrays.push_back(element_0_dItem_1Jni); - listHolder_0->mList[i_0].d = element_0_dItem_1Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_dItem_1))); + listHolder_0->mList[i_0].d = cleanupByteArrays.back()->byteSpan(); jobject element_0_eItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "e", "Ljava/lang/String;", element_0_eItem_1); - auto element_0_eItem_1Jni = chip::Platform::New(env, static_cast(element_0_eItem_1)); - cleanupStrings.push_back(element_0_eItem_1Jni); - listHolder_0->mList[i_0].e = element_0_eItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_eItem_1))); + listHolder_0->mList[i_0].e = cleanupStrings.back()->charSpan(); jobject element_0_fItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "f", "Ljava/lang/Integer;", element_0_fItem_1); listHolder_0->mList[i_0].f = static_castmList[i_0].f)>>( @@ -25008,11 +24209,6 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25026,8 +24222,8 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject arg1_aItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); request.arg1.a = static_cast>( @@ -25053,14 +24249,12 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_cItem_1)); jobject arg1_cItem_0_dItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "d", "[B", arg1_cItem_0_dItem_1); - auto arg1_cItem_0_dItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_dItem_1)); - cleanupByteArrays.push_back(arg1_cItem_0_dItem_1Jni); - request.arg1.c.d = arg1_cItem_0_dItem_1Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_cItem_0_dItem_1))); + request.arg1.c.d = cleanupByteArrays.back()->byteSpan(); jobject arg1_cItem_0_eItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "e", "Ljava/lang/String;", arg1_cItem_0_eItem_1); - auto arg1_cItem_0_eItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_eItem_1)); - cleanupStrings.push_back(arg1_cItem_0_eItem_1Jni); - request.arg1.c.e = arg1_cItem_0_eItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_cItem_0_eItem_1))); + request.arg1.c.e = cleanupStrings.back()->charSpan(); jobject arg1_cItem_0_fItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "f", "Ljava/lang/Integer;", arg1_cItem_0_fItem_1); request.arg1.c.f = static_cast>( @@ -25108,11 +24302,6 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25126,8 +24315,8 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject arg1_aItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); request.arg1.a = static_cast>( @@ -25153,14 +24342,12 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0_cItem_1)); jobject arg1_cItem_0_dItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "d", "[B", arg1_cItem_0_dItem_1); - auto arg1_cItem_0_dItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_dItem_1)); - cleanupByteArrays.push_back(arg1_cItem_0_dItem_1Jni); - request.arg1.c.d = arg1_cItem_0_dItem_1Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_cItem_0_dItem_1))); + request.arg1.c.d = cleanupByteArrays.back()->byteSpan(); jobject arg1_cItem_0_eItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "e", "Ljava/lang/String;", arg1_cItem_0_eItem_1); - auto arg1_cItem_0_eItem_1Jni = chip::Platform::New(env, static_cast(arg1_cItem_0_eItem_1)); - cleanupStrings.push_back(arg1_cItem_0_eItem_1Jni); - request.arg1.c.e = arg1_cItem_0_eItem_1Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_cItem_0_eItem_1))); + request.arg1.c.e = cleanupStrings.back()->charSpan(); jobject arg1_cItem_0_fItem_1; chip::JniReferences::GetInstance().GetObjectField(arg1_cItem_0, "f", "Ljava/lang/Integer;", arg1_cItem_0_fItem_1); request.arg1.c.f = static_cast>( @@ -25203,15 +24390,14 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(element_1_cItem_2)); jobject element_1_dItem_2; chip::JniReferences::GetInstance().GetObjectField(element_1, "d", "[B", element_1_dItem_2); - auto element_1_dItem_2Jni = - chip::Platform::New(env, static_cast(element_1_dItem_2)); - cleanupByteArrays.push_back(element_1_dItem_2Jni); - listHolder_1->mList[i_1].d = element_1_dItem_2Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_1_dItem_2))); + listHolder_1->mList[i_1].d = cleanupByteArrays.back()->byteSpan(); jobject element_1_eItem_2; chip::JniReferences::GetInstance().GetObjectField(element_1, "e", "Ljava/lang/String;", element_1_eItem_2); - auto element_1_eItem_2Jni = chip::Platform::New(env, static_cast(element_1_eItem_2)); - cleanupStrings.push_back(element_1_eItem_2Jni); - listHolder_1->mList[i_1].e = element_1_eItem_2Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_1_eItem_2))); + listHolder_1->mList[i_1].e = cleanupStrings.back()->charSpan(); jobject element_1_fItem_2; chip::JniReferences::GetInstance().GetObjectField(element_1, "f", "Ljava/lang/Integer;", element_1_fItem_2); listHolder_1->mList[i_1].f = static_castmList[i_1].f)>>( @@ -25274,9 +24460,9 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) { jobject element_1; chip::JniReferences::GetInstance().GetArrayListItem(arg1_fItem_0, i_1, element_1); - auto element_1Jni = chip::Platform::New(env, static_cast(element_1)); - cleanupByteArrays.push_back(element_1Jni); - listHolder_1->mList[i_1] = element_1Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_1))); + listHolder_1->mList[i_1] = cleanupByteArrays.back()->byteSpan(); } request.arg1.f = ListType_1(listHolder_1->mList, arg1_fItem_0Size); } @@ -25346,11 +24532,6 @@ JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25364,8 +24545,8 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -25399,11 +24580,6 @@ JNI_METHOD(void, TestClusterCluster, testNotHandled) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25417,8 +24593,8 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (arg1 != nullptr) { jobject optionalValue_0; @@ -25471,11 +24647,6 @@ JNI_METHOD(void, TestClusterCluster, testNullableOptionalRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25489,8 +24660,8 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (arg1 != nullptr) { jobject optionalValue_0; @@ -25532,11 +24703,6 @@ JNI_METHOD(void, TestClusterCluster, testSimpleOptionalArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25550,8 +24716,8 @@ JNI_METHOD(void, TestClusterCluster, testSpecific) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestSpecific::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr @@ -25588,11 +24754,6 @@ JNI_METHOD(void, TestClusterCluster, testSpecific) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25606,8 +24767,8 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; jobject arg1_aItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "a", "Ljava/lang/Integer;", arg1_aItem_0); request.arg1.a = static_cast>( @@ -25622,14 +24783,12 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) chip::JniReferences::GetInstance().IntegerToPrimitive(arg1_cItem_0)); jobject arg1_dItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "d", "[B", arg1_dItem_0); - auto arg1_dItem_0Jni = chip::Platform::New(env, static_cast(arg1_dItem_0)); - cleanupByteArrays.push_back(arg1_dItem_0Jni); - request.arg1.d = arg1_dItem_0Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_dItem_0))); + request.arg1.d = cleanupByteArrays.back()->byteSpan(); jobject arg1_eItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "e", "Ljava/lang/String;", arg1_eItem_0); - auto arg1_eItem_0Jni = chip::Platform::New(env, static_cast(arg1_eItem_0)); - cleanupStrings.push_back(arg1_eItem_0Jni); - request.arg1.e = arg1_eItem_0Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(arg1_eItem_0))); + request.arg1.e = cleanupStrings.back()->charSpan(); jobject arg1_fItem_0; chip::JniReferences::GetInstance().GetObjectField(arg1, "f", "Ljava/lang/Integer;", arg1_fItem_0); request.arg1.f = static_cast>( @@ -25677,11 +24836,6 @@ JNI_METHOD(void, TestClusterCluster, testStructArgumentRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25695,8 +24849,8 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -25730,11 +24884,6 @@ JNI_METHOD(void, TestClusterCluster, testUnknownCommand) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -25748,8 +24897,8 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TimedInvokeRequest::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -25776,11 +24925,6 @@ JNI_METHOD(void, TestClusterCluster, timedInvokeRequest) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -28749,8 +27893,8 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -28784,11 +27928,6 @@ JNI_METHOD(void, ThermostatCluster, clearWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -28802,8 +27941,8 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr @@ -28840,11 +27979,6 @@ JNI_METHOD(void, ThermostatCluster, getRelayStatusLog) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -28859,8 +27993,8 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.daysToReturn = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(daysToReturn)); request.modeToReturn = static_cast>( @@ -28901,11 +28035,6 @@ JNI_METHOD(void, ThermostatCluster, getWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -28920,8 +28049,8 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.numberOfTransitionsForSequence = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(numberOfTransitionsForSequence)); request.dayOfWeekForSequence = static_cast>( @@ -28985,11 +28114,6 @@ JNI_METHOD(void, ThermostatCluster, setWeeklySchedule) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -29003,8 +28127,8 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) ListFreer listFreer; chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.mode = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(mode)); request.amount = static_cast>( @@ -29042,11 +28166,6 @@ JNI_METHOD(void, ThermostatCluster, setpointRaiseLower) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -30017,8 +29136,8 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) ListFreer listFreer; chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -30052,11 +29171,6 @@ JNI_METHOD(void, ThreadNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -32794,8 +31908,8 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) ListFreer listFreer; chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -32829,11 +31943,6 @@ JNI_METHOD(void, WiFiNetworkDiagnosticsCluster, resetCounts) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33456,8 +32565,8 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -33491,11 +32600,6 @@ JNI_METHOD(void, WindowCoveringCluster, downOrClose) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33510,8 +32614,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.liftPercentageValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(liftPercentageValue)); request.liftPercent100thsValue = static_cast>( @@ -33549,11 +32653,6 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftPercentage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33567,8 +32666,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.liftValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(liftValue)); @@ -33604,11 +32703,6 @@ JNI_METHOD(void, WindowCoveringCluster, goToLiftValue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33623,8 +32717,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.tiltPercentageValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(tiltPercentageValue)); request.tiltPercent100thsValue = static_cast>( @@ -33662,11 +32756,6 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltPercentage) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33680,8 +32769,8 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; request.tiltValue = static_cast>( chip::JniReferences::GetInstance().IntegerToPrimitive(tiltValue)); @@ -33717,11 +32806,6 @@ JNI_METHOD(void, WindowCoveringCluster, goToTiltValue) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33735,8 +32819,8 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::StopMotion::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -33770,11 +32854,6 @@ JNI_METHOD(void, WindowCoveringCluster, stopMotion) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -33788,8 +32867,8 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen) ListFreer listFreer; chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type request; - std::list cleanupByteArrays; - std::list cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -33823,11 +32902,6 @@ JNI_METHOD(void, WindowCoveringCluster, upOrOpen) AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 31fb89287a36ef..a7bb6833e628a9 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \ extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME @@ -49,8 +50,8 @@ JNI_METHOD(void, AccessControlCluster, writeAclAttribute) using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Acl::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -234,11 +235,6 @@ JNI_METHOD(void, AccessControlCluster, writeAclAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -251,8 +247,8 @@ JNI_METHOD(void, AccessControlCluster, writeExtensionAttribute) using TypeInfo = chip::app::Clusters::AccessControl::Attributes::Extension::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -276,10 +272,9 @@ JNI_METHOD(void, AccessControlCluster, writeExtensionAttribute) chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_fabricIndexItem_1)); jobject element_0_dataItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "data", "[B", element_0_dataItem_1); - auto element_0_dataItem_1Jni = - chip::Platform::New(env, static_cast(element_0_dataItem_1)); - cleanupByteArrays.push_back(element_0_dataItem_1Jni); - listHolder_0->mList[i_0].data = element_0_dataItem_1Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_dataItem_1))); + listHolder_0->mList[i_0].data = cleanupByteArrays.back()->byteSpan(); } cppValue = ListType_0(listHolder_0->mList, valueSize); } @@ -323,11 +318,6 @@ JNI_METHOD(void, AccessControlCluster, writeExtensionAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -340,12 +330,11 @@ JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) using TypeInfo = chip::app::Clusters::Basic::Attributes::NodeLabel::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -381,11 +370,6 @@ JNI_METHOD(void, BasicCluster, writeNodeLabelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -398,12 +382,11 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) using TypeInfo = chip::app::Clusters::Basic::Attributes::Location::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -439,11 +422,6 @@ JNI_METHOD(void, BasicCluster, writeLocationAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -456,8 +434,8 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) using TypeInfo = chip::app::Clusters::Basic::Attributes::LocalConfigDisabled::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -496,11 +474,6 @@ JNI_METHOD(void, BasicCluster, writeLocalConfigDisabledAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -513,8 +486,8 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -553,11 +526,6 @@ JNI_METHOD(void, BinaryInputBasicCluster, writeOutOfServiceAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -570,8 +538,8 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) using TypeInfo = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -610,11 +578,6 @@ JNI_METHOD(void, BinaryInputBasicCluster, writePresentValueAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -627,8 +590,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorControlOptions::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -667,11 +630,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorControlOptionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -684,8 +642,8 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointX::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -724,11 +682,6 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -741,8 +694,8 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::WhitePointY::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -781,11 +734,6 @@ JNI_METHOD(void, ColorControlCluster, writeWhitePointYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -798,8 +746,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -838,11 +786,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -855,8 +798,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -895,11 +838,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -912,8 +850,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -952,11 +890,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointRIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -969,8 +902,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1009,11 +942,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1026,8 +954,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1066,11 +994,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1083,8 +1006,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1123,11 +1046,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointGIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1140,8 +1058,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1180,11 +1098,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBXAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1197,8 +1110,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1237,11 +1150,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBYAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1254,8 +1162,8 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) using TypeInfo = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1294,11 +1202,6 @@ JNI_METHOD(void, ColorControlCluster, writeColorPointBIntensityAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1311,8 +1214,8 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut using TypeInfo = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1351,11 +1254,6 @@ JNI_METHOD(void, ColorControlCluster, writeStartUpColorTemperatureMiredsAttribut err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1368,8 +1266,8 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu using TypeInfo = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -1407,11 +1305,6 @@ JNI_METHOD(void, ContentLauncherCluster, writeSupportedStreamingProtocolsAttribu err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1424,12 +1317,11 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -1465,11 +1357,6 @@ JNI_METHOD(void, DoorLockCluster, writeLanguageAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1482,8 +1369,8 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -1521,11 +1408,6 @@ JNI_METHOD(void, DoorLockCluster, writeAutoRelockTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1538,8 +1420,8 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::SoundVolume::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1578,11 +1460,6 @@ JNI_METHOD(void, DoorLockCluster, writeSoundVolumeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1595,8 +1472,8 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::OperatingMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1635,11 +1512,6 @@ JNI_METHOD(void, DoorLockCluster, writeOperatingModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1652,8 +1524,8 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -1692,11 +1564,6 @@ JNI_METHOD(void, DoorLockCluster, writeEnableOneTouchLockingAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1709,8 +1576,8 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -1749,11 +1616,6 @@ JNI_METHOD(void, DoorLockCluster, writeEnablePrivacyModeButtonAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1766,8 +1628,8 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) using TypeInfo = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1806,11 +1668,6 @@ JNI_METHOD(void, DoorLockCluster, writeWrongCodeEntryLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1823,8 +1680,8 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) using TypeInfo = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -1862,11 +1719,6 @@ JNI_METHOD(void, GeneralCommissioningCluster, writeBreadcrumbAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1879,8 +1731,8 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) using TypeInfo = chip::app::Clusters::Identify::Attributes::IdentifyTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1919,11 +1771,6 @@ JNI_METHOD(void, IdentifyCluster, writeIdentifyTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1936,8 +1783,8 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::Options::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -1976,11 +1823,6 @@ JNI_METHOD(void, LevelControlCluster, writeOptionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -1993,8 +1835,8 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnOffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2033,11 +1875,6 @@ JNI_METHOD(void, LevelControlCluster, writeOnOffTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2050,8 +1887,8 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2098,11 +1935,6 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2115,8 +1947,8 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2163,11 +1995,6 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2180,8 +2007,8 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2228,11 +2055,6 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2245,8 +2067,8 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2293,11 +2115,6 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2310,8 +2127,8 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2358,11 +2175,6 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2375,12 +2187,11 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2416,11 +2227,6 @@ JNI_METHOD(void, LocalizationConfigurationCluster, writeActiveLocaleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2433,8 +2239,8 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) using TypeInfo = chip::app::Clusters::ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2473,11 +2279,6 @@ JNI_METHOD(void, ModeSelectCluster, writeOnModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2490,8 +2291,8 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) using TypeInfo = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -2530,11 +2331,6 @@ JNI_METHOD(void, NetworkCommissioningCluster, writeInterfaceEnabledAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2547,8 +2343,8 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOtaProvidersAttr using TypeInfo = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -2625,11 +2421,6 @@ JNI_METHOD(void, OtaSoftwareUpdateRequestorCluster, writeDefaultOtaProvidersAttr err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2642,8 +2433,8 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) using TypeInfo = chip::app::Clusters::OnOff::Attributes::OnTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2682,11 +2473,6 @@ JNI_METHOD(void, OnOffCluster, writeOnTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2699,8 +2485,8 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) using TypeInfo = chip::app::Clusters::OnOff::Attributes::OffWaitTime::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2739,11 +2525,6 @@ JNI_METHOD(void, OnOffCluster, writeOffWaitTimeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2756,8 +2537,8 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) using TypeInfo = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2796,11 +2577,6 @@ JNI_METHOD(void, OnOffCluster, writeStartUpOnOffAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2813,8 +2589,8 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) using TypeInfo = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -2853,11 +2629,6 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, writeSwitchActionsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2870,8 +2641,8 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2918,11 +2689,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -2935,8 +2701,8 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -2983,11 +2749,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumed err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3000,8 +2761,8 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3040,11 +2801,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeOperationModeAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3057,8 +2813,8 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3097,11 +2853,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3114,8 +2865,8 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Boolean::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -3154,11 +2905,6 @@ JNI_METHOD(void, TestClusterCluster, writeBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3171,8 +2917,8 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap8::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3211,11 +2957,6 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3228,8 +2969,8 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap16::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3268,11 +3009,6 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3285,8 +3021,8 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap32::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3324,11 +3060,6 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap32Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3341,8 +3072,8 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Bitmap64::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3380,11 +3111,6 @@ JNI_METHOD(void, TestClusterCluster, writeBitmap64Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3397,8 +3123,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3437,11 +3163,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3454,8 +3175,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3494,11 +3215,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3511,8 +3227,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3550,11 +3266,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt24uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3567,8 +3278,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3606,11 +3317,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt32uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3623,8 +3329,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3662,11 +3368,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt40uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3679,8 +3380,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3718,11 +3419,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt48uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3735,8 +3431,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3774,11 +3470,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt56uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3791,8 +3482,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -3830,11 +3521,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt64uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3847,8 +3533,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int8s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3887,11 +3573,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3904,8 +3585,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int16s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -3944,11 +3625,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -3961,8 +3637,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int24s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4000,11 +3676,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt24sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4017,8 +3688,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int32s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4056,11 +3727,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt32sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4073,8 +3739,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int40s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4112,11 +3778,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt40sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4129,8 +3790,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int48s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4168,11 +3829,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt48sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4185,8 +3841,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int56s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4224,11 +3880,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt56sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4241,8 +3892,8 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Int64s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -4280,11 +3931,6 @@ JNI_METHOD(void, TestClusterCluster, writeInt64sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4297,8 +3943,8 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum8::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -4337,11 +3983,6 @@ JNI_METHOD(void, TestClusterCluster, writeEnum8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4354,8 +3995,8 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Enum16::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -4394,11 +4035,6 @@ JNI_METHOD(void, TestClusterCluster, writeEnum16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4411,8 +4047,8 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatSingle::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().FloatToPrimitive(value)); @@ -4450,11 +4086,6 @@ JNI_METHOD(void, TestClusterCluster, writeFloatSingleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4467,8 +4098,8 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::FloatDouble::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().DoubleToPrimitive(value)); @@ -4507,11 +4138,6 @@ JNI_METHOD(void, TestClusterCluster, writeFloatDoubleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4524,12 +4150,11 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::OctetString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupByteArrays.push_back(valueJni); - cppValue = valueJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupByteArrays.back()->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4565,11 +4190,6 @@ JNI_METHOD(void, TestClusterCluster, writeOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4582,8 +4202,8 @@ JNI_METHOD(void, TestClusterCluster, writeListInt8uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListInt8u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -4644,11 +4264,6 @@ JNI_METHOD(void, TestClusterCluster, writeListInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4661,8 +4276,8 @@ JNI_METHOD(void, TestClusterCluster, writeListOctetStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListOctetString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -4678,9 +4293,9 @@ JNI_METHOD(void, TestClusterCluster, writeListOctetStringAttribute) { jobject element_0; chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); - auto element_0Jni = chip::Platform::New(env, static_cast(element_0)); - cleanupByteArrays.push_back(element_0Jni); - listHolder_0->mList[i_0] = element_0Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0))); + listHolder_0->mList[i_0] = cleanupByteArrays.back()->byteSpan(); } cppValue = ListType_0(listHolder_0->mList, valueSize); } @@ -4724,11 +4339,6 @@ JNI_METHOD(void, TestClusterCluster, writeListOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4741,8 +4351,8 @@ JNI_METHOD(void, TestClusterCluster, writeListStructOctetStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListStructOctetString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -4767,10 +4377,9 @@ JNI_METHOD(void, TestClusterCluster, writeListStructOctetStringAttribute) jobject element_0_operationalCertItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "operationalCert", "[B", element_0_operationalCertItem_1); - auto element_0_operationalCertItem_1Jni = - chip::Platform::New(env, static_cast(element_0_operationalCertItem_1)); - cleanupByteArrays.push_back(element_0_operationalCertItem_1Jni); - listHolder_0->mList[i_0].operationalCert = element_0_operationalCertItem_1Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_operationalCertItem_1))); + listHolder_0->mList[i_0].operationalCert = cleanupByteArrays.back()->byteSpan(); } cppValue = ListType_0(listHolder_0->mList, valueSize); } @@ -4814,11 +4423,6 @@ JNI_METHOD(void, TestClusterCluster, writeListStructOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4831,12 +4435,11 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongOctetString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupByteArrays.push_back(valueJni); - cppValue = valueJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupByteArrays.back()->byteSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4872,11 +4475,6 @@ JNI_METHOD(void, TestClusterCluster, writeLongOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4889,12 +4487,11 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::CharString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4930,11 +4527,6 @@ JNI_METHOD(void, TestClusterCluster, writeCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -4947,12 +4539,11 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::LongCharString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - cppValue = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + cppValue = cleanupStrings.back()->charSpan(); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -4988,11 +4579,6 @@ JNI_METHOD(void, TestClusterCluster, writeLongCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5005,8 +4591,8 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochUs::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -5044,11 +4630,6 @@ JNI_METHOD(void, TestClusterCluster, writeEpochUsAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5061,8 +4642,8 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EpochS::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); @@ -5100,11 +4681,6 @@ JNI_METHOD(void, TestClusterCluster, writeEpochSAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5117,8 +4693,8 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::VendorId::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5157,11 +4733,6 @@ JNI_METHOD(void, TestClusterCluster, writeVendorIdAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5174,8 +4745,8 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu using TypeInfo = chip::app::Clusters::TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -5244,10 +4815,9 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu else { auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); - auto element_0_nullableStringItem_1Jni = - chip::Platform::New(env, static_cast(element_0_nullableStringItem_1)); - cleanupStrings.push_back(element_0_nullableStringItem_1Jni); - nonNullValue_2 = element_0_nullableStringItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_nullableStringItem_1))); + nonNullValue_2 = cleanupStrings.back()->charSpan(); } jobject element_0_optionalStringItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "optionalString", "Ljava/util/Optional;", @@ -5256,10 +4826,10 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu { jobject optionalValue_2; chip::JniReferences::GetInstance().GetOptionalValue(element_0_optionalStringItem_1, optionalValue_2); - auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); - auto optionalValue_2Jni = chip::Platform::New(env, static_cast(optionalValue_2)); - cleanupStrings.push_back(optionalValue_2Jni); - definedValue_2 = optionalValue_2Jni->charSpan(); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); + definedValue_2 = cleanupStrings.back()->charSpan(); } jobject element_0_nullableOptionalStringItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "nullableOptionalString", "Ljava/util/Optional;", @@ -5276,10 +4846,9 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu else { auto & nonNullValue_3 = definedValue_2.SetNonNull(); - auto optionalValue_2Jni = - chip::Platform::New(env, static_cast(optionalValue_2)); - cleanupStrings.push_back(optionalValue_2Jni); - nonNullValue_3 = optionalValue_2Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); + nonNullValue_3 = cleanupStrings.back()->charSpan(); } } jobject element_0_nullableStructItem_1; @@ -5311,17 +4880,15 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu jobject element_0_nullableStructItem_1_dItem_3; chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "d", "[B", element_0_nullableStructItem_1_dItem_3); - auto element_0_nullableStructItem_1_dItem_3Jni = chip::Platform::New( - env, static_cast(element_0_nullableStructItem_1_dItem_3)); - cleanupByteArrays.push_back(element_0_nullableStructItem_1_dItem_3Jni); - nonNullValue_2.d = element_0_nullableStructItem_1_dItem_3Jni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique( + env, static_cast(element_0_nullableStructItem_1_dItem_3))); + nonNullValue_2.d = cleanupByteArrays.back()->byteSpan(); jobject element_0_nullableStructItem_1_eItem_3; chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "e", "Ljava/lang/String;", element_0_nullableStructItem_1_eItem_3); - auto element_0_nullableStructItem_1_eItem_3Jni = - chip::Platform::New(env, static_cast(element_0_nullableStructItem_1_eItem_3)); - cleanupStrings.push_back(element_0_nullableStructItem_1_eItem_3Jni); - nonNullValue_2.e = element_0_nullableStructItem_1_eItem_3Jni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique( + env, static_cast(element_0_nullableStructItem_1_eItem_3))); + nonNullValue_2.e = cleanupStrings.back()->charSpan(); jobject element_0_nullableStructItem_1_fItem_3; chip::JniReferences::GetInstance().GetObjectField(element_0_nullableStructItem_1, "f", "Ljava/lang/Integer;", element_0_nullableStructItem_1_fItem_3); @@ -5363,17 +4930,15 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_3)); jobject optionalValue_2_dItem_3; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_3); - auto optionalValue_2_dItem_3Jni = - chip::Platform::New(env, static_cast(optionalValue_2_dItem_3)); - cleanupByteArrays.push_back(optionalValue_2_dItem_3Jni); - definedValue_2.d = optionalValue_2_dItem_3Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2_dItem_3))); + definedValue_2.d = cleanupByteArrays.back()->byteSpan(); jobject optionalValue_2_eItem_3; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", optionalValue_2_eItem_3); - auto optionalValue_2_eItem_3Jni = - chip::Platform::New(env, static_cast(optionalValue_2_eItem_3)); - cleanupStrings.push_back(optionalValue_2_eItem_3Jni); - definedValue_2.e = optionalValue_2_eItem_3Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2_eItem_3))); + definedValue_2.e = cleanupStrings.back()->charSpan(); jobject optionalValue_2_fItem_3; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", optionalValue_2_fItem_3); @@ -5422,17 +4987,15 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2_cItem_4)); jobject optionalValue_2_dItem_4; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "d", "[B", optionalValue_2_dItem_4); - auto optionalValue_2_dItem_4Jni = - chip::Platform::New(env, static_cast(optionalValue_2_dItem_4)); - cleanupByteArrays.push_back(optionalValue_2_dItem_4Jni); - nonNullValue_3.d = optionalValue_2_dItem_4Jni->byteSpan(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2_dItem_4))); + nonNullValue_3.d = cleanupByteArrays.back()->byteSpan(); jobject optionalValue_2_eItem_4; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "e", "Ljava/lang/String;", optionalValue_2_eItem_4); - auto optionalValue_2_eItem_4Jni = - chip::Platform::New(env, static_cast(optionalValue_2_eItem_4)); - cleanupStrings.push_back(optionalValue_2_eItem_4Jni); - nonNullValue_3.e = optionalValue_2_eItem_4Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2_eItem_4))); + nonNullValue_3.e = cleanupStrings.back()->charSpan(); jobject optionalValue_2_fItem_4; chip::JniReferences::GetInstance().GetObjectField(optionalValue_2, "f", "Ljava/lang/Integer;", optionalValue_2_fItem_4); @@ -5604,11 +5167,6 @@ JNI_METHOD(void, TestClusterCluster, writeListNullablesAndOptionalsStructAttribu err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5621,8 +5179,8 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::EnumAttr::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5661,11 +5219,6 @@ JNI_METHOD(void, TestClusterCluster, writeEnumAttrAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5678,8 +5231,8 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5718,11 +5271,6 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5735,8 +5283,8 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5775,11 +5323,6 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5792,8 +5335,8 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5832,11 +5375,6 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5849,8 +5387,8 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -5889,11 +5427,6 @@ JNI_METHOD(void, TestClusterCluster, writeRangeRestrictedInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5906,8 +5439,8 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::TimedWriteBoolean::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -5939,11 +5472,6 @@ JNI_METHOD(void, TestClusterCluster, writeTimedWriteBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -5956,8 +5484,8 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::Unsupported::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().BooleanToPrimitive(value)); @@ -5996,11 +5524,6 @@ JNI_METHOD(void, TestClusterCluster, writeUnsupportedAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6013,8 +5536,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBoolean::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6061,11 +5584,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBooleanAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6078,8 +5596,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap8::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6126,11 +5644,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6143,8 +5656,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap16::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6191,11 +5704,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6208,8 +5716,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap32::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6256,11 +5764,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap32Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6273,8 +5776,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableBitmap64::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6321,11 +5824,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableBitmap64Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6338,8 +5836,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6386,11 +5884,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6403,8 +5896,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6451,11 +5944,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6468,8 +5956,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6516,11 +6004,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6533,8 +6016,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6581,11 +6064,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6598,8 +6076,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6646,11 +6124,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6663,8 +6136,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6711,11 +6184,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6728,8 +6196,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6776,11 +6244,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6793,8 +6256,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6841,11 +6304,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6858,8 +6316,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt8s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6906,11 +6364,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6923,8 +6376,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt16s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -6971,11 +6424,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt16sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -6988,8 +6436,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt24s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7036,11 +6484,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt24sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7053,8 +6496,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt32s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7101,11 +6544,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt32sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7118,8 +6556,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt40s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7166,11 +6604,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt40sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7183,8 +6616,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt48s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7231,11 +6664,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt48sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7248,8 +6676,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt56s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7296,11 +6724,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt56sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7313,8 +6736,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableInt64s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7361,11 +6784,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableInt64sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7378,8 +6796,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum8::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7426,11 +6844,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum8Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7443,8 +6856,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnum16::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7491,11 +6904,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnum16Attribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7508,8 +6916,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatSingle::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7556,11 +6964,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatSingleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7573,8 +6976,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableFloatDouble::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7621,11 +7024,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableFloatDoubleAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7638,8 +7036,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableOctetString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7648,9 +7046,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) else { auto & nonNullValue_0 = cppValue.SetNonNull(); - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupByteArrays.push_back(valueJni); - nonNullValue_0 = valueJni->byteSpan(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + nonNullValue_0 = cleanupByteArrays.back()->byteSpan(); } std::unique_ptr onSuccess( @@ -7687,11 +7084,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableOctetStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7704,8 +7096,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableCharString::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7714,9 +7106,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) else { auto & nonNullValue_0 = cppValue.SetNonNull(); - auto valueJni = chip::Platform::New(env, static_cast(value)); - cleanupStrings.push_back(valueJni); - nonNullValue_0 = valueJni->charSpan(); + cleanupStrings.push_back(chip::Platform::MakeUnique(env, static_cast(value))); + nonNullValue_0 = cleanupStrings.back()->charSpan(); } std::unique_ptr onSuccess( @@ -7753,11 +7144,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableCharStringAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7770,8 +7156,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableEnumAttr::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7818,11 +7204,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableEnumAttrAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7835,8 +7216,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7883,11 +7264,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8uAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7900,8 +7276,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -7948,11 +7324,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt8sAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -7965,8 +7336,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -8013,11 +7384,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16uAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8030,8 +7396,8 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute using TypeInfo = chip::app::Clusters::TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; if (value == nullptr) { @@ -8078,11 +7444,6 @@ JNI_METHOD(void, TestClusterCluster, writeNullableRangeRestrictedInt16sAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8095,8 +7456,8 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8135,11 +7496,6 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedCoolingSetpointAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8152,8 +7508,8 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8192,11 +7548,6 @@ JNI_METHOD(void, ThermostatCluster, writeOccupiedHeatingSetpointAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8209,8 +7560,8 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8249,11 +7600,6 @@ JNI_METHOD(void, ThermostatCluster, writeMinHeatSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8266,8 +7612,8 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8306,11 +7652,6 @@ JNI_METHOD(void, ThermostatCluster, writeMaxHeatSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8323,8 +7664,8 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8363,11 +7704,6 @@ JNI_METHOD(void, ThermostatCluster, writeMinCoolSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8380,8 +7716,8 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8420,11 +7756,6 @@ JNI_METHOD(void, ThermostatCluster, writeMaxCoolSetpointLimitAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8437,8 +7768,8 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8477,11 +7808,6 @@ JNI_METHOD(void, ThermostatCluster, writeMinSetpointDeadBandAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8494,8 +7820,8 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8534,11 +7860,6 @@ JNI_METHOD(void, ThermostatCluster, writeControlSequenceOfOperationAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8551,8 +7872,8 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) using TypeInfo = chip::app::Clusters::Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8591,11 +7912,6 @@ JNI_METHOD(void, ThermostatCluster, writeSystemModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8608,8 +7924,8 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8649,11 +7965,6 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeTemperatureDi err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8666,8 +7977,8 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8707,11 +8018,6 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeKeypadLockout err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8724,8 +8030,8 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr using TypeInfo = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8765,11 +8071,6 @@ JNI_METHOD(void, ThermostatUserInterfaceConfigurationCluster, writeScheduleProgr err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8782,8 +8083,8 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeHourFormatAttribute) using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8822,11 +8123,6 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeHourFormatAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8839,8 +8135,8 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeActiveCalendarTypeAttribute using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -8879,11 +8175,6 @@ JNI_METHOD(void, TimeFormatLocalizationCluster, writeActiveCalendarTypeAttribute err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8896,8 +8187,8 @@ JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) using TypeInfo = chip::app::Clusters::UserLabel::Attributes::LabelList::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; { using ListType_0 = std::remove_reference_t; @@ -8915,16 +8206,14 @@ JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) chip::JniReferences::GetInstance().GetArrayListItem(value, i_0, element_0); jobject element_0_labelItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "label", "Ljava/lang/String;", element_0_labelItem_1); - auto element_0_labelItem_1Jni = - chip::Platform::New(env, static_cast(element_0_labelItem_1)); - cleanupStrings.push_back(element_0_labelItem_1Jni); - listHolder_0->mList[i_0].label = element_0_labelItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_labelItem_1))); + listHolder_0->mList[i_0].label = cleanupStrings.back()->charSpan(); jobject element_0_valueItem_1; chip::JniReferences::GetInstance().GetObjectField(element_0, "value", "Ljava/lang/String;", element_0_valueItem_1); - auto element_0_valueItem_1Jni = - chip::Platform::New(env, static_cast(element_0_valueItem_1)); - cleanupStrings.push_back(element_0_valueItem_1Jni); - listHolder_0->mList[i_0].value = element_0_valueItem_1Jni->charSpan(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_valueItem_1))); + listHolder_0->mList[i_0].value = cleanupStrings.back()->charSpan(); } cppValue = ListType_0(listHolder_0->mList, valueSize); } @@ -8968,11 +8257,6 @@ JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } @@ -8985,8 +8269,8 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) using TypeInfo = chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo; TypeInfo::Type cppValue; - std::vector cleanupByteArrays; - std::vector cleanupStrings; + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; cppValue = static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); @@ -9025,11 +8309,6 @@ JNI_METHOD(void, WindowCoveringCluster, writeModeAttribute) err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - std::for_each(cleanupByteArrays.cbegin(), cleanupByteArrays.cend(), - [](chip::JniByteArray * jniByteArray) { chip::Platform::Delete(jniByteArray); }); - std::for_each(cleanupStrings.cbegin(), cleanupStrings.cend(), - [](chip::JniUtfString * jniString) { chip::Platform::Delete(jniString); }); - onSuccess.release(); onFailure.release(); } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index c408cd97fa71a3..46d589e994917d 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -24,172 +24,6 @@ import java.util.Optional; public class ChipStructs { - - public static class ScenesClusterSceneExtensionFieldSet { - public Long clusterId; - public Integer length; - public Integer value; - - public ScenesClusterSceneExtensionFieldSet(Long clusterId, Integer length, Integer value) { - this.clusterId = clusterId; - this.length = length; - this.value = value; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ScenesClusterSceneExtensionFieldSet {\n"); - output.append("\tclusterId: "); - output.append(clusterId); - output.append("\n"); - output.append("\tlength: "); - output.append(length); - output.append("\n"); - output.append("\tvalue: "); - output.append(value); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class PowerProfileClusterPowerProfileRecord { - public Integer powerProfileId; - public Integer energyPhaseId; - public Boolean powerProfileRemoteControl; - public Integer powerProfileState; - - public PowerProfileClusterPowerProfileRecord( - Integer powerProfileId, - Integer energyPhaseId, - Boolean powerProfileRemoteControl, - Integer powerProfileState) { - this.powerProfileId = powerProfileId; - this.energyPhaseId = energyPhaseId; - this.powerProfileRemoteControl = powerProfileRemoteControl; - this.powerProfileState = powerProfileState; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("PowerProfileClusterPowerProfileRecord {\n"); - output.append("\tpowerProfileId: "); - output.append(powerProfileId); - output.append("\n"); - output.append("\tenergyPhaseId: "); - output.append(energyPhaseId); - output.append("\n"); - output.append("\tpowerProfileRemoteControl: "); - output.append(powerProfileRemoteControl); - output.append("\n"); - output.append("\tpowerProfileState: "); - output.append(powerProfileState); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class PowerProfileClusterScheduledPhase { - public Integer energyPhaseId; - public Integer scheduledTime; - - public PowerProfileClusterScheduledPhase(Integer energyPhaseId, Integer scheduledTime) { - this.energyPhaseId = energyPhaseId; - this.scheduledTime = scheduledTime; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("PowerProfileClusterScheduledPhase {\n"); - output.append("\tenergyPhaseId: "); - output.append(energyPhaseId); - output.append("\n"); - output.append("\tscheduledTime: "); - output.append(scheduledTime); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class PowerProfileClusterTransferredPhase { - public Integer energyPhaseId; - public Integer macroPhaseId; - public Integer expectedDuration; - public Integer peakPower; - public Integer energy; - public Integer maxActivationDelay; - - public PowerProfileClusterTransferredPhase( - Integer energyPhaseId, - Integer macroPhaseId, - Integer expectedDuration, - Integer peakPower, - Integer energy, - Integer maxActivationDelay) { - this.energyPhaseId = energyPhaseId; - this.macroPhaseId = macroPhaseId; - this.expectedDuration = expectedDuration; - this.peakPower = peakPower; - this.energy = energy; - this.maxActivationDelay = maxActivationDelay; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("PowerProfileClusterTransferredPhase {\n"); - output.append("\tenergyPhaseId: "); - output.append(energyPhaseId); - output.append("\n"); - output.append("\tmacroPhaseId: "); - output.append(macroPhaseId); - output.append("\n"); - output.append("\texpectedDuration: "); - output.append(expectedDuration); - output.append("\n"); - output.append("\tpeakPower: "); - output.append(peakPower); - output.append("\n"); - output.append("\tenergy: "); - output.append(energy); - output.append("\n"); - output.append("\tmaxActivationDelay: "); - output.append(maxActivationDelay); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class DescriptorClusterDeviceType { - public Long type; - public Integer revision; - - public DescriptorClusterDeviceType(Long type, Integer revision) { - this.type = type; - this.revision = revision; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("DescriptorClusterDeviceType {\n"); - output.append("\ttype: "); - output.append(type); - output.append("\n"); - output.append("\trevision: "); - output.append(revision); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - public static class AccessControlClusterTarget { public @Nullable Long cluster; public @Nullable Integer endpoint; @@ -288,6 +122,111 @@ public String toString() { } } + public static class ApplicationBasicClusterApplicationBasicApplication { + public Integer catalogVendorId; + public String applicationId; + + public ApplicationBasicClusterApplicationBasicApplication( + Integer catalogVendorId, String applicationId) { + this.catalogVendorId = catalogVendorId; + this.applicationId = applicationId; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationBasicClusterApplicationBasicApplication {\n"); + output.append("\tcatalogVendorId: "); + output.append(catalogVendorId); + output.append("\n"); + output.append("\tapplicationId: "); + output.append(applicationId); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ApplicationLauncherClusterApplicationLauncherApplication { + public Integer catalogVendorId; + public String applicationId; + + public ApplicationLauncherClusterApplicationLauncherApplication( + Integer catalogVendorId, String applicationId) { + this.catalogVendorId = catalogVendorId; + this.applicationId = applicationId; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationLauncherClusterApplicationLauncherApplication {\n"); + output.append("\tcatalogVendorId: "); + output.append(catalogVendorId); + output.append("\n"); + output.append("\tapplicationId: "); + output.append(applicationId); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class ApplicationLauncherClusterApplicationEP { + public ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application; + public String endpoint; + + public ApplicationLauncherClusterApplicationEP( + ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, + String endpoint) { + this.application = application; + this.endpoint = endpoint; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ApplicationLauncherClusterApplicationEP {\n"); + output.append("\tapplication: "); + output.append(application); + output.append("\n"); + output.append("\tendpoint: "); + output.append(endpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class AudioOutputClusterOutputInfo { + public Integer index; + public Integer outputType; + public String name; + + public AudioOutputClusterOutputInfo(Integer index, Integer outputType, String name) { + this.index = index; + this.outputType = outputType; + this.name = name; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("AudioOutputClusterOutputInfo {\n"); + output.append("\tindex: "); + output.append(index); + output.append("\n"); + output.append("\toutputType: "); + output.append(outputType); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class BridgedActionsClusterActionStruct { public Integer actionID; public String name; @@ -373,665 +312,405 @@ public String toString() { } } - public static class OtaSoftwareUpdateRequestorClusterProviderLocation { - public Integer fabricIndex; - public Long providerNodeID; - public Integer endpoint; + public static class ChannelClusterChannelInfo { + public Integer majorNumber; + public Integer minorNumber; + public String name; + public String callSign; + public String affiliateCallSign; - public OtaSoftwareUpdateRequestorClusterProviderLocation( - Integer fabricIndex, Long providerNodeID, Integer endpoint) { - this.fabricIndex = fabricIndex; - this.providerNodeID = providerNodeID; - this.endpoint = endpoint; + public ChannelClusterChannelInfo( + Integer majorNumber, + Integer minorNumber, + String name, + String callSign, + String affiliateCallSign) { + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.name = name; + this.callSign = callSign; + this.affiliateCallSign = affiliateCallSign; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); + output.append("ChannelClusterChannelInfo {\n"); + output.append("\tmajorNumber: "); + output.append(majorNumber); output.append("\n"); - output.append("\tproviderNodeID: "); - output.append(providerNodeID); + output.append("\tminorNumber: "); + output.append(minorNumber); output.append("\n"); - output.append("\tendpoint: "); - output.append(endpoint); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tcallSign: "); + output.append(callSign); + output.append("\n"); + output.append("\taffiliateCallSign: "); + output.append(affiliateCallSign); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class GeneralCommissioningClusterBasicCommissioningInfoType { - public Long failSafeExpiryLengthMs; + public static class ChannelClusterLineupInfo { + public String operatorName; + public String lineupName; + public String postalCode; + public Integer lineupInfoType; - public GeneralCommissioningClusterBasicCommissioningInfoType(Long failSafeExpiryLengthMs) { - this.failSafeExpiryLengthMs = failSafeExpiryLengthMs; + public ChannelClusterLineupInfo( + String operatorName, String lineupName, String postalCode, Integer lineupInfoType) { + this.operatorName = operatorName; + this.lineupName = lineupName; + this.postalCode = postalCode; + this.lineupInfoType = lineupInfoType; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("GeneralCommissioningClusterBasicCommissioningInfoType {\n"); - output.append("\tfailSafeExpiryLengthMs: "); - output.append(failSafeExpiryLengthMs); + output.append("ChannelClusterLineupInfo {\n"); + output.append("\toperatorName: "); + output.append(operatorName); + output.append("\n"); + output.append("\tlineupName: "); + output.append(lineupName); + output.append("\n"); + output.append("\tpostalCode: "); + output.append(postalCode); + output.append("\n"); + output.append("\tlineupInfoType: "); + output.append(lineupInfoType); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class NetworkCommissioningClusterNetworkInfo { - public byte[] networkID; - public Boolean connected; + public static class ContentLauncherClusterDimension { + public Double width; + public Double height; + public Integer metric; - public NetworkCommissioningClusterNetworkInfo(byte[] networkID, Boolean connected) { - this.networkID = networkID; - this.connected = connected; + public ContentLauncherClusterDimension(Double width, Double height, Integer metric) { + this.width = width; + this.height = height; + this.metric = metric; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("NetworkCommissioningClusterNetworkInfo {\n"); - output.append("\tnetworkID: "); - output.append(Arrays.toString(networkID)); + output.append("ContentLauncherClusterDimension {\n"); + output.append("\twidth: "); + output.append(width); output.append("\n"); - output.append("\tconnected: "); - output.append(connected); + output.append("\theight: "); + output.append(height); + output.append("\n"); + output.append("\tmetric: "); + output.append(metric); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class NetworkCommissioningClusterThreadInterfaceScanResult { - public Long panId; - public Long extendedPanId; - public String networkName; - public Integer channel; - public Integer version; - public Long extendedAddress; - public Integer rssi; - public Integer lqi; + public static class ContentLauncherClusterAdditionalInfo { + public String name; + public String value; - public NetworkCommissioningClusterThreadInterfaceScanResult( - Long panId, - Long extendedPanId, - String networkName, - Integer channel, - Integer version, - Long extendedAddress, - Integer rssi, - Integer lqi) { - this.panId = panId; - this.extendedPanId = extendedPanId; - this.networkName = networkName; - this.channel = channel; - this.version = version; - this.extendedAddress = extendedAddress; - this.rssi = rssi; - this.lqi = lqi; + public ContentLauncherClusterAdditionalInfo(String name, String value) { + this.name = name; + this.value = value; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("NetworkCommissioningClusterThreadInterfaceScanResult {\n"); - output.append("\tpanId: "); - output.append(panId); - output.append("\n"); - output.append("\textendedPanId: "); - output.append(extendedPanId); - output.append("\n"); - output.append("\tnetworkName: "); - output.append(networkName); - output.append("\n"); - output.append("\tchannel: "); - output.append(channel); - output.append("\n"); - output.append("\tversion: "); - output.append(version); - output.append("\n"); - output.append("\textendedAddress: "); - output.append(extendedAddress); - output.append("\n"); - output.append("\trssi: "); - output.append(rssi); + output.append("ContentLauncherClusterAdditionalInfo {\n"); + output.append("\tname: "); + output.append(name); output.append("\n"); - output.append("\tlqi: "); - output.append(lqi); + output.append("\tvalue: "); + output.append(value); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class NetworkCommissioningClusterWiFiInterfaceScanResult { - public Integer security; - public byte[] ssid; - public byte[] bssid; - public Integer channel; - public Integer wiFiBand; - public Integer rssi; + public static class ContentLauncherClusterParameter { + public Integer type; + public String value; + public ArrayList externalIDList; - public NetworkCommissioningClusterWiFiInterfaceScanResult( - Integer security, - byte[] ssid, - byte[] bssid, - Integer channel, - Integer wiFiBand, - Integer rssi) { - this.security = security; - this.ssid = ssid; - this.bssid = bssid; - this.channel = channel; - this.wiFiBand = wiFiBand; - this.rssi = rssi; + public ContentLauncherClusterParameter( + Integer type, + String value, + ArrayList externalIDList) { + this.type = type; + this.value = value; + this.externalIDList = externalIDList; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("NetworkCommissioningClusterWiFiInterfaceScanResult {\n"); - output.append("\tsecurity: "); - output.append(security); - output.append("\n"); - output.append("\tssid: "); - output.append(Arrays.toString(ssid)); - output.append("\n"); - output.append("\tbssid: "); - output.append(Arrays.toString(bssid)); - output.append("\n"); - output.append("\tchannel: "); - output.append(channel); + output.append("ContentLauncherClusterParameter {\n"); + output.append("\ttype: "); + output.append(type); output.append("\n"); - output.append("\twiFiBand: "); - output.append(wiFiBand); + output.append("\tvalue: "); + output.append(value); output.append("\n"); - output.append("\trssi: "); - output.append(rssi); + output.append("\texternalIDList: "); + output.append(externalIDList); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class GeneralDiagnosticsClusterNetworkInterfaceType { - public String name; - public Boolean fabricConnected; - public Boolean offPremiseServicesReachableIPv4; - public Boolean offPremiseServicesReachableIPv6; - public byte[] hardwareAddress; - public Integer type; + public static class ContentLauncherClusterContentSearch { + public ArrayList parameterList; - public GeneralDiagnosticsClusterNetworkInterfaceType( - String name, - Boolean fabricConnected, - Boolean offPremiseServicesReachableIPv4, - Boolean offPremiseServicesReachableIPv6, - byte[] hardwareAddress, - Integer type) { - this.name = name; - this.fabricConnected = fabricConnected; - this.offPremiseServicesReachableIPv4 = offPremiseServicesReachableIPv4; - this.offPremiseServicesReachableIPv6 = offPremiseServicesReachableIPv6; - this.hardwareAddress = hardwareAddress; - this.type = type; + public ContentLauncherClusterContentSearch( + ArrayList parameterList) { + this.parameterList = parameterList; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("GeneralDiagnosticsClusterNetworkInterfaceType {\n"); - output.append("\tname: "); - output.append(name); - output.append("\n"); - output.append("\tfabricConnected: "); - output.append(fabricConnected); - output.append("\n"); - output.append("\toffPremiseServicesReachableIPv4: "); - output.append(offPremiseServicesReachableIPv4); - output.append("\n"); - output.append("\toffPremiseServicesReachableIPv6: "); - output.append(offPremiseServicesReachableIPv6); - output.append("\n"); - output.append("\thardwareAddress: "); - output.append(Arrays.toString(hardwareAddress)); - output.append("\n"); - output.append("\ttype: "); - output.append(type); + output.append("ContentLauncherClusterContentSearch {\n"); + output.append("\tparameterList: "); + output.append(parameterList); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class SoftwareDiagnosticsClusterSoftwareFault { - public Long id; - public String name; - public byte[] faultRecording; + public static class ContentLauncherClusterStyleInformation { + public String imageUrl; + public String color; + public ChipStructs.ContentLauncherClusterDimension size; - public SoftwareDiagnosticsClusterSoftwareFault(Long id, String name, byte[] faultRecording) { - this.id = id; - this.name = name; - this.faultRecording = faultRecording; + public ContentLauncherClusterStyleInformation( + String imageUrl, String color, ChipStructs.ContentLauncherClusterDimension size) { + this.imageUrl = imageUrl; + this.color = color; + this.size = size; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("SoftwareDiagnosticsClusterSoftwareFault {\n"); - output.append("\tid: "); - output.append(id); + output.append("ContentLauncherClusterStyleInformation {\n"); + output.append("\timageUrl: "); + output.append(imageUrl); output.append("\n"); - output.append("\tname: "); - output.append(name); + output.append("\tcolor: "); + output.append(color); output.append("\n"); - output.append("\tfaultRecording: "); - output.append(Arrays.toString(faultRecording)); + output.append("\tsize: "); + output.append(size); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class SoftwareDiagnosticsClusterThreadMetrics { - public Long id; - public String name; - public Long stackFreeCurrent; - public Long stackFreeMinimum; - public Long stackSize; + public static class ContentLauncherClusterBrandingInformation { + public String providerName; + public ChipStructs.ContentLauncherClusterStyleInformation background; + public ChipStructs.ContentLauncherClusterStyleInformation logo; + public ChipStructs.ContentLauncherClusterStyleInformation progressBar; + public ChipStructs.ContentLauncherClusterStyleInformation splash; + public ChipStructs.ContentLauncherClusterStyleInformation waterMark; - public SoftwareDiagnosticsClusterThreadMetrics( - Long id, String name, Long stackFreeCurrent, Long stackFreeMinimum, Long stackSize) { - this.id = id; - this.name = name; - this.stackFreeCurrent = stackFreeCurrent; - this.stackFreeMinimum = stackFreeMinimum; - this.stackSize = stackSize; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("SoftwareDiagnosticsClusterThreadMetrics {\n"); - output.append("\tid: "); - output.append(id); - output.append("\n"); - output.append("\tname: "); - output.append(name); - output.append("\n"); - output.append("\tstackFreeCurrent: "); - output.append(stackFreeCurrent); - output.append("\n"); - output.append("\tstackFreeMinimum: "); - output.append(stackFreeMinimum); - output.append("\n"); - output.append("\tstackSize: "); - output.append(stackSize); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class ThreadNetworkDiagnosticsClusterNeighborTable { - public Long extAddress; - public Long age; - public Integer rloc16; - public Long linkFrameCounter; - public Long mleFrameCounter; - public Integer lqi; - public Integer averageRssi; - public Integer lastRssi; - public Integer frameErrorRate; - public Integer messageErrorRate; - public Boolean rxOnWhenIdle; - public Boolean fullThreadDevice; - public Boolean fullNetworkData; - public Boolean isChild; - - public ThreadNetworkDiagnosticsClusterNeighborTable( - Long extAddress, - Long age, - Integer rloc16, - Long linkFrameCounter, - Long mleFrameCounter, - Integer lqi, - Integer averageRssi, - Integer lastRssi, - Integer frameErrorRate, - Integer messageErrorRate, - Boolean rxOnWhenIdle, - Boolean fullThreadDevice, - Boolean fullNetworkData, - Boolean isChild) { - this.extAddress = extAddress; - this.age = age; - this.rloc16 = rloc16; - this.linkFrameCounter = linkFrameCounter; - this.mleFrameCounter = mleFrameCounter; - this.lqi = lqi; - this.averageRssi = averageRssi; - this.lastRssi = lastRssi; - this.frameErrorRate = frameErrorRate; - this.messageErrorRate = messageErrorRate; - this.rxOnWhenIdle = rxOnWhenIdle; - this.fullThreadDevice = fullThreadDevice; - this.fullNetworkData = fullNetworkData; - this.isChild = isChild; + public ContentLauncherClusterBrandingInformation( + String providerName, + ChipStructs.ContentLauncherClusterStyleInformation background, + ChipStructs.ContentLauncherClusterStyleInformation logo, + ChipStructs.ContentLauncherClusterStyleInformation progressBar, + ChipStructs.ContentLauncherClusterStyleInformation splash, + ChipStructs.ContentLauncherClusterStyleInformation waterMark) { + this.providerName = providerName; + this.background = background; + this.logo = logo; + this.progressBar = progressBar; + this.splash = splash; + this.waterMark = waterMark; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThreadNetworkDiagnosticsClusterNeighborTable {\n"); - output.append("\textAddress: "); - output.append(extAddress); - output.append("\n"); - output.append("\tage: "); - output.append(age); - output.append("\n"); - output.append("\trloc16: "); - output.append(rloc16); - output.append("\n"); - output.append("\tlinkFrameCounter: "); - output.append(linkFrameCounter); - output.append("\n"); - output.append("\tmleFrameCounter: "); - output.append(mleFrameCounter); - output.append("\n"); - output.append("\tlqi: "); - output.append(lqi); - output.append("\n"); - output.append("\taverageRssi: "); - output.append(averageRssi); - output.append("\n"); - output.append("\tlastRssi: "); - output.append(lastRssi); - output.append("\n"); - output.append("\tframeErrorRate: "); - output.append(frameErrorRate); + output.append("ContentLauncherClusterBrandingInformation {\n"); + output.append("\tproviderName: "); + output.append(providerName); output.append("\n"); - output.append("\tmessageErrorRate: "); - output.append(messageErrorRate); + output.append("\tbackground: "); + output.append(background); output.append("\n"); - output.append("\trxOnWhenIdle: "); - output.append(rxOnWhenIdle); + output.append("\tlogo: "); + output.append(logo); output.append("\n"); - output.append("\tfullThreadDevice: "); - output.append(fullThreadDevice); + output.append("\tprogressBar: "); + output.append(progressBar); output.append("\n"); - output.append("\tfullNetworkData: "); - output.append(fullNetworkData); + output.append("\tsplash: "); + output.append(splash); output.append("\n"); - output.append("\tisChild: "); - output.append(isChild); + output.append("\twaterMark: "); + output.append(waterMark); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { - public Boolean activeTimestampPresent; - public Boolean pendingTimestampPresent; - public Boolean masterKeyPresent; - public Boolean networkNamePresent; - public Boolean extendedPanIdPresent; - public Boolean meshLocalPrefixPresent; - public Boolean delayPresent; - public Boolean panIdPresent; - public Boolean channelPresent; - public Boolean pskcPresent; - public Boolean securityPolicyPresent; - public Boolean channelMaskPresent; + public static class DescriptorClusterDeviceType { + public Long type; + public Integer revision; - public ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( - Boolean activeTimestampPresent, - Boolean pendingTimestampPresent, - Boolean masterKeyPresent, - Boolean networkNamePresent, - Boolean extendedPanIdPresent, - Boolean meshLocalPrefixPresent, - Boolean delayPresent, - Boolean panIdPresent, - Boolean channelPresent, - Boolean pskcPresent, - Boolean securityPolicyPresent, - Boolean channelMaskPresent) { - this.activeTimestampPresent = activeTimestampPresent; - this.pendingTimestampPresent = pendingTimestampPresent; - this.masterKeyPresent = masterKeyPresent; - this.networkNamePresent = networkNamePresent; - this.extendedPanIdPresent = extendedPanIdPresent; - this.meshLocalPrefixPresent = meshLocalPrefixPresent; - this.delayPresent = delayPresent; - this.panIdPresent = panIdPresent; - this.channelPresent = channelPresent; - this.pskcPresent = pskcPresent; - this.securityPolicyPresent = securityPolicyPresent; - this.channelMaskPresent = channelMaskPresent; + public DescriptorClusterDeviceType(Long type, Integer revision) { + this.type = type; + this.revision = revision; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n"); - output.append("\tactiveTimestampPresent: "); - output.append(activeTimestampPresent); - output.append("\n"); - output.append("\tpendingTimestampPresent: "); - output.append(pendingTimestampPresent); - output.append("\n"); - output.append("\tmasterKeyPresent: "); - output.append(masterKeyPresent); - output.append("\n"); - output.append("\tnetworkNamePresent: "); - output.append(networkNamePresent); - output.append("\n"); - output.append("\textendedPanIdPresent: "); - output.append(extendedPanIdPresent); - output.append("\n"); - output.append("\tmeshLocalPrefixPresent: "); - output.append(meshLocalPrefixPresent); - output.append("\n"); - output.append("\tdelayPresent: "); - output.append(delayPresent); - output.append("\n"); - output.append("\tpanIdPresent: "); - output.append(panIdPresent); - output.append("\n"); - output.append("\tchannelPresent: "); - output.append(channelPresent); - output.append("\n"); - output.append("\tpskcPresent: "); - output.append(pskcPresent); - output.append("\n"); - output.append("\tsecurityPolicyPresent: "); - output.append(securityPolicyPresent); + output.append("DescriptorClusterDeviceType {\n"); + output.append("\ttype: "); + output.append(type); output.append("\n"); - output.append("\tchannelMaskPresent: "); - output.append(channelMaskPresent); + output.append("\trevision: "); + output.append(revision); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ThreadNetworkDiagnosticsClusterRouteTable { - public Long extAddress; - public Integer rloc16; - public Integer routerId; - public Integer nextHop; - public Integer pathCost; - public Integer LQIIn; - public Integer LQIOut; - public Integer age; - public Boolean allocated; - public Boolean linkEstablished; + public static class DoorLockClusterDlCredential { + public Integer credentialType; + public Integer credentialIndex; - public ThreadNetworkDiagnosticsClusterRouteTable( - Long extAddress, - Integer rloc16, - Integer routerId, - Integer nextHop, - Integer pathCost, - Integer LQIIn, - Integer LQIOut, - Integer age, - Boolean allocated, - Boolean linkEstablished) { - this.extAddress = extAddress; - this.rloc16 = rloc16; - this.routerId = routerId; - this.nextHop = nextHop; - this.pathCost = pathCost; - this.LQIIn = LQIIn; - this.LQIOut = LQIOut; - this.age = age; - this.allocated = allocated; - this.linkEstablished = linkEstablished; + public DoorLockClusterDlCredential(Integer credentialType, Integer credentialIndex) { + this.credentialType = credentialType; + this.credentialIndex = credentialIndex; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThreadNetworkDiagnosticsClusterRouteTable {\n"); - output.append("\textAddress: "); - output.append(extAddress); - output.append("\n"); - output.append("\trloc16: "); - output.append(rloc16); - output.append("\n"); - output.append("\trouterId: "); - output.append(routerId); - output.append("\n"); - output.append("\tnextHop: "); - output.append(nextHop); - output.append("\n"); - output.append("\tpathCost: "); - output.append(pathCost); - output.append("\n"); - output.append("\tLQIIn: "); - output.append(LQIIn); - output.append("\n"); - output.append("\tLQIOut: "); - output.append(LQIOut); - output.append("\n"); - output.append("\tage: "); - output.append(age); - output.append("\n"); - output.append("\tallocated: "); - output.append(allocated); + output.append("DoorLockClusterDlCredential {\n"); + output.append("\tcredentialType: "); + output.append(credentialType); output.append("\n"); - output.append("\tlinkEstablished: "); - output.append(linkEstablished); + output.append("\tcredentialIndex: "); + output.append(credentialIndex); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ThreadNetworkDiagnosticsClusterSecurityPolicy { - public Integer rotationTime; - public Integer flags; + public static class FixedLabelClusterLabelStruct { + public String label; + public String value; - public ThreadNetworkDiagnosticsClusterSecurityPolicy(Integer rotationTime, Integer flags) { - this.rotationTime = rotationTime; - this.flags = flags; + public FixedLabelClusterLabelStruct(String label, String value) { + this.label = label; + this.value = value; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n"); - output.append("\trotationTime: "); - output.append(rotationTime); - output.append("\n"); - output.append("\tflags: "); - output.append(flags); + output.append("FixedLabelClusterLabelStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class OperationalCredentialsClusterFabricDescriptor { - public Integer fabricIndex; - public byte[] rootPublicKey; - public Integer vendorId; - public Long fabricId; - public Long nodeId; - public String label; + public static class GeneralCommissioningClusterBasicCommissioningInfoType { + public Long failSafeExpiryLengthMs; - public OperationalCredentialsClusterFabricDescriptor( - Integer fabricIndex, - byte[] rootPublicKey, - Integer vendorId, - Long fabricId, - Long nodeId, - String label) { - this.fabricIndex = fabricIndex; - this.rootPublicKey = rootPublicKey; - this.vendorId = vendorId; - this.fabricId = fabricId; - this.nodeId = nodeId; - this.label = label; + public GeneralCommissioningClusterBasicCommissioningInfoType(Long failSafeExpiryLengthMs) { + this.failSafeExpiryLengthMs = failSafeExpiryLengthMs; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OperationalCredentialsClusterFabricDescriptor {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); - output.append("\n"); - output.append("\trootPublicKey: "); - output.append(Arrays.toString(rootPublicKey)); - output.append("\n"); - output.append("\tvendorId: "); - output.append(vendorId); - output.append("\n"); - output.append("\tfabricId: "); - output.append(fabricId); - output.append("\n"); - output.append("\tnodeId: "); - output.append(nodeId); - output.append("\n"); - output.append("\tlabel: "); - output.append(label); + output.append("GeneralCommissioningClusterBasicCommissioningInfoType {\n"); + output.append("\tfailSafeExpiryLengthMs: "); + output.append(failSafeExpiryLengthMs); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class OperationalCredentialsClusterNOCStruct { - public Integer fabricIndex; - public byte[] noc; - public byte[] icac; + public static class GeneralDiagnosticsClusterNetworkInterfaceType { + public String name; + public Boolean fabricConnected; + public Boolean offPremiseServicesReachableIPv4; + public Boolean offPremiseServicesReachableIPv6; + public byte[] hardwareAddress; + public Integer type; - public OperationalCredentialsClusterNOCStruct(Integer fabricIndex, byte[] noc, byte[] icac) { - this.fabricIndex = fabricIndex; - this.noc = noc; - this.icac = icac; + public GeneralDiagnosticsClusterNetworkInterfaceType( + String name, + Boolean fabricConnected, + Boolean offPremiseServicesReachableIPv4, + Boolean offPremiseServicesReachableIPv6, + byte[] hardwareAddress, + Integer type) { + this.name = name; + this.fabricConnected = fabricConnected; + this.offPremiseServicesReachableIPv4 = offPremiseServicesReachableIPv4; + this.offPremiseServicesReachableIPv6 = offPremiseServicesReachableIPv6; + this.hardwareAddress = hardwareAddress; + this.type = type; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OperationalCredentialsClusterNOCStruct {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); + output.append("GeneralDiagnosticsClusterNetworkInterfaceType {\n"); + output.append("\tname: "); + output.append(name); output.append("\n"); - output.append("\tnoc: "); - output.append(Arrays.toString(noc)); + output.append("\tfabricConnected: "); + output.append(fabricConnected); output.append("\n"); - output.append("\ticac: "); - output.append(Arrays.toString(icac)); + output.append("\toffPremiseServicesReachableIPv4: "); + output.append(offPremiseServicesReachableIPv4); + output.append("\n"); + output.append("\toffPremiseServicesReachableIPv6: "); + output.append(offPremiseServicesReachableIPv6); + output.append("\n"); + output.append("\thardwareAddress: "); + output.append(Arrays.toString(hardwareAddress)); + output.append("\n"); + output.append("\ttype: "); + output.append(type); output.append("\n"); output.append("}\n"); return output.toString(); @@ -1165,48 +844,59 @@ public String toString() { } } - public static class FixedLabelClusterLabelStruct { - public String label; - public String value; + public static class MediaInputClusterInputInfo { + public Integer index; + public Integer inputType; + public String name; + public String description; - public FixedLabelClusterLabelStruct(String label, String value) { - this.label = label; - this.value = value; + public MediaInputClusterInputInfo( + Integer index, Integer inputType, String name, String description) { + this.index = index; + this.inputType = inputType; + this.name = name; + this.description = description; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("FixedLabelClusterLabelStruct {\n"); - output.append("\tlabel: "); - output.append(label); + output.append("MediaInputClusterInputInfo {\n"); + output.append("\tindex: "); + output.append(index); output.append("\n"); - output.append("\tvalue: "); - output.append(value); + output.append("\tinputType: "); + output.append(inputType); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tdescription: "); + output.append(description); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class UserLabelClusterLabelStruct { - public String label; - public String value; + public static class MediaPlaybackClusterPlaybackPosition { + public Long updatedAt; + public Long position; - public UserLabelClusterLabelStruct(String label, String value) { - this.label = label; - this.value = value; + public MediaPlaybackClusterPlaybackPosition(Long updatedAt, Long position) { + this.updatedAt = updatedAt; + this.position = position; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("UserLabelClusterLabelStruct {\n"); - output.append("\tlabel: "); - output.append(label); + output.append("MediaPlaybackClusterPlaybackPosition {\n"); + output.append("\tupdatedAt: "); + output.append(updatedAt); output.append("\n"); - output.append("\tvalue: "); - output.append(value); + output.append("\tposition: "); + output.append(position); output.append("\n"); output.append("}\n"); return output.toString(); @@ -1266,790 +956,963 @@ public String toString() { } } - public static class DoorLockClusterDlCredential { - public Integer credentialType; - public Integer credentialIndex; + public static class NetworkCommissioningClusterNetworkInfo { + public byte[] networkID; + public Boolean connected; - public DoorLockClusterDlCredential(Integer credentialType, Integer credentialIndex) { - this.credentialType = credentialType; - this.credentialIndex = credentialIndex; + public NetworkCommissioningClusterNetworkInfo(byte[] networkID, Boolean connected) { + this.networkID = networkID; + this.connected = connected; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("DoorLockClusterDlCredential {\n"); - output.append("\tcredentialType: "); - output.append(credentialType); + output.append("NetworkCommissioningClusterNetworkInfo {\n"); + output.append("\tnetworkID: "); + output.append(Arrays.toString(networkID)); output.append("\n"); - output.append("\tcredentialIndex: "); - output.append(credentialIndex); + output.append("\tconnected: "); + output.append(connected); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + + public static class NetworkCommissioningClusterThreadInterfaceScanResult { + public Long panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public Long extendedAddress; + public Integer rssi; + public Integer lqi; + + public NetworkCommissioningClusterThreadInterfaceScanResult( + Long panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + Long extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("NetworkCommissioningClusterThreadInterfaceScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(extendedAddress); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class IasAceClusterIasAceZoneStatusResult { - public Integer zoneId; - public Integer zoneStatus; + public static class NetworkCommissioningClusterWiFiInterfaceScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; - public IasAceClusterIasAceZoneStatusResult(Integer zoneId, Integer zoneStatus) { - this.zoneId = zoneId; - this.zoneStatus = zoneStatus; + public NetworkCommissioningClusterWiFiInterfaceScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("IasAceClusterIasAceZoneStatusResult {\n"); - output.append("\tzoneId: "); - output.append(zoneId); + output.append("NetworkCommissioningClusterWiFiInterfaceScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); output.append("\n"); - output.append("\tzoneStatus: "); - output.append(zoneStatus); + output.append("\trssi: "); + output.append(rssi); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ChannelClusterChannelInfo { - public Integer majorNumber; - public Integer minorNumber; - public String name; - public String callSign; - public String affiliateCallSign; + public static class OtaSoftwareUpdateRequestorClusterProviderLocation { + public Integer fabricIndex; + public Long providerNodeID; + public Integer endpoint; - public ChannelClusterChannelInfo( - Integer majorNumber, - Integer minorNumber, - String name, - String callSign, - String affiliateCallSign) { - this.majorNumber = majorNumber; - this.minorNumber = minorNumber; - this.name = name; - this.callSign = callSign; - this.affiliateCallSign = affiliateCallSign; + public OtaSoftwareUpdateRequestorClusterProviderLocation( + Integer fabricIndex, Long providerNodeID, Integer endpoint) { + this.fabricIndex = fabricIndex; + this.providerNodeID = providerNodeID; + this.endpoint = endpoint; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ChannelClusterChannelInfo {\n"); - output.append("\tmajorNumber: "); - output.append(majorNumber); - output.append("\n"); - output.append("\tminorNumber: "); - output.append(minorNumber); - output.append("\n"); - output.append("\tname: "); - output.append(name); + output.append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); - output.append("\tcallSign: "); - output.append(callSign); + output.append("\tproviderNodeID: "); + output.append(providerNodeID); output.append("\n"); - output.append("\taffiliateCallSign: "); - output.append(affiliateCallSign); + output.append("\tendpoint: "); + output.append(endpoint); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ChannelClusterLineupInfo { - public String operatorName; - public String lineupName; - public String postalCode; - public Integer lineupInfoType; + public static class OperationalCredentialsClusterFabricDescriptor { + public Integer fabricIndex; + public byte[] rootPublicKey; + public Integer vendorId; + public Long fabricId; + public Long nodeId; + public String label; - public ChannelClusterLineupInfo( - String operatorName, String lineupName, String postalCode, Integer lineupInfoType) { - this.operatorName = operatorName; - this.lineupName = lineupName; - this.postalCode = postalCode; - this.lineupInfoType = lineupInfoType; + public OperationalCredentialsClusterFabricDescriptor( + Integer fabricIndex, + byte[] rootPublicKey, + Integer vendorId, + Long fabricId, + Long nodeId, + String label) { + this.fabricIndex = fabricIndex; + this.rootPublicKey = rootPublicKey; + this.vendorId = vendorId; + this.fabricId = fabricId; + this.nodeId = nodeId; + this.label = label; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ChannelClusterLineupInfo {\n"); - output.append("\toperatorName: "); - output.append(operatorName); + output.append("OperationalCredentialsClusterFabricDescriptor {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); - output.append("\tlineupName: "); - output.append(lineupName); + output.append("\trootPublicKey: "); + output.append(Arrays.toString(rootPublicKey)); output.append("\n"); - output.append("\tpostalCode: "); - output.append(postalCode); + output.append("\tvendorId: "); + output.append(vendorId); output.append("\n"); - output.append("\tlineupInfoType: "); - output.append(lineupInfoType); + output.append("\tfabricId: "); + output.append(fabricId); + output.append("\n"); + output.append("\tnodeId: "); + output.append(nodeId); + output.append("\n"); + output.append("\tlabel: "); + output.append(label); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TargetNavigatorClusterTargetInfo { - public Integer identifier; - public String name; + public static class OperationalCredentialsClusterNOCStruct { + public Integer fabricIndex; + public byte[] noc; + public byte[] icac; - public TargetNavigatorClusterTargetInfo(Integer identifier, String name) { - this.identifier = identifier; - this.name = name; + public OperationalCredentialsClusterNOCStruct(Integer fabricIndex, byte[] noc, byte[] icac) { + this.fabricIndex = fabricIndex; + this.noc = noc; + this.icac = icac; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TargetNavigatorClusterTargetInfo {\n"); - output.append("\tidentifier: "); - output.append(identifier); + output.append("OperationalCredentialsClusterNOCStruct {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); - output.append("\tname: "); - output.append(name); + output.append("\tnoc: "); + output.append(Arrays.toString(noc)); + output.append("\n"); + output.append("\ticac: "); + output.append(Arrays.toString(icac)); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class MediaPlaybackClusterPlaybackPosition { - public Long updatedAt; - public Long position; + public static class ScenesClusterSceneExtensionFieldSet { + public Long clusterId; + public Integer length; + public Integer value; - public MediaPlaybackClusterPlaybackPosition(Long updatedAt, Long position) { - this.updatedAt = updatedAt; - this.position = position; + public ScenesClusterSceneExtensionFieldSet(Long clusterId, Integer length, Integer value) { + this.clusterId = clusterId; + this.length = length; + this.value = value; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("MediaPlaybackClusterPlaybackPosition {\n"); - output.append("\tupdatedAt: "); - output.append(updatedAt); + output.append("ScenesClusterSceneExtensionFieldSet {\n"); + output.append("\tclusterId: "); + output.append(clusterId); output.append("\n"); - output.append("\tposition: "); - output.append(position); + output.append("\tlength: "); + output.append(length); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class MediaInputClusterInputInfo { - public Integer index; - public Integer inputType; + public static class SoftwareDiagnosticsClusterSoftwareFault { + public Long id; public String name; - public String description; + public byte[] faultRecording; - public MediaInputClusterInputInfo( - Integer index, Integer inputType, String name, String description) { - this.index = index; - this.inputType = inputType; + public SoftwareDiagnosticsClusterSoftwareFault(Long id, String name, byte[] faultRecording) { + this.id = id; this.name = name; - this.description = description; + this.faultRecording = faultRecording; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("MediaInputClusterInputInfo {\n"); - output.append("\tindex: "); - output.append(index); - output.append("\n"); - output.append("\tinputType: "); - output.append(inputType); + output.append("SoftwareDiagnosticsClusterSoftwareFault {\n"); + output.append("\tid: "); + output.append(id); output.append("\n"); output.append("\tname: "); output.append(name); output.append("\n"); - output.append("\tdescription: "); - output.append(description); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class ContentLauncherClusterDimension { - public Double width; - public Double height; - public Integer metric; - - public ContentLauncherClusterDimension(Double width, Double height, Integer metric) { - this.width = width; - this.height = height; - this.metric = metric; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterDimension {\n"); - output.append("\twidth: "); - output.append(width); - output.append("\n"); - output.append("\theight: "); - output.append(height); - output.append("\n"); - output.append("\tmetric: "); - output.append(metric); + output.append("\tfaultRecording: "); + output.append(Arrays.toString(faultRecording)); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ContentLauncherClusterAdditionalInfo { + public static class SoftwareDiagnosticsClusterThreadMetrics { + public Long id; public String name; - public String value; + public Long stackFreeCurrent; + public Long stackFreeMinimum; + public Long stackSize; - public ContentLauncherClusterAdditionalInfo(String name, String value) { + public SoftwareDiagnosticsClusterThreadMetrics( + Long id, String name, Long stackFreeCurrent, Long stackFreeMinimum, Long stackSize) { + this.id = id; this.name = name; - this.value = value; + this.stackFreeCurrent = stackFreeCurrent; + this.stackFreeMinimum = stackFreeMinimum; + this.stackSize = stackSize; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterAdditionalInfo {\n"); + output.append("SoftwareDiagnosticsClusterThreadMetrics {\n"); + output.append("\tid: "); + output.append(id); + output.append("\n"); output.append("\tname: "); output.append(name); output.append("\n"); - output.append("\tvalue: "); - output.append(value); + output.append("\tstackFreeCurrent: "); + output.append(stackFreeCurrent); + output.append("\n"); + output.append("\tstackFreeMinimum: "); + output.append(stackFreeMinimum); + output.append("\n"); + output.append("\tstackSize: "); + output.append(stackSize); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ContentLauncherClusterParameter { - public Integer type; - public String value; - public ArrayList externalIDList; + public static class TargetNavigatorClusterTargetInfo { + public Integer identifier; + public String name; - public ContentLauncherClusterParameter( - Integer type, - String value, - ArrayList externalIDList) { - this.type = type; - this.value = value; - this.externalIDList = externalIDList; + public TargetNavigatorClusterTargetInfo(Integer identifier, String name) { + this.identifier = identifier; + this.name = name; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterParameter {\n"); - output.append("\ttype: "); - output.append(type); - output.append("\n"); - output.append("\tvalue: "); - output.append(value); + output.append("TargetNavigatorClusterTargetInfo {\n"); + output.append("\tidentifier: "); + output.append(identifier); output.append("\n"); - output.append("\texternalIDList: "); - output.append(externalIDList); + output.append("\tname: "); + output.append(name); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ContentLauncherClusterContentSearch { - public ArrayList parameterList; + public static class TestClusterClusterSimpleStruct { + public Integer a; + public Boolean b; + public Integer c; + public byte[] d; + public String e; + public Integer f; + public Float g; + public Double h; - public ContentLauncherClusterContentSearch( - ArrayList parameterList) { - this.parameterList = parameterList; + public TestClusterClusterSimpleStruct( + Integer a, Boolean b, Integer c, byte[] d, String e, Integer f, Float g, Double h) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.e = e; + this.f = f; + this.g = g; + this.h = h; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterContentSearch {\n"); - output.append("\tparameterList: "); - output.append(parameterList); + output.append("TestClusterClusterSimpleStruct {\n"); + output.append("\ta: "); + output.append(a); + output.append("\n"); + output.append("\tb: "); + output.append(b); + output.append("\n"); + output.append("\tc: "); + output.append(c); + output.append("\n"); + output.append("\td: "); + output.append(Arrays.toString(d)); + output.append("\n"); + output.append("\te: "); + output.append(e); + output.append("\n"); + output.append("\tf: "); + output.append(f); + output.append("\n"); + output.append("\tg: "); + output.append(g); + output.append("\n"); + output.append("\th: "); + output.append(h); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ContentLauncherClusterStyleInformation { - public String imageUrl; - public String color; - public ChipStructs.ContentLauncherClusterDimension size; + public static class TestClusterClusterNullablesAndOptionalsStruct { + public @Nullable Integer nullableInt; + public Optional optionalInt; + public @Nullable Optional nullableOptionalInt; + public @Nullable String nullableString; + public Optional optionalString; + public @Nullable Optional nullableOptionalString; + public @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct; + public Optional optionalStruct; + public @Nullable Optional nullableOptionalStruct; + public @Nullable ArrayList nullableList; + public Optional> optionalList; + public @Nullable Optional> nullableOptionalList; - public ContentLauncherClusterStyleInformation( - String imageUrl, String color, ChipStructs.ContentLauncherClusterDimension size) { - this.imageUrl = imageUrl; - this.color = color; - this.size = size; + public TestClusterClusterNullablesAndOptionalsStruct( + @Nullable Integer nullableInt, + Optional optionalInt, + @Nullable Optional nullableOptionalInt, + @Nullable String nullableString, + Optional optionalString, + @Nullable Optional nullableOptionalString, + @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct, + Optional optionalStruct, + @Nullable Optional nullableOptionalStruct, + @Nullable ArrayList nullableList, + Optional> optionalList, + @Nullable Optional> nullableOptionalList) { + this.nullableInt = nullableInt; + this.optionalInt = optionalInt; + this.nullableOptionalInt = nullableOptionalInt; + this.nullableString = nullableString; + this.optionalString = optionalString; + this.nullableOptionalString = nullableOptionalString; + this.nullableStruct = nullableStruct; + this.optionalStruct = optionalStruct; + this.nullableOptionalStruct = nullableOptionalStruct; + this.nullableList = nullableList; + this.optionalList = optionalList; + this.nullableOptionalList = nullableOptionalList; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterStyleInformation {\n"); - output.append("\timageUrl: "); - output.append(imageUrl); + output.append("TestClusterClusterNullablesAndOptionalsStruct {\n"); + output.append("\tnullableInt: "); + output.append(nullableInt); output.append("\n"); - output.append("\tcolor: "); - output.append(color); + output.append("\toptionalInt: "); + output.append(optionalInt); output.append("\n"); - output.append("\tsize: "); - output.append(size); + output.append("\tnullableOptionalInt: "); + output.append(nullableOptionalInt); + output.append("\n"); + output.append("\tnullableString: "); + output.append(nullableString); + output.append("\n"); + output.append("\toptionalString: "); + output.append(optionalString); + output.append("\n"); + output.append("\tnullableOptionalString: "); + output.append(nullableOptionalString); + output.append("\n"); + output.append("\tnullableStruct: "); + output.append(nullableStruct); + output.append("\n"); + output.append("\toptionalStruct: "); + output.append(optionalStruct); + output.append("\n"); + output.append("\tnullableOptionalStruct: "); + output.append(nullableOptionalStruct); + output.append("\n"); + output.append("\tnullableList: "); + output.append(nullableList); + output.append("\n"); + output.append("\toptionalList: "); + output.append(optionalList); + output.append("\n"); + output.append("\tnullableOptionalList: "); + output.append(nullableOptionalList); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ContentLauncherClusterBrandingInformation { - public String providerName; - public ChipStructs.ContentLauncherClusterStyleInformation background; - public ChipStructs.ContentLauncherClusterStyleInformation logo; - public ChipStructs.ContentLauncherClusterStyleInformation progressBar; - public ChipStructs.ContentLauncherClusterStyleInformation splash; - public ChipStructs.ContentLauncherClusterStyleInformation waterMark; + public static class TestClusterClusterNestedStruct { + public Integer a; + public Boolean b; + public ChipStructs.TestClusterClusterSimpleStruct c; - public ContentLauncherClusterBrandingInformation( - String providerName, - ChipStructs.ContentLauncherClusterStyleInformation background, - ChipStructs.ContentLauncherClusterStyleInformation logo, - ChipStructs.ContentLauncherClusterStyleInformation progressBar, - ChipStructs.ContentLauncherClusterStyleInformation splash, - ChipStructs.ContentLauncherClusterStyleInformation waterMark) { - this.providerName = providerName; - this.background = background; - this.logo = logo; - this.progressBar = progressBar; - this.splash = splash; - this.waterMark = waterMark; + public TestClusterClusterNestedStruct( + Integer a, Boolean b, ChipStructs.TestClusterClusterSimpleStruct c) { + this.a = a; + this.b = b; + this.c = c; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ContentLauncherClusterBrandingInformation {\n"); - output.append("\tproviderName: "); - output.append(providerName); - output.append("\n"); - output.append("\tbackground: "); - output.append(background); - output.append("\n"); - output.append("\tlogo: "); - output.append(logo); - output.append("\n"); - output.append("\tprogressBar: "); - output.append(progressBar); + output.append("TestClusterClusterNestedStruct {\n"); + output.append("\ta: "); + output.append(a); output.append("\n"); - output.append("\tsplash: "); - output.append(splash); + output.append("\tb: "); + output.append(b); output.append("\n"); - output.append("\twaterMark: "); - output.append(waterMark); + output.append("\tc: "); + output.append(c); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class AudioOutputClusterOutputInfo { - public Integer index; - public Integer outputType; - public String name; + public static class TestClusterClusterNestedStructList { + public Integer a; + public Boolean b; + public ChipStructs.TestClusterClusterSimpleStruct c; + public ArrayList d; + public ArrayList e; + public ArrayList f; + public ArrayList g; - public AudioOutputClusterOutputInfo(Integer index, Integer outputType, String name) { - this.index = index; - this.outputType = outputType; - this.name = name; + public TestClusterClusterNestedStructList( + Integer a, + Boolean b, + ChipStructs.TestClusterClusterSimpleStruct c, + ArrayList d, + ArrayList e, + ArrayList f, + ArrayList g) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.e = e; + this.f = f; + this.g = g; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("AudioOutputClusterOutputInfo {\n"); - output.append("\tindex: "); - output.append(index); + output.append("TestClusterClusterNestedStructList {\n"); + output.append("\ta: "); + output.append(a); output.append("\n"); - output.append("\toutputType: "); - output.append(outputType); + output.append("\tb: "); + output.append(b); output.append("\n"); - output.append("\tname: "); - output.append(name); + output.append("\tc: "); + output.append(c); + output.append("\n"); + output.append("\td: "); + output.append(d); + output.append("\n"); + output.append("\te: "); + output.append(e); + output.append("\n"); + output.append("\tf: "); + output.append(f); + output.append("\n"); + output.append("\tg: "); + output.append(g); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ApplicationLauncherClusterApplicationLauncherApplication { - public Integer catalogVendorId; - public String applicationId; + public static class TestClusterClusterDoubleNestedStructList { + public ArrayList a; - public ApplicationLauncherClusterApplicationLauncherApplication( - Integer catalogVendorId, String applicationId) { - this.catalogVendorId = catalogVendorId; - this.applicationId = applicationId; + public TestClusterClusterDoubleNestedStructList( + ArrayList a) { + this.a = a; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ApplicationLauncherClusterApplicationLauncherApplication {\n"); - output.append("\tcatalogVendorId: "); - output.append(catalogVendorId); - output.append("\n"); - output.append("\tapplicationId: "); - output.append(applicationId); + output.append("TestClusterClusterDoubleNestedStructList {\n"); + output.append("\ta: "); + output.append(a); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ApplicationLauncherClusterApplicationEP { - public ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application; - public String endpoint; + public static class TestClusterClusterTestFabricScoped { + public Integer fabricIndex; - public ApplicationLauncherClusterApplicationEP( - ChipStructs.ApplicationLauncherClusterApplicationLauncherApplication application, - String endpoint) { - this.application = application; - this.endpoint = endpoint; + public TestClusterClusterTestFabricScoped(Integer fabricIndex) { + this.fabricIndex = fabricIndex; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ApplicationLauncherClusterApplicationEP {\n"); - output.append("\tapplication: "); - output.append(application); - output.append("\n"); - output.append("\tendpoint: "); - output.append(endpoint); + output.append("TestClusterClusterTestFabricScoped {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class ApplicationBasicClusterApplicationBasicApplication { - public Integer catalogVendorId; - public String applicationId; + public static class TestClusterClusterTestListStructOctet { + public Long fabricIndex; + public byte[] operationalCert; - public ApplicationBasicClusterApplicationBasicApplication( - Integer catalogVendorId, String applicationId) { - this.catalogVendorId = catalogVendorId; - this.applicationId = applicationId; + public TestClusterClusterTestListStructOctet(Long fabricIndex, byte[] operationalCert) { + this.fabricIndex = fabricIndex; + this.operationalCert = operationalCert; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ApplicationBasicClusterApplicationBasicApplication {\n"); - output.append("\tcatalogVendorId: "); - output.append(catalogVendorId); + output.append("TestClusterClusterTestListStructOctet {\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); output.append("\n"); - output.append("\tapplicationId: "); - output.append(applicationId); + output.append("\toperationalCert: "); + output.append(Arrays.toString(operationalCert)); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TestClusterClusterSimpleStruct { - public Integer a; - public Boolean b; - public Integer c; - public byte[] d; - public String e; - public Integer f; - public Float g; - public Double h; + public static class ThreadNetworkDiagnosticsClusterNeighborTable { + public Long extAddress; + public Long age; + public Integer rloc16; + public Long linkFrameCounter; + public Long mleFrameCounter; + public Integer lqi; + public Integer averageRssi; + public Integer lastRssi; + public Integer frameErrorRate; + public Integer messageErrorRate; + public Boolean rxOnWhenIdle; + public Boolean fullThreadDevice; + public Boolean fullNetworkData; + public Boolean isChild; - public TestClusterClusterSimpleStruct( - Integer a, Boolean b, Integer c, byte[] d, String e, Integer f, Float g, Double h) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - this.g = g; - this.h = h; + public ThreadNetworkDiagnosticsClusterNeighborTable( + Long extAddress, + Long age, + Integer rloc16, + Long linkFrameCounter, + Long mleFrameCounter, + Integer lqi, + Integer averageRssi, + Integer lastRssi, + Integer frameErrorRate, + Integer messageErrorRate, + Boolean rxOnWhenIdle, + Boolean fullThreadDevice, + Boolean fullNetworkData, + Boolean isChild) { + this.extAddress = extAddress; + this.age = age; + this.rloc16 = rloc16; + this.linkFrameCounter = linkFrameCounter; + this.mleFrameCounter = mleFrameCounter; + this.lqi = lqi; + this.averageRssi = averageRssi; + this.lastRssi = lastRssi; + this.frameErrorRate = frameErrorRate; + this.messageErrorRate = messageErrorRate; + this.rxOnWhenIdle = rxOnWhenIdle; + this.fullThreadDevice = fullThreadDevice; + this.fullNetworkData = fullNetworkData; + this.isChild = isChild; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterSimpleStruct {\n"); - output.append("\ta: "); - output.append(a); + output.append("ThreadNetworkDiagnosticsClusterNeighborTable {\n"); + output.append("\textAddress: "); + output.append(extAddress); output.append("\n"); - output.append("\tb: "); - output.append(b); + output.append("\tage: "); + output.append(age); output.append("\n"); - output.append("\tc: "); - output.append(c); + output.append("\trloc16: "); + output.append(rloc16); output.append("\n"); - output.append("\td: "); - output.append(Arrays.toString(d)); + output.append("\tlinkFrameCounter: "); + output.append(linkFrameCounter); output.append("\n"); - output.append("\te: "); - output.append(e); + output.append("\tmleFrameCounter: "); + output.append(mleFrameCounter); output.append("\n"); - output.append("\tf: "); - output.append(f); + output.append("\tlqi: "); + output.append(lqi); output.append("\n"); - output.append("\tg: "); - output.append(g); + output.append("\taverageRssi: "); + output.append(averageRssi); output.append("\n"); - output.append("\th: "); - output.append(h); + output.append("\tlastRssi: "); + output.append(lastRssi); + output.append("\n"); + output.append("\tframeErrorRate: "); + output.append(frameErrorRate); + output.append("\n"); + output.append("\tmessageErrorRate: "); + output.append(messageErrorRate); + output.append("\n"); + output.append("\trxOnWhenIdle: "); + output.append(rxOnWhenIdle); + output.append("\n"); + output.append("\tfullThreadDevice: "); + output.append(fullThreadDevice); + output.append("\n"); + output.append("\tfullNetworkData: "); + output.append(fullNetworkData); + output.append("\n"); + output.append("\tisChild: "); + output.append(isChild); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TestClusterClusterNullablesAndOptionalsStruct { - public @Nullable Integer nullableInt; - public Optional optionalInt; - public @Nullable Optional nullableOptionalInt; - public @Nullable String nullableString; - public Optional optionalString; - public @Nullable Optional nullableOptionalString; - public @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct; - public Optional optionalStruct; - public @Nullable Optional nullableOptionalStruct; - public @Nullable ArrayList nullableList; - public Optional> optionalList; - public @Nullable Optional> nullableOptionalList; - - public TestClusterClusterNullablesAndOptionalsStruct( - @Nullable Integer nullableInt, - Optional optionalInt, - @Nullable Optional nullableOptionalInt, - @Nullable String nullableString, - Optional optionalString, - @Nullable Optional nullableOptionalString, - @Nullable ChipStructs.TestClusterClusterSimpleStruct nullableStruct, - Optional optionalStruct, - @Nullable Optional nullableOptionalStruct, - @Nullable ArrayList nullableList, - Optional> optionalList, - @Nullable Optional> nullableOptionalList) { - this.nullableInt = nullableInt; - this.optionalInt = optionalInt; - this.nullableOptionalInt = nullableOptionalInt; - this.nullableString = nullableString; - this.optionalString = optionalString; - this.nullableOptionalString = nullableOptionalString; - this.nullableStruct = nullableStruct; - this.optionalStruct = optionalStruct; - this.nullableOptionalStruct = nullableOptionalStruct; - this.nullableList = nullableList; - this.optionalList = optionalList; - this.nullableOptionalList = nullableOptionalList; + public static class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + public Boolean activeTimestampPresent; + public Boolean pendingTimestampPresent; + public Boolean masterKeyPresent; + public Boolean networkNamePresent; + public Boolean extendedPanIdPresent; + public Boolean meshLocalPrefixPresent; + public Boolean delayPresent; + public Boolean panIdPresent; + public Boolean channelPresent; + public Boolean pskcPresent; + public Boolean securityPolicyPresent; + public Boolean channelMaskPresent; + + public ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + Boolean activeTimestampPresent, + Boolean pendingTimestampPresent, + Boolean masterKeyPresent, + Boolean networkNamePresent, + Boolean extendedPanIdPresent, + Boolean meshLocalPrefixPresent, + Boolean delayPresent, + Boolean panIdPresent, + Boolean channelPresent, + Boolean pskcPresent, + Boolean securityPolicyPresent, + Boolean channelMaskPresent) { + this.activeTimestampPresent = activeTimestampPresent; + this.pendingTimestampPresent = pendingTimestampPresent; + this.masterKeyPresent = masterKeyPresent; + this.networkNamePresent = networkNamePresent; + this.extendedPanIdPresent = extendedPanIdPresent; + this.meshLocalPrefixPresent = meshLocalPrefixPresent; + this.delayPresent = delayPresent; + this.panIdPresent = panIdPresent; + this.channelPresent = channelPresent; + this.pskcPresent = pskcPresent; + this.securityPolicyPresent = securityPolicyPresent; + this.channelMaskPresent = channelMaskPresent; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterNullablesAndOptionalsStruct {\n"); - output.append("\tnullableInt: "); - output.append(nullableInt); + output.append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n"); + output.append("\tactiveTimestampPresent: "); + output.append(activeTimestampPresent); output.append("\n"); - output.append("\toptionalInt: "); - output.append(optionalInt); + output.append("\tpendingTimestampPresent: "); + output.append(pendingTimestampPresent); output.append("\n"); - output.append("\tnullableOptionalInt: "); - output.append(nullableOptionalInt); + output.append("\tmasterKeyPresent: "); + output.append(masterKeyPresent); output.append("\n"); - output.append("\tnullableString: "); - output.append(nullableString); + output.append("\tnetworkNamePresent: "); + output.append(networkNamePresent); output.append("\n"); - output.append("\toptionalString: "); - output.append(optionalString); + output.append("\textendedPanIdPresent: "); + output.append(extendedPanIdPresent); output.append("\n"); - output.append("\tnullableOptionalString: "); - output.append(nullableOptionalString); + output.append("\tmeshLocalPrefixPresent: "); + output.append(meshLocalPrefixPresent); output.append("\n"); - output.append("\tnullableStruct: "); - output.append(nullableStruct); + output.append("\tdelayPresent: "); + output.append(delayPresent); output.append("\n"); - output.append("\toptionalStruct: "); - output.append(optionalStruct); + output.append("\tpanIdPresent: "); + output.append(panIdPresent); output.append("\n"); - output.append("\tnullableOptionalStruct: "); - output.append(nullableOptionalStruct); + output.append("\tchannelPresent: "); + output.append(channelPresent); output.append("\n"); - output.append("\tnullableList: "); - output.append(nullableList); + output.append("\tpskcPresent: "); + output.append(pskcPresent); output.append("\n"); - output.append("\toptionalList: "); - output.append(optionalList); + output.append("\tsecurityPolicyPresent: "); + output.append(securityPolicyPresent); output.append("\n"); - output.append("\tnullableOptionalList: "); - output.append(nullableOptionalList); + output.append("\tchannelMaskPresent: "); + output.append(channelMaskPresent); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TestClusterClusterNestedStruct { - public Integer a; - public Boolean b; - public ChipStructs.TestClusterClusterSimpleStruct c; + public static class ThreadNetworkDiagnosticsClusterRouteTable { + public Long extAddress; + public Integer rloc16; + public Integer routerId; + public Integer nextHop; + public Integer pathCost; + public Integer LQIIn; + public Integer LQIOut; + public Integer age; + public Boolean allocated; + public Boolean linkEstablished; - public TestClusterClusterNestedStruct( - Integer a, Boolean b, ChipStructs.TestClusterClusterSimpleStruct c) { - this.a = a; - this.b = b; - this.c = c; + public ThreadNetworkDiagnosticsClusterRouteTable( + Long extAddress, + Integer rloc16, + Integer routerId, + Integer nextHop, + Integer pathCost, + Integer LQIIn, + Integer LQIOut, + Integer age, + Boolean allocated, + Boolean linkEstablished) { + this.extAddress = extAddress; + this.rloc16 = rloc16; + this.routerId = routerId; + this.nextHop = nextHop; + this.pathCost = pathCost; + this.LQIIn = LQIIn; + this.LQIOut = LQIOut; + this.age = age; + this.allocated = allocated; + this.linkEstablished = linkEstablished; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterNestedStruct {\n"); - output.append("\ta: "); - output.append(a); + output.append("ThreadNetworkDiagnosticsClusterRouteTable {\n"); + output.append("\textAddress: "); + output.append(extAddress); output.append("\n"); - output.append("\tb: "); - output.append(b); + output.append("\trloc16: "); + output.append(rloc16); output.append("\n"); - output.append("\tc: "); - output.append(c); + output.append("\trouterId: "); + output.append(routerId); output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class TestClusterClusterNestedStructList { - public Integer a; - public Boolean b; - public ChipStructs.TestClusterClusterSimpleStruct c; - public ArrayList d; - public ArrayList e; - public ArrayList f; - public ArrayList g; - - public TestClusterClusterNestedStructList( - Integer a, - Boolean b, - ChipStructs.TestClusterClusterSimpleStruct c, - ArrayList d, - ArrayList e, - ArrayList f, - ArrayList g) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - this.g = g; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterNestedStructList {\n"); - output.append("\ta: "); - output.append(a); + output.append("\tnextHop: "); + output.append(nextHop); output.append("\n"); - output.append("\tb: "); - output.append(b); + output.append("\tpathCost: "); + output.append(pathCost); output.append("\n"); - output.append("\tc: "); - output.append(c); + output.append("\tLQIIn: "); + output.append(LQIIn); output.append("\n"); - output.append("\td: "); - output.append(d); + output.append("\tLQIOut: "); + output.append(LQIOut); output.append("\n"); - output.append("\te: "); - output.append(e); + output.append("\tage: "); + output.append(age); output.append("\n"); - output.append("\tf: "); - output.append(f); + output.append("\tallocated: "); + output.append(allocated); output.append("\n"); - output.append("\tg: "); - output.append(g); + output.append("\tlinkEstablished: "); + output.append(linkEstablished); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TestClusterClusterDoubleNestedStructList { - public ArrayList a; + public static class ThreadNetworkDiagnosticsClusterSecurityPolicy { + public Integer rotationTime; + public Integer flags; - public TestClusterClusterDoubleNestedStructList( - ArrayList a) { - this.a = a; + public ThreadNetworkDiagnosticsClusterSecurityPolicy(Integer rotationTime, Integer flags) { + this.rotationTime = rotationTime; + this.flags = flags; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterDoubleNestedStructList {\n"); - output.append("\ta: "); - output.append(a); + output.append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n"); + output.append("\trotationTime: "); + output.append(rotationTime); output.append("\n"); - output.append("}\n"); - return output.toString(); - } - } - - public static class TestClusterClusterTestFabricScoped { - public Integer fabricIndex; - - public TestClusterClusterTestFabricScoped(Integer fabricIndex) { - this.fabricIndex = fabricIndex; - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterTestFabricScoped {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); + output.append("\tflags: "); + output.append(flags); output.append("\n"); output.append("}\n"); return output.toString(); } } - public static class TestClusterClusterTestListStructOctet { - public Long fabricIndex; - public byte[] operationalCert; + public static class UserLabelClusterLabelStruct { + public String label; + public String value; - public TestClusterClusterTestListStructOctet(Long fabricIndex, byte[] operationalCert) { - this.fabricIndex = fabricIndex; - this.operationalCert = operationalCert; + public UserLabelClusterLabelStruct(String label, String value) { + this.label = label; + this.value = value; } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("TestClusterClusterTestListStructOctet {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); + output.append("UserLabelClusterLabelStruct {\n"); + output.append("\tlabel: "); + output.append(label); output.append("\n"); - output.append("\toperationalCert: "); - output.append(Arrays.toString(operationalCert)); + output.append("\tvalue: "); + output.append(value); output.append("\n"); output.append("}\n"); return output.toString(); From 872685c5d0f868a7c3c027b7d49b9ccdfc558e49 Mon Sep 17 00:00:00 2001 From: Austin Hsieh Date: Mon, 24 Jan 2022 16:32:36 -0800 Subject: [PATCH 7/8] Regen with updated ZAP --- .../java/zap-generated/CHIPClusters-JNI.cpp | 230 ++++++++++++++++++ .../chip/devicecontroller/ChipClusters.java | 51 ++++ 2 files changed, 281 insertions(+) diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 9543012bc9c284..74ff4a49e41c95 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -14881,6 +14881,44 @@ JNI_METHOD(void, LocalizationConfigurationCluster, subscribeSupportedLocalesAttr onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, LocalizationConfigurationCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + LocalizationConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, LowPowerCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; @@ -19363,6 +19401,44 @@ JNI_METHOD(void, OperationalCredentialsCluster, updateNOC) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, OperationalCredentialsCluster, subscribeNOCsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OperationalCredentialsCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOperationalCredentialsNOCsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, OperationalCredentialsCluster, subscribeFabricsListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -31684,6 +31760,160 @@ JNI_METHOD(jlong, TimeFormatLocalizationCluster, initWithDevice)(JNIEnv * env, j return reinterpret_cast(cppCluster); } +JNI_METHOD(void, TimeFormatLocalizationCluster, subscribeHourFormatAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + auto successFn = chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TimeFormatLocalizationCluster, subscribeActiveCalendarTypeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TimeFormatLocalizationCluster, subscribeSupportedCalendarTypesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute( + onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), + static_cast(maxInterval), + CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TimeFormatLocalizationCluster, subscribeClusterRevisionAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +{ + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + TimeFormatLocalizationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + using TypeInfo = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + auto successFn = + chip::Callback::Callback::FromCancelable( + onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(jlong, UserLabelCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 9c1cf1fdbaf971..f1eb3dc746ad59 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -7929,6 +7929,11 @@ public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readActiveLocaleAttribute( long chipClusterPtr, CharStringAttributeCallback callback); @@ -7955,6 +7960,9 @@ private native void subscribeSupportedLocalesAttribute( private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } public static class LowPowerCluster extends BaseChipCluster { @@ -10107,6 +10115,11 @@ public void readNOCsAttribute(NOCsAttributeCallback callback) { readNOCsAttribute(chipClusterPtr, callback); } + public void subscribeNOCsAttribute( + NOCsAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNOCsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readFabricsListAttribute(FabricsListAttributeCallback callback) { readFabricsListAttribute(chipClusterPtr, callback); } @@ -10173,6 +10186,9 @@ public void subscribeClusterRevisionAttribute( private native void readNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback); + private native void subscribeNOCsAttribute( + long chipClusterPtr, NOCsAttributeCallback callback, int minInterval, int maxInterval); + private native void readFabricsListAttribute( long chipClusterPtr, FabricsListAttributeCallback callback); @@ -17030,6 +17046,11 @@ public void writeHourFormatAttribute( writeHourFormatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } + public void subscribeHourFormatAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeHourFormatAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readActiveCalendarTypeAttribute(IntegerAttributeCallback callback) { readActiveCalendarTypeAttribute(chipClusterPtr, callback); } @@ -17043,15 +17064,30 @@ public void writeActiveCalendarTypeAttribute( writeActiveCalendarTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } + public void subscribeActiveCalendarTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeActiveCalendarTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readSupportedCalendarTypesAttribute( SupportedCalendarTypesAttributeCallback callback) { readSupportedCalendarTypesAttribute(chipClusterPtr, callback); } + public void subscribeSupportedCalendarTypesAttribute( + SupportedCalendarTypesAttributeCallback callback, int minInterval, int maxInterval) { + subscribeSupportedCalendarTypesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + private native void readHourFormatAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -17061,6 +17097,9 @@ private native void writeHourFormatAttribute( Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeHourFormatAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readActiveCalendarTypeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); @@ -17070,11 +17109,23 @@ private native void writeActiveCalendarTypeAttribute( Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeActiveCalendarTypeAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readSupportedCalendarTypesAttribute( long chipClusterPtr, SupportedCalendarTypesAttributeCallback callback); + private native void subscribeSupportedCalendarTypesAttribute( + long chipClusterPtr, + SupportedCalendarTypesAttributeCallback callback, + int minInterval, + int maxInterval); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeClusterRevisionAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); } public static class UserLabelCluster extends BaseChipCluster { From 72a5918cd77a8f780767ef546b0fc62dab81e1d1 Mon Sep 17 00:00:00 2001 From: Austin Hsieh Date: Mon, 24 Jan 2022 17:22:31 -0800 Subject: [PATCH 8/8] Regen again --- .../zap-generated/endpoint_config.h | 1475 +++++++++++------ .../zap-generated/endpoint_config.h | 531 +++--- .../zap-generated/endpoint_config.h | 497 +++--- .../zap-generated/endpoint_config.h | 485 +++--- .../lock-app/zap-generated/endpoint_config.h | 491 +++--- .../zap-generated/endpoint_config.h | 148 +- .../zap-generated/endpoint_config.h | 79 +- .../zap-generated/endpoint_config.h | 79 +- .../app1/zap-generated/endpoint_config.h | 138 +- .../app2/zap-generated/endpoint_config.h | 138 +- .../pump-app/zap-generated/endpoint_config.h | 401 +++-- .../zap-generated/endpoint_config.h | 473 +++--- .../zap-generated/endpoint_config.h | 203 ++- .../zap-generated/endpoint_config.h | 583 ++++--- .../tv-app/zap-generated/endpoint_config.h | 1002 +++++++---- .../zap-generated/endpoint_config.h | 800 +++++---- .../zap-generated/endpoint_config.h | 522 +++--- 17 files changed, 4947 insertions(+), 3098 deletions(-) diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 461f275b1b2d6a..6f22cff1c26495 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -43,446 +43,672 @@ /* 24 - ActiveLocale, */ \ 5, 'e', 'n', '-', 'U', 'S', \ \ + /* 30 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 30 - Breadcrumb, */ \ + /* 284 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 292 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 546 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 550 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 562 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 566 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 570 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 578 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 582 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 590 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 598 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 606 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 610 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 612 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 620 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 628 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 632 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 636 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 640 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 644 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 648 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 652 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 656 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 660 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 664 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 668 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 672 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 676 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 680 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 684 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 688 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 692 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 696 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 700 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 704 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 708 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 712 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 716 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 720 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 724 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 728 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 732 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 736 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 740 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 744 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 748 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 752 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 756 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 760 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 764 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 768 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 776 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 784 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 788 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 795 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 799 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 803 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 807 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 811 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 815 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 819 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 823 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 831 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 839 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 843 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 851 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 859 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 867 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 875 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 883 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 891 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 895 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ - /* 379 - FeatureMap, */ \ + /* 899 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 383 - BatteryVoltage, */ \ + /* 903 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 387 - BatteryTimeRemaining, */ \ + /* 907 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 391 - FeatureMap, */ \ + /* 911 - ActiveBatteryFaults, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 919 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 395 - LastConnectErrorValue, */ \ + /* 923 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 935 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 399 - FeatureMap, */ \ + /* 939 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 403 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 943 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ + \ + /* 947 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 407 - Description, */ \ + /* 1201 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 414 - DoorOpenEvents, */ \ + /* 1208 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - DoorClosedEvents, */ \ + /* 1212 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - Language, */ \ + /* 1216 - Language, */ \ 2, 'e', 'n', \ \ - /* 425 - AutoRelockTime, */ \ + /* 1219 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 429 - FeatureMap, */ \ + /* 1223 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 433 - LifetimeRunningHours, */ \ + /* 1227 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 436 - Power, */ \ + /* 1230 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 439 - LifetimeEnergyConsumed, */ \ + /* 1233 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 443 - FeatureMap, */ \ + /* 1237 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 447 - FeatureMap, */ \ + /* 1241 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 451 - IAS CIE address, */ \ + /* 1245 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ + \ + /* 1253 - channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ + \ + /* 1507 - target navigator list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 459 - start time, */ \ + /* 1761 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 467 - duration, */ \ + /* 1769 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 475 - playback speed, */ \ + /* 1777 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 479 - seek range end, */ \ + /* 1781 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 487 - seek range start, */ \ + /* 1789 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ + \ + /* 1797 - media input list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 495 - supported streaming protocols, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 2051 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2305 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ + \ + /* 2309 - audio output list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ + \ + /* 2563 - application launcher list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ + \ + /* 2817 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 499 - bitmap32, */ \ + /* 2849 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 503 - bitmap64, */ \ + /* 2853 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 511 - int24u, */ \ + /* 2861 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 514 - int32u, */ \ + /* 2864 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 518 - int40u, */ \ + /* 2868 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 523 - int48u, */ \ + /* 2873 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - int56u, */ \ + /* 2879 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 536 - int64u, */ \ + /* 2886 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - int24s, */ \ + /* 2894 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 547 - int32s, */ \ + /* 2897 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 551 - int40s, */ \ + /* 2901 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - int48s, */ \ + /* 2906 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 562 - int56s, */ \ + /* 2912 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 569 - int64s, */ \ + /* 2919 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - float_single, */ \ + /* 2927 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 581 - float_double, */ \ + /* 2931 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 589 - epoch_us, */ \ + /* 2939 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 597 - epoch_s, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 601 - nullable_bitmap32, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 605 - nullable_bitmap64, */ \ + /* 2947 - epoch_s, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2951 - list_long_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3951 - nullable_bitmap32, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3955 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 613 - nullable_int24u, */ \ + /* 3963 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 616 - nullable_int32u, */ \ + /* 3966 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - nullable_int40u, */ \ + /* 3970 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 625 - nullable_int48u, */ \ + /* 3975 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 631 - nullable_int56u, */ \ + /* 3981 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 638 - nullable_int64u, */ \ + /* 3988 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 646 - nullable_int24s, */ \ + /* 3996 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 649 - nullable_int32s, */ \ + /* 3999 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 653 - nullable_int40s, */ \ + /* 4003 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 658 - nullable_int48s, */ \ + /* 4008 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 664 - nullable_int56s, */ \ + /* 4014 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 671 - nullable_int64s, */ \ + /* 4021 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 679 - nullable_float_single, */ \ + /* 4029 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 683 - nullable_float_double, */ \ + /* 4033 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 691 - measurement type, */ \ + /* 4041 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 695 - total active power, */ \ + /* 4045 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 699 - FeatureMap, */ \ + /* 4049 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -506,452 +732,678 @@ /* 24 - ActiveLocale, */ \ 5, 'e', 'n', '-', 'U', 'S', \ \ + /* 30 - SupportedLocales, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 30 - Breadcrumb, */ \ + /* 284 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 292 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 546 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 550 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 562 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 566 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 570 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 578 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 582 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 590 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 598 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 606 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 610 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 612 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 620 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 628 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 632 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 636 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 640 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 644 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 648 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 652 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 656 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 660 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 664 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 668 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 672 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 676 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 680 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 684 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 688 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 692 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 696 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 700 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 704 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 708 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 712 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 716 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 720 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 724 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 728 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 732 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 736 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 740 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 744 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 748 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 752 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 756 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 760 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 764 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 768 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 776 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 784 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 788 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 795 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 799 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 803 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 807 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 811 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 815 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 819 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 823 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 831 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 839 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 843 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 851 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 859 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 867 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 875 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 883 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 891 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 895 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ - /* 379 - FeatureMap, */ \ + /* 899 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 383 - BatteryVoltage, */ \ + /* 903 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 387 - BatteryTimeRemaining, */ \ + /* 907 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 391 - FeatureMap, */ \ + /* 911 - ActiveBatteryFaults, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 919 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 395 - LastConnectErrorValue, */ \ + /* 923 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 935 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 399 - FeatureMap, */ \ + /* 939 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 403 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 943 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ + \ + /* 947 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 407 - Description, */ \ + /* 1201 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 414 - DoorOpenEvents, */ \ + /* 1208 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 418 - DoorClosedEvents, */ \ + /* 1212 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - Language, */ \ + /* 1216 - Language, */ \ 2, 'e', 'n', \ \ - /* 425 - AutoRelockTime, */ \ + /* 1219 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 429 - FeatureMap, */ \ + /* 1223 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 433 - LifetimeRunningHours, */ \ + /* 1227 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 436 - Power, */ \ + /* 1230 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 439 - LifetimeEnergyConsumed, */ \ + /* 1233 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 443 - FeatureMap, */ \ + /* 1237 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 447 - FeatureMap, */ \ + /* 1241 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 451 - IAS CIE address, */ \ + /* 1245 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ + \ + /* 1253 - channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ + \ + /* 1507 - target navigator list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 459 - start time, */ \ + /* 1761 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 467 - duration, */ \ + /* 1769 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 475 - playback speed, */ \ + /* 1777 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 479 - seek range end, */ \ + /* 1781 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 487 - seek range start, */ \ + /* 1789 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ + \ + /* 1797 - media input list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 495 - supported streaming protocols, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 2051 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2305 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ + \ + /* 2309 - audio output list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ + \ + /* 2563 - application launcher list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ + \ + /* 2817 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 499 - bitmap32, */ \ + /* 2849 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 503 - bitmap64, */ \ + /* 2853 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 511 - int24u, */ \ + /* 2861 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 514 - int32u, */ \ + /* 2864 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 518 - int40u, */ \ + /* 2868 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 523 - int48u, */ \ + /* 2873 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 529 - int56u, */ \ + /* 2879 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 536 - int64u, */ \ + /* 2886 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 544 - int24s, */ \ + /* 2894 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 547 - int32s, */ \ + /* 2897 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 551 - int40s, */ \ + /* 2901 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 556 - int48s, */ \ + /* 2906 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 562 - int56s, */ \ + /* 2912 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 569 - int64s, */ \ + /* 2919 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 577 - float_single, */ \ + /* 2927 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 581 - float_double, */ \ + /* 2931 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 589 - epoch_us, */ \ + /* 2939 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 597 - epoch_s, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 601 - nullable_bitmap32, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 605 - nullable_bitmap64, */ \ + /* 2947 - epoch_s, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2951 - list_long_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3951 - nullable_bitmap32, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3955 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 613 - nullable_int24u, */ \ + /* 3963 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 616 - nullable_int32u, */ \ + /* 3966 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 620 - nullable_int40u, */ \ + /* 3970 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 625 - nullable_int48u, */ \ + /* 3975 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 631 - nullable_int56u, */ \ + /* 3981 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 638 - nullable_int64u, */ \ + /* 3988 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 646 - nullable_int24s, */ \ + /* 3996 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 649 - nullable_int32s, */ \ + /* 3999 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 653 - nullable_int40s, */ \ + /* 4003 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 658 - nullable_int48s, */ \ + /* 4008 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 664 - nullable_int56s, */ \ + /* 4014 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 671 - nullable_int64s, */ \ + /* 4021 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 679 - nullable_float_single, */ \ + /* 4029 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 683 - nullable_float_double, */ \ + /* 4033 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 691 - measurement type, */ \ + /* 4041 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 695 - total active power, */ \ + /* 4045 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 699 - FeatureMap, */ \ + /* 4049 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (136) +#define GENERATED_DEFAULTS_COUNT (150) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1120,9 +1572,9 @@ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(24) }, /* ActiveLocale */ \ - { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_LONG_DEFAULTS_INDEX(24) }, /* ActiveLocale */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(30) }, /* SupportedLocales */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, \ @@ -1139,32 +1591,31 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(284) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(546) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(550) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(562) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(566) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(570) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(578) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -1174,23 +1625,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(582) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(590) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(598) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(606) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(610) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -1203,50 +1654,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(632) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(640) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(648) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(660) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(664) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(668) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(672) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(676) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(680) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(684) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(688) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(692) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(696) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(700) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(704) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(708) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(712) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(716) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(720) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(724) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(728) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(732) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(736) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(740) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(744) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(748) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(752) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(756) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(760) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(764) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(768) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(776) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(784) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(788) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(795) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -1255,28 +1706,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(799) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(803) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(807) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(811) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(815) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(819) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(823) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(831) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(839) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(843) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(851) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(859) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(867) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(875) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(883) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(891) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -1345,7 +1796,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(895) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ @@ -1377,7 +1828,7 @@ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(379) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(899) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ @@ -1405,29 +1856,28 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Power Source (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(383) }, /* BatteryVoltage */ \ - { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(387) }, /* BatteryTimeRemaining */ \ - { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x00000012, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveBatteryFaults */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ + { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(903) }, /* BatteryVoltage */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ + { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(907) }, /* BatteryTimeRemaining */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(911) }, /* ActiveBatteryFaults */ \ { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(391) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(919) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(923) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(395) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(399) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(935) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(939) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1437,12 +1887,12 @@ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(403) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(943) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(947) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1458,17 +1908,17 @@ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedModes */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x00000004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(407) }, /* Description */ \ + { 0x00000004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1201) }, /* Description */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(414) }, /* DoorOpenEvents */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1208) }, /* DoorOpenEvents */ \ { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(418) }, /* DoorClosedEvents */ \ + ZAP_LONG_DEFAULTS_INDEX(1212) }, /* DoorClosedEvents */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1478,8 +1928,8 @@ { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(422) }, /* Language */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(425) }, /* AutoRelockTime */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1216) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1219) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1525,10 +1975,10 @@ { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ - { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(429) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1223) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1557,17 +2007,17 @@ { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(433) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1227) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1230) }, /* Power */ \ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(439) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1233) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ - { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(443) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1237) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -1592,12 +2042,12 @@ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* control sequence of operation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* system mode */ \ - { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(447) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1241) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1719,7 +2169,7 @@ { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(451) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(1245) }, /* IAS CIE address */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1728,28 +2178,27 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* channel list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1253) }, /* channel list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* target navigator list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1507) }, /* target navigator list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(459) }, /* start time */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(467) }, /* duration */ \ - { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(475) }, /* playback speed */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(479) }, /* seek range end */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(487) }, /* seek range start */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1761) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1769) }, /* duration */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1777) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1781) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1789) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* media input list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1797) }, /* media input list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Low Power (server) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -1758,63 +2207,60 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2051) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(495) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2305) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* audio output list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2309) }, /* audio output list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* application launcher list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2563) }, /* application launcher list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ - { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ - { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* allowed vendor list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* vendor name */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2817) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ - { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ - { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(499) }, /* bitmap32 */ \ - { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(503) }, /* bitmap64 */ \ - { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ - { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x00000007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(511) }, /* int24u */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(514) }, /* int32u */ \ - { 0x00000009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(518) }, /* int40u */ \ - { 0x0000000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(523) }, /* int48u */ \ - { 0x0000000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(529) }, /* int56u */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(536) }, /* int64u */ \ - { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ - { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0000000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(544) }, /* int24s */ \ - { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(547) }, /* int32s */ \ - { 0x00000011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(551) }, /* int40s */ \ - { 0x00000012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(556) }, /* int48s */ \ - { 0x00000013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(562) }, /* int56s */ \ - { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(569) }, /* int64s */ \ - { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ - { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x00000017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(577) }, /* float_single */ \ - { 0x00000018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(581) }, /* float_double */ \ - { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ + { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2849) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2853) }, /* bitmap64 */ \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ + { 0x00000007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2861) }, /* int24u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int32u */ \ + { 0x00000009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2868) }, /* int40u */ \ + { 0x0000000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int48u */ \ + { 0x0000000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2879) }, /* int56u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2886) }, /* int64u */ \ + { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ + { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ + { 0x0000000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2894) }, /* int24s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int32s */ \ + { 0x00000011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2901) }, /* int40s */ \ + { 0x00000012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* int48s */ \ + { 0x00000013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2912) }, /* int56s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2919) }, /* int64s */ \ + { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ + { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ + { 0x00000017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2927) }, /* float_single */ \ + { 0x00000018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2931) }, /* float_double */ \ + { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x0000001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ { 0x0000001B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1826,9 +2272,9 @@ { 0x0000001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x0000001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x00000020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(589) }, /* epoch_us */ \ - { 0x00000021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(597) }, /* epoch_s */ \ - { 0x00000022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ + { 0x00000020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2939) }, /* epoch_us */ \ + { 0x00000021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2947) }, /* epoch_s */ \ + { 0x00000022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x00000023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ { 0x00000024, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* enum_attr */ \ @@ -1841,9 +2287,8 @@ { 0x00000028, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16u */ \ { 0x00000029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* range_restricted_int16s */ \ - { 0x0000002A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* list_long_octet_string */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(35) }, /* range_restricted_int16s */ \ + { 0x0000002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2951) }, /* list_long_octet_string */ \ { 0x0000002B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* list_fabric_scoped */ \ { 0x00000030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ @@ -1855,49 +2300,49 @@ { 0x00008002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x00008003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(601) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3951) }, /* nullable_bitmap32 */ \ { 0x00008004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(605) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3955) }, /* nullable_bitmap64 */ \ { 0x00008005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x00008006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x00008007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(613) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3963) }, /* nullable_int24u */ \ { 0x00008008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(616) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3966) }, /* nullable_int32u */ \ { 0x00008009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(620) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3970) }, /* nullable_int40u */ \ { 0x0000800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(625) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int48u */ \ { 0x0000800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(631) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3981) }, /* nullable_int56u */ \ { 0x0000800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(638) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3988) }, /* nullable_int64u */ \ { 0x0000800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x0000800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x0000800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(646) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3996) }, /* nullable_int24s */ \ { 0x00008010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(649) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3999) }, /* nullable_int32s */ \ { 0x00008011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(653) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(4003) }, /* nullable_int40s */ \ { 0x00008012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(658) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_int48s */ \ { 0x00008013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(664) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(4014) }, /* nullable_int56s */ \ { 0x00008014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(671) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4021) }, /* nullable_int64s */ \ { 0x00008015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x00008016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x00008017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(679) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4029) }, /* nullable_float_single */ \ { 0x00008018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(683) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4033) }, /* nullable_float_double */ \ { 0x00008019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x0000801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -1922,18 +2367,18 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x00000000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(691) }, /* measurement type */ \ - { 0x00000304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(695) }, /* total active power */ \ - { 0x00000505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ - { 0x00000506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ - { 0x00000507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ - { 0x00000508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ - { 0x00000509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ - { 0x0000050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ - { 0x0000050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ - { 0x0000050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ - { 0x0000050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4041) }, /* measurement type */ \ + { 0x00000304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4045) }, /* total active power */ \ + { 0x00000505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ + { 0x00000506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ + { 0x00000507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ + { 0x00000508, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current */ \ + { 0x00000509, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current min */ \ + { 0x0000050A, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms current max */ \ + { 0x0000050B, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power */ \ + { 0x0000050C, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power min */ \ + { 0x0000050D, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* active power max */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -1945,7 +2390,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(699) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4049) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2060,7 +2505,7 @@ { 0x0000002B, \ ZAP_ATTRIBUTE_INDEX(40), \ 3, \ - 38, \ + 292, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayLocalizationConfigurationServer }, /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x0000002C, \ @@ -2073,10 +2518,10 @@ 0x0000002E, ZAP_ATTRIBUTE_INDEX(47), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(49), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(49), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(55), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(55), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(65), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -2160,10 +2605,10 @@ 0x00000025, ZAP_ATTRIBUTE_INDEX(242), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(246), 11, 80, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(246), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(257), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(257), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ 0x00000039, ZAP_ATTRIBUTE_INDEX(267), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -2172,7 +2617,7 @@ 0x0000003B, ZAP_ATTRIBUTE_INDEX(268), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(273), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(273), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ 0x00000041, ZAP_ATTRIBUTE_INDEX(275), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -2256,16 +2701,16 @@ 0x00000503, ZAP_ATTRIBUTE_INDEX(475), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(477), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(477), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(479), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(479), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ 0x00000506, ZAP_ATTRIBUTE_INDEX(482), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(489), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(489), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ 0x00000508, ZAP_ATTRIBUTE_INDEX(492), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -2274,22 +2719,22 @@ 0x00000509, ZAP_ATTRIBUTE_INDEX(493), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(494), 3, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(494), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(497), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(497), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(500), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(500), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(502), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(502), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ 0x0000050E, ZAP_ATTRIBUTE_INDEX(510), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(511), 79, 2285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(511), 79, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ 0x00000B04, ZAP_ATTRIBUTE_INDEX(590), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -2322,7 +2767,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 25, 1241 }, { ZAP_CLUSTER_INDEX(25), 46, 3364 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 25, 1761 }, { ZAP_CLUSTER_INDEX(25), 46, 6194 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2332,7 +2777,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4626) +#define ATTRIBUTE_MAX_SIZE (7976) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 49197d8416204f..b2d5bb4102f3ee 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -48,231 +48,268 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x15, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 379 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 645 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ + \ + /* 649 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU @@ -300,236 +337,273 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x15, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 379 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 645 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ + \ + /* 649 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (75) +#define GENERATED_DEFAULTS_COUNT (78) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -620,31 +694,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -654,23 +727,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -683,50 +756,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -735,28 +808,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(613) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -813,7 +886,7 @@ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ @@ -827,12 +900,12 @@ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(379) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(645) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(649) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -884,10 +957,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -938,7 +1011,7 @@ 0x0000003B, ZAP_ATTRIBUTE_INDEX(192), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(197), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(197), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -947,7 +1020,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1212 }, { ZAP_CLUSTER_INDEX(16), 5, 41 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1478 }, { ZAP_CLUSTER_INDEX(16), 5, 295 }, \ } // Largest attribute size is needed for various buffers @@ -957,7 +1030,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1253) +#define ATTRIBUTE_MAX_SIZE (1773) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index e3b080d1951a46..e2ad3368d49fa9 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -59,236 +59,255 @@ /* 42 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 50 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 304 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 308 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 320 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 324 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 62 - UpTime, */ \ + /* 328 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 336 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 340 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 348 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 356 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 364 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 368 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 370 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 378 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 386 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 390 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 394 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 398 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 402 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 406 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 410 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 414 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 418 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 422 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 426 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 430 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 434 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 438 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 442 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 446 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 450 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 454 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 458 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 462 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 466 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 470 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 474 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 478 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 482 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 486 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 490 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 494 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 498 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 502 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 506 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 510 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 514 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 518 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 522 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 526 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 534 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 542 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 546 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 553 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 557 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 561 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 565 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 569 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 573 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 577 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 581 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 589 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 601 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 609 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 617 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 625 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 633 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 641 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 649 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 387 - Description, */ \ + /* 653 - Description, */ \ 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ \ - /* 395 - FeatureMap, */ \ + /* 661 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0A, \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 399 - Language, */ \ + /* 665 - Language, */ \ 2, 'e', 'n', \ \ - /* 402 - AutoRelockTime, */ \ + /* 668 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ } @@ -328,242 +347,261 @@ /* 42 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 50 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 304 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 308 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 320 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 324 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 62 - UpTime, */ \ + /* 328 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 336 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 340 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 348 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 356 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 364 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 368 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 370 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 378 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 386 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 390 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 394 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 398 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 402 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 406 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 410 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 414 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 418 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 422 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 426 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 430 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 434 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 438 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 442 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 446 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 450 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 454 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 458 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 462 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 466 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 470 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 474 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 478 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 482 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 486 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 490 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 494 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 498 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 502 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 506 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 510 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 514 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 518 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 522 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 526 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 534 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 542 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 546 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 553 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 557 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 561 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 565 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 569 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 573 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 577 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 581 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 589 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 601 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 609 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 617 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 625 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 633 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 641 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 649 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 387 - Description, */ \ + /* 653 - Description, */ \ 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ \ - /* 395 - FeatureMap, */ \ + /* 661 - FeatureMap, */ \ 0x0A, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 399 - Language, */ \ + /* 665 - Language, */ \ 2, 'e', 'n', \ \ - /* 402 - AutoRelockTime, */ \ + /* 668 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (80) +#define GENERATED_DEFAULTS_COUNT (82) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -672,31 +710,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(42) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(320) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -706,23 +743,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(74) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(98) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(102) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -735,50 +772,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(252) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(518) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(526) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(542) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(280) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(546) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -787,28 +824,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(367) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(625) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(633) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(383) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(649) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -848,12 +885,12 @@ /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(387) }, /* Description */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(653) }, /* Description */ \ { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ { 0x0000000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ { 0x00000010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ { 0x00000013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(395) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(661) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -866,8 +903,8 @@ { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(399) }, /* Language */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(402) }, /* AutoRelockTime */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(665) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(668) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -937,10 +974,10 @@ 0x0000002F, ZAP_ATTRIBUTE_INDEX(34), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(40), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(40), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(46), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(46), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(56), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -992,7 +1029,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1287 }, { ZAP_CLUSTER_INDEX(18), 3, 162 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1553 }, { ZAP_CLUSTER_INDEX(18), 3, 162 }, \ } // Largest attribute size is needed for various buffers @@ -1002,7 +1039,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1449) +#define ATTRIBUTE_MAX_SIZE (1715) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index 8229bbdffd8822..509d64ef7b38a3 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -48,230 +48,249 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ - /* 379 - FeatureMap, */ \ + /* 645 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ } @@ -300,236 +319,255 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ - /* 379 - FeatureMap, */ \ + /* 645 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (75) +#define GENERATED_DEFAULTS_COUNT (77) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -643,31 +681,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -677,23 +714,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -706,50 +743,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -758,28 +795,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(613) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -822,7 +859,7 @@ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ @@ -848,7 +885,7 @@ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(379) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(645) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ @@ -965,10 +1002,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(38), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(38), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(44), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(44), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(54), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1049,7 +1086,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 19, 1219 }, { ZAP_CLUSTER_INDEX(19), 6, 86 }, { ZAP_CLUSTER_INDEX(25), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 19, 1485 }, { ZAP_CLUSTER_INDEX(19), 6, 86 }, { ZAP_CLUSTER_INDEX(25), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1059,7 +1096,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1311) +#define ATTRIBUTE_MAX_SIZE (1577) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index c6b718f473fad7..3b031411186d3b 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -59,233 +59,252 @@ /* 42 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 50 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 304 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 308 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 320 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 324 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 62 - UpTime, */ \ + /* 328 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 336 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 340 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 348 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 356 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 364 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 368 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 370 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 378 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 386 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 390 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 394 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 398 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 402 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 406 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 410 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 414 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 418 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 422 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 426 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 430 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 434 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 438 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 442 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 446 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 450 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 454 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 458 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 462 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 466 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 470 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 474 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 478 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 482 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 486 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 490 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 494 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 498 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 502 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 506 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 510 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 514 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 518 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 522 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 526 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 534 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 542 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 546 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 553 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 557 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 561 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 565 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 569 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 573 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 577 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 581 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 589 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 601 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 609 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 617 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 625 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 633 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 641 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 649 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 387 - FeatureMap, */ \ + /* 653 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 391 - Description, */ \ + /* 657 - Description, */ \ 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ \ - /* 399 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0A, \ } @@ -325,239 +344,258 @@ /* 42 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 50 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 304 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 308 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 320 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 324 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 62 - UpTime, */ \ + /* 328 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 336 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 340 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 348 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 356 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 364 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 368 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 370 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 378 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 386 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 390 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 394 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 398 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 402 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 406 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 410 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 414 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 418 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 422 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 426 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 430 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 434 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 438 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 442 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 446 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 450 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 454 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 458 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 462 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 466 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 470 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 474 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 478 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 482 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 486 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 490 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 494 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 498 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 502 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 506 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 510 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 514 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 518 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 522 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 526 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 534 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 542 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 546 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 553 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 557 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 561 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 565 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 569 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 573 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 577 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 581 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 589 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 597 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 601 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 609 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 617 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 625 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 633 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 641 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 649 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 387 - FeatureMap, */ \ + /* 653 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 391 - Description, */ \ + /* 657 - Description, */ \ 7, 'B', 'a', 't', 't', 'e', 'r', 'y', \ \ - /* 399 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x0A, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (79) +#define GENERATED_DEFAULTS_COUNT (81) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -660,31 +698,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(42) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(304) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(320) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -694,23 +731,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(74) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(98) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(102) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(368) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -723,50 +760,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(252) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(518) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(526) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(542) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(280) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(546) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -775,28 +812,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(367) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(625) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(633) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(383) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(649) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -832,7 +869,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(387) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(653) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ @@ -845,12 +882,12 @@ /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Status */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* Order */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(391) }, /* Description */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_LONG_DEFAULTS_INDEX(657) }, /* Description */ \ { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ { 0x0000000F, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementNeeded */ \ { 0x00000010, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplaceability */ \ { 0x00000013, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryReplacementDescription */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(399) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(665) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } @@ -906,10 +943,10 @@ 0x0000002F, ZAP_ATTRIBUTE_INDEX(34), 6, 73, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(40), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(40), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(46), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(46), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(56), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -960,7 +997,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1287 }, { ZAP_CLUSTER_INDEX(18), 3, 146 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1553 }, { ZAP_CLUSTER_INDEX(18), 3, 146 }, \ } // Largest attribute size is needed for various buffers @@ -970,7 +1007,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1433) +#define ATTRIBUTE_MAX_SIZE (1699) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/log-source-app/zap-generated/endpoint_config.h b/zzz_generated/log-source-app/zap-generated/endpoint_config.h index e59b896560ef69..8d4532d56d1215 100644 --- a/zzz_generated/log-source-app/zap-generated/endpoint_config.h +++ b/zzz_generated/log-source-app/zap-generated/endpoint_config.h @@ -31,6 +31,67 @@ \ /* 0 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Operational Credentials (server), big-endian */ \ + \ + /* 262 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 582 - TrustedRootCertificates, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, \ } #else // !BIGENDIAN_CPU @@ -41,11 +102,72 @@ \ /* 0 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 8 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Operational Credentials (server), little-endian */ \ + \ + /* 262 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 582 - TrustedRootCertificates, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (1) +#define GENERATED_DEFAULTS_COUNT (4) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -79,20 +201,18 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(262) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000004, ZAP_TYPE(ARRAY), 400, 0, ZAP_LONG_DEFAULTS_INDEX(582) }, /* TrustedRootCertificates */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -106,7 +226,7 @@ #define GENERATED_CLUSTERS \ { \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(0), 3, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(0), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ 0x00000031, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -118,7 +238,7 @@ 0x00000032, ZAP_ATTRIBUTE_INDEX(4), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(4), 5, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(4), 5, 724, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ } @@ -127,7 +247,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 5, 16 }, \ + { ZAP_CLUSTER_INDEX(0), 5, 990 }, \ } // Largest attribute size is needed for various buffers @@ -137,7 +257,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (16) +#define ATTRIBUTE_MAX_SIZE (990) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 2f9643486e34a4..da4cdec66b737f 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -37,15 +37,34 @@ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 14 - FeatureMap, */ \ + /* 14 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 268 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 18 - LastConnectErrorValue, */ \ + /* 272 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 284 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 22 - FeatureMap, */ \ + /* 288 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ } @@ -63,21 +82,40 @@ /* 6 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 14 - FeatureMap, */ \ + /* 14 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 268 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 18 - LastConnectErrorValue, */ \ + /* 272 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 284 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 22 - FeatureMap, */ \ + /* 288 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (5) +#define GENERATED_DEFAULTS_COUNT (7) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -135,23 +173,22 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(14) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(14) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(18) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(22) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(284) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(288) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ @@ -209,10 +246,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(8), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(8), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(14), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(14), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x0000003E, ZAP_ATTRIBUTE_INDEX(24), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -230,7 +267,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 8, 116 }, \ + { ZAP_CLUSTER_INDEX(0), 8, 382 }, \ } // Largest attribute size is needed for various buffers @@ -240,7 +277,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (116) +#define ATTRIBUTE_MAX_SIZE (382) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 08d1e55172edb3..22d6f2b10b8902 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -48,15 +48,34 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ } @@ -85,21 +104,40 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (8) +#define GENERATED_DEFAULTS_COUNT (10) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -193,23 +231,22 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ @@ -279,10 +316,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(33), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(33), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(39), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(39), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x0000003E, ZAP_ATTRIBUTE_INDEX(49), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -300,7 +337,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 10, 808 }, \ + { ZAP_CLUSTER_INDEX(0), 10, 1074 }, \ } // Largest attribute size is needed for various buffers @@ -310,7 +347,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (808) +#define ATTRIBUTE_MAX_SIZE (1074) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index eafe3b161d0aa5..4a8162109c8fe0 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -43,23 +43,63 @@ /* 24 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* 32 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 32 - LastConnectErrorValue, */ \ + /* 286 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 298 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 36 - FeatureMap, */ \ + /* 302 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ + /* Endpoint: 0, Cluster: Operational Credentials (server), big-endian */ \ + \ + /* 306 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), big-endian */ \ \ - /* 40 - Location, */ \ + /* 626 - Location, */ \ 2, 'X', 'X', \ \ - /* 43 - SoftwareVersion, */ \ + /* 629 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 47 - ManufacturingDate, */ \ + /* 633 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ } @@ -83,29 +123,69 @@ /* 24 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* 32 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 32 - LastConnectErrorValue, */ \ + /* 286 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 298 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 36 - FeatureMap, */ \ + /* 302 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Operational Credentials (server), little-endian */ \ + \ + /* 306 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), little-endian */ \ \ - /* 40 - Location, */ \ + /* 626 - Location, */ \ 2, 'X', 'X', \ \ - /* 43 - SoftwareVersion, */ \ + /* 629 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 47 - ManufacturingDate, */ \ + /* 633 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (9) +#define GENERATED_DEFAULTS_COUNT (12) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -183,29 +263,28 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(24) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(36) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -257,15 +336,16 @@ { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(40) }, /* Location */ \ + ZAP_LONG_DEFAULTS_INDEX(626) }, /* Location */ \ { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(43) }, /* SoftwareVersion */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(629) }, /* SoftwareVersion */ \ { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(47) }, /* ManufacturingDate */ \ + ZAP_LONG_DEFAULTS_INDEX(633) }, /* ManufacturingDate */ \ { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ @@ -329,16 +409,16 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x0000003E, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(39), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(39), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ 0x00000402, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ @@ -395,7 +475,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 8, 761 }, { ZAP_CLUSTER_INDEX(8), 7, 720 }, \ + { ZAP_CLUSTER_INDEX(0), 8, 1347 }, { ZAP_CLUSTER_INDEX(8), 7, 720 }, \ } // Largest attribute size is needed for various buffers @@ -405,7 +485,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1374) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1481) +#define ATTRIBUTE_MAX_SIZE (2067) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index eafe3b161d0aa5..4a8162109c8fe0 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -43,23 +43,63 @@ /* 24 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* 32 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 32 - LastConnectErrorValue, */ \ + /* 286 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 298 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 36 - FeatureMap, */ \ + /* 302 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ + /* Endpoint: 0, Cluster: Operational Credentials (server), big-endian */ \ + \ + /* 306 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), big-endian */ \ \ - /* 40 - Location, */ \ + /* 626 - Location, */ \ 2, 'X', 'X', \ \ - /* 43 - SoftwareVersion, */ \ + /* 629 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 47 - ManufacturingDate, */ \ + /* 633 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ } @@ -83,29 +123,69 @@ /* 24 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* 32 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 32 - LastConnectErrorValue, */ \ + /* 286 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 298 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 36 - FeatureMap, */ \ + /* 302 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Operational Credentials (server), little-endian */ \ + \ + /* 306 - fabrics list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), little-endian */ \ \ - /* 40 - Location, */ \ + /* 626 - Location, */ \ 2, 'X', 'X', \ \ - /* 43 - SoftwareVersion, */ \ + /* 629 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 47 - ManufacturingDate, */ \ + /* 633 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (9) +#define GENERATED_DEFAULTS_COUNT (12) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -183,29 +263,28 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(24) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* BasicCommissioningInfoList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(36) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(298) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(302) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 320, 0, ZAP_LONG_DEFAULTS_INDEX(306) }, /* fabrics list */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ { 0x00000005, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -257,15 +336,16 @@ { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(40) }, /* Location */ \ + ZAP_LONG_DEFAULTS_INDEX(626) }, /* Location */ \ { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(43) }, /* SoftwareVersion */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ + ZAP_LONG_DEFAULTS_INDEX(629) }, /* SoftwareVersion */ \ { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(47) }, /* ManufacturingDate */ \ + ZAP_LONG_DEFAULTS_INDEX(633) }, /* ManufacturingDate */ \ { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ @@ -329,16 +409,16 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(25), 3, 264, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(28), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x0000003E, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(39), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(39), 6, 324, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ 0x00000402, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ @@ -395,7 +475,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 8, 761 }, { ZAP_CLUSTER_INDEX(8), 7, 720 }, \ + { ZAP_CLUSTER_INDEX(0), 8, 1347 }, { ZAP_CLUSTER_INDEX(8), 7, 720 }, \ } // Largest attribute size is needed for various buffers @@ -405,7 +485,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1374) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1481) +#define ATTRIBUTE_MAX_SIZE (2067) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index be98725a95a8e9..d98c82e5a1a5af 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -48,182 +48,201 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 279 - LifetimeRunningHours, */ \ + /* 545 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 282 - Power, */ \ + /* 548 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 285 - LifetimeEnergyConsumed, */ \ + /* 551 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 289 - FeatureMap, */ \ + /* 555 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -252,188 +271,207 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 279 - LifetimeRunningHours, */ \ + /* 545 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 282 - Power, */ \ + /* 548 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 285 - LifetimeEnergyConsumed, */ \ + /* 551 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 289 - FeatureMap, */ \ + /* 555 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (61) +#define GENERATED_DEFAULTS_COUNT (63) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -528,31 +566,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -562,23 +599,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -591,50 +628,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -699,16 +736,16 @@ { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(279) }, /* LifetimeRunningHours */ \ - { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(282) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(545) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(548) }, /* Power */ \ { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(285) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(551) }, /* LifetimeEnergyConsumed */ \ { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OperationMode */ \ { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* ControlMode */ \ { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(289) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(555) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ @@ -792,10 +829,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -869,7 +906,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 14, 1097 }, { ZAP_CLUSTER_INDEX(14), 10, 90 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 1363 }, { ZAP_CLUSTER_INDEX(14), 10, 90 }, \ } // Largest attribute size is needed for various buffers @@ -879,7 +916,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1187) +#define ATTRIBUTE_MAX_SIZE (1453) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index b1b9124bb050f9..bf3cd37abeb286 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -48,220 +48,239 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ } @@ -290,226 +309,245 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (73) +#define GENERATED_DEFAULTS_COUNT (75) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -603,31 +641,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -637,23 +674,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -666,50 +703,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -718,28 +755,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(613) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -838,10 +875,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(33), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(33), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(39), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(39), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(49), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -898,7 +935,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 17, 1214 }, { ZAP_CLUSTER_INDEX(17), 6, 10 }, \ + { ZAP_CLUSTER_INDEX(0), 17, 1480 }, { ZAP_CLUSTER_INDEX(17), 6, 10 }, \ } // Largest attribute size is needed for various buffers @@ -908,7 +945,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1224) +#define ATTRIBUTE_MAX_SIZE (1490) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index f01b4541ac7063..23e5344fd2769d 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -48,83 +48,102 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapHighWatermark, */ \ + /* 328 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - FeatureMap, */ \ + /* 336 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 74 - BeaconLostCount, */ \ + /* 340 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - BeaconRxCount, */ \ + /* 344 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - PacketMulticastRxCount, */ \ + /* 348 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - PacketMulticastTxCount, */ \ + /* 352 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - PacketUnicastRxCount, */ \ + /* 356 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 94 - PacketUnicastTxCount, */ \ + /* 360 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - CurrentMaxRate, */ \ + /* 364 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 106 - OverrunCount, */ \ + /* 372 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 114 - FeatureMap, */ \ + /* 380 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 118 - PacketRxCount, */ \ + /* 384 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 126 - PacketTxCount, */ \ + /* 392 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 134 - TxErrCount, */ \ + /* 400 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 142 - CollisionCount, */ \ + /* 408 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 150 - OverrunCount, */ \ + /* 416 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 158 - TimeSinceReset, */ \ + /* 424 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 166 - FeatureMap, */ \ + /* 432 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ } @@ -153,89 +172,108 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapHighWatermark, */ \ + /* 328 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - FeatureMap, */ \ + /* 336 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 74 - BeaconLostCount, */ \ + /* 340 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - BeaconRxCount, */ \ + /* 344 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - PacketMulticastRxCount, */ \ + /* 348 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - PacketMulticastTxCount, */ \ + /* 352 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - PacketUnicastRxCount, */ \ + /* 356 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 94 - PacketUnicastTxCount, */ \ + /* 360 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - CurrentMaxRate, */ \ + /* 364 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 106 - OverrunCount, */ \ + /* 372 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 114 - FeatureMap, */ \ + /* 380 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 118 - PacketRxCount, */ \ + /* 384 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 126 - PacketTxCount, */ \ + /* 392 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 134 - TxErrCount, */ \ + /* 400 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 142 - CollisionCount, */ \ + /* 408 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 150 - OverrunCount, */ \ + /* 416 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 158 - TimeSinceReset, */ \ + /* 424 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 166 - FeatureMap, */ \ + /* 432 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (28) +#define GENERATED_DEFAULTS_COUNT (30) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -326,31 +364,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -359,9 +396,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, 0, ZAP_EMPTY_DEFAULT() }, /* bssid */ \ @@ -369,28 +406,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(74) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(94) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(98) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(106) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(114) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(380) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(118) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(126) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(134) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(142) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(150) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(384) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(392) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(400) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(408) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(416) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(158) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(166) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(424) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(432) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -477,10 +514,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(32), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(38), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(48), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -522,7 +559,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 949 }, { ZAP_CLUSTER_INDEX(15), 2, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1215 }, { ZAP_CLUSTER_INDEX(15), 2, 8 }, \ } // Largest attribute size is needed for various buffers @@ -532,7 +569,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (957) +#define ATTRIBUTE_MAX_SIZE (1223) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 6ae1681f1536b2..f366ca051d6c13 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -48,236 +48,289 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ + \ + /* 641 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 895 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), big-endian */ \ \ - /* 375 - Location, */ \ + /* 1149 - Location, */ \ 2, 'X', 'X', \ \ - /* 378 - SoftwareVersion, */ \ + /* 1152 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - ManufacturingDate, */ \ + /* 1156 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 399 - FeatureMap, */ \ + /* 1173 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ } @@ -306,242 +359,295 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ + \ + /* 641 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 895 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Basic (server), little-endian */ \ \ - /* 375 - Location, */ \ + /* 1149 - Location, */ \ 2, 'X', 'X', \ \ - /* 378 - SoftwareVersion, */ \ + /* 1152 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - ManufacturingDate, */ \ + /* 1156 - ManufacturingDate, */ \ 16, '2', '0', '2', '1', '0', '6', '1', '4', '1', '2', '3', '4', '5', '6', 'Z', 'Z', \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 399 - FeatureMap, */ \ + /* 1173 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (77) +#define GENERATED_DEFAULTS_COUNT (81) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -658,31 +764,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -692,23 +797,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -721,50 +826,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -773,28 +878,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(613) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -816,9 +921,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupTable */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(895) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ @@ -860,16 +965,16 @@ { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(375) }, /* Location */ \ + ZAP_LONG_DEFAULTS_INDEX(1149) }, /* Location */ \ { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0) }, /* HardwareVersion */ \ { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(378) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(1152) }, /* SoftwareVersion */ \ { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(382) }, /* ManufacturingDate */ \ + ZAP_LONG_DEFAULTS_INDEX(1156) }, /* ManufacturingDate */ \ { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ @@ -903,12 +1008,12 @@ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* control sequence of operation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ - { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(399) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1173) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. @@ -979,10 +1084,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(36), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(36), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(42), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(42), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(52), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1009,7 +1114,7 @@ 0x0000003E, ZAP_ATTRIBUTE_INDEX(162), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(169), 3, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(169), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ 0x00000040, ZAP_ATTRIBUTE_INDEX(172), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1057,7 +1162,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 20, 1222 }, { ZAP_CLUSTER_INDEX(20), 6, 739 }, \ + { ZAP_CLUSTER_INDEX(0), 20, 1996 }, { ZAP_CLUSTER_INDEX(20), 6, 739 }, \ } // Largest attribute size is needed for various buffers @@ -1067,7 +1172,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1374) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1961) +#define ATTRIBUTE_MAX_SIZE (2735) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 01321a14f3f268..cbd5bd48daae8e 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -48,263 +48,466 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (client), big-endian */ \ \ - /* 42 - FeatureMap, */ \ + /* 296 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 46 - LastConnectErrorValue, */ \ + /* 300 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 312 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 316 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 54 - UpTime, */ \ + /* 320 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 62 - TotalOperationalHours, */ \ + /* 328 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 66 - CurrentHeapFree, */ \ + /* 332 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 74 - CurrentHeapUsed, */ \ + /* 340 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapHighWatermark, */ \ + /* 348 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - FeatureMap, */ \ + /* 356 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 94 - NetworkName, */ \ + /* 360 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 96 - ExtendedPanId, */ \ + /* 362 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 104 - OverrunCount, */ \ + /* 370 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - PartitionId, */ \ + /* 378 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxTotalCount, */ \ + /* 382 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxUnicastCount, */ \ + /* 386 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxBroadcastCount, */ \ + /* 390 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckRequestedCount, */ \ + /* 394 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxAckedCount, */ \ + /* 398 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxNoAckRequestedCount, */ \ + /* 402 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataCount, */ \ + /* 406 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxDataPollCount, */ \ + /* 410 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconCount, */ \ + /* 414 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxBeaconRequestCount, */ \ + /* 418 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxOtherCount, */ \ + /* 422 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxRetryCount, */ \ + /* 426 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxDirectMaxRetryExpiryCount, */ \ + /* 430 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxIndirectMaxRetryExpiryCount, */ \ + /* 434 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrCcaCount, */ \ + /* 438 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrAbortCount, */ \ + /* 442 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrBusyChannelCount, */ \ + /* 446 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxTotalCount, */ \ + /* 450 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxUnicastCount, */ \ + /* 454 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxBroadcastCount, */ \ + /* 458 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataCount, */ \ + /* 462 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxDataPollCount, */ \ + /* 466 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconCount, */ \ + /* 470 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxBeaconRequestCount, */ \ + /* 474 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxOtherCount, */ \ + /* 478 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxAddressFilteredCount, */ \ + /* 482 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDestAddrFilteredCount, */ \ + /* 486 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxDuplicatedCount, */ \ + /* 490 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrNoFrameCount, */ \ + /* 494 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrUnknownNeighborCount, */ \ + /* 498 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrInvalidSrcAddrCount, */ \ + /* 502 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrSecCount, */ \ + /* 506 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrFcsCount, */ \ + /* 510 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrOtherCount, */ \ + /* 514 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - ActiveTimestamp, */ \ + /* 518 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - PendingTimestamp, */ \ + /* 526 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - delay, */ \ + /* 534 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - ChannelMask, */ \ + /* 538 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 279 - FeatureMap, */ \ + /* 545 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 283 - BeaconLostCount, */ \ + /* 549 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - BeaconRxCount, */ \ + /* 553 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastRxCount, */ \ + /* 557 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketMulticastTxCount, */ \ + /* 561 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastRxCount, */ \ + /* 565 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketUnicastTxCount, */ \ + /* 569 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - CurrentMaxRate, */ \ + /* 573 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - OverrunCount, */ \ + /* 581 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - FeatureMap, */ \ + /* 589 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 327 - PacketRxCount, */ \ + /* 593 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - PacketTxCount, */ \ + /* 601 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - TxErrCount, */ \ + /* 609 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - CollisionCount, */ \ + /* 617 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - OverrunCount, */ \ + /* 625 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - TimeSinceReset, */ \ + /* 633 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ + \ + /* 645 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 899 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ + \ + /* 1153 - channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ + \ + /* 1407 - target navigator list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ + \ + /* 1661 - media input list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 379 - supported streaming protocols, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 1915 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2169 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ + \ + /* 2173 - application launcher list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Level Control (server), big-endian */ \ \ - /* 383 - FeatureMap, */ \ + /* 2427 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ + /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ + \ + /* 2431 - audio output list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 387 - start time, */ \ + /* 2685 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 395 - duration, */ \ + /* 2693 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 403 - playback speed, */ \ + /* 2701 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 407 - seek range end, */ \ + /* 2705 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 415 - seek range start, */ \ + /* 2713 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 423 - supported streaming protocols, */ \ + /* 2721 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2975 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 3, Cluster: Application Basic (server), big-endian */ \ + \ + /* 2979 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 427 - supported streaming protocols, */ \ + /* 3011 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3265 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ + \ + /* 3269 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU @@ -332,268 +535,471 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (client), little-endian */ \ \ - /* 42 - FeatureMap, */ \ + /* 296 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 46 - LastConnectErrorValue, */ \ + /* 300 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 312 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 316 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 54 - UpTime, */ \ + /* 320 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 62 - TotalOperationalHours, */ \ + /* 328 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 66 - CurrentHeapFree, */ \ + /* 332 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 74 - CurrentHeapUsed, */ \ + /* 340 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapHighWatermark, */ \ + /* 348 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - FeatureMap, */ \ + /* 356 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 94 - NetworkName, */ \ + /* 360 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 96 - ExtendedPanId, */ \ + /* 362 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 104 - OverrunCount, */ \ + /* 370 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - PartitionId, */ \ + /* 378 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxTotalCount, */ \ + /* 382 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxUnicastCount, */ \ + /* 386 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxBroadcastCount, */ \ + /* 390 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckRequestedCount, */ \ + /* 394 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxAckedCount, */ \ + /* 398 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxNoAckRequestedCount, */ \ + /* 402 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataCount, */ \ + /* 406 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxDataPollCount, */ \ + /* 410 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconCount, */ \ + /* 414 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxBeaconRequestCount, */ \ + /* 418 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxOtherCount, */ \ + /* 422 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxRetryCount, */ \ + /* 426 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxDirectMaxRetryExpiryCount, */ \ + /* 430 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxIndirectMaxRetryExpiryCount, */ \ + /* 434 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrCcaCount, */ \ + /* 438 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrAbortCount, */ \ + /* 442 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrBusyChannelCount, */ \ + /* 446 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxTotalCount, */ \ + /* 450 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxUnicastCount, */ \ + /* 454 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxBroadcastCount, */ \ + /* 458 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataCount, */ \ + /* 462 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxDataPollCount, */ \ + /* 466 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconCount, */ \ + /* 470 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxBeaconRequestCount, */ \ + /* 474 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxOtherCount, */ \ + /* 478 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxAddressFilteredCount, */ \ + /* 482 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDestAddrFilteredCount, */ \ + /* 486 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxDuplicatedCount, */ \ + /* 490 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrNoFrameCount, */ \ + /* 494 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrUnknownNeighborCount, */ \ + /* 498 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrInvalidSrcAddrCount, */ \ + /* 502 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrSecCount, */ \ + /* 506 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrFcsCount, */ \ + /* 510 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrOtherCount, */ \ + /* 514 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - ActiveTimestamp, */ \ + /* 518 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - PendingTimestamp, */ \ + /* 526 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - delay, */ \ + /* 534 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 272 - ChannelMask, */ \ + /* 538 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 279 - FeatureMap, */ \ + /* 545 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 283 - BeaconLostCount, */ \ + /* 549 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - BeaconRxCount, */ \ + /* 553 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastRxCount, */ \ + /* 557 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketMulticastTxCount, */ \ + /* 561 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastRxCount, */ \ + /* 565 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketUnicastTxCount, */ \ + /* 569 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - CurrentMaxRate, */ \ + /* 573 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - OverrunCount, */ \ + /* 581 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - FeatureMap, */ \ + /* 589 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 327 - PacketRxCount, */ \ + /* 593 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 335 - PacketTxCount, */ \ + /* 601 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - TxErrCount, */ \ + /* 609 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - CollisionCount, */ \ + /* 617 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - OverrunCount, */ \ + /* 625 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - TimeSinceReset, */ \ + /* 633 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - FeatureMap, */ \ + /* 641 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ + \ + /* 645 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 899 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ + \ + /* 1153 - channel list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ + \ + /* 1407 - target navigator list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ + \ + /* 1661 - media input list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 379 - supported streaming protocols, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 1915 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2169 - supported streaming protocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ + \ + /* 2173 - application launcher list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Level Control (server), little-endian */ \ \ - /* 383 - FeatureMap, */ \ + /* 2427 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ + \ + /* 2431 - audio output list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 387 - start time, */ \ + /* 2685 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 395 - duration, */ \ + /* 2693 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 403 - playback speed, */ \ + /* 2701 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 407 - seek range end, */ \ + /* 2705 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 415 - seek range start, */ \ + /* 2713 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 423 - supported streaming protocols, */ \ + /* 2721 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 2975 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 3, Cluster: Application Basic (server), little-endian */ \ + \ + /* 2979 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 427 - supported streaming protocols, */ \ + /* 3011 - accept header list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 3265 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ + \ + /* 3269 - allowed vendor list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (83) +#define GENERATED_DEFAULTS_COUNT (97) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -696,35 +1102,34 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(42) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(296) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(300) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(320) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -734,23 +1139,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(66) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(74) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(340) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(94) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(360) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(96) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(362) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(370) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -763,50 +1168,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(252) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(518) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(526) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(272) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(538) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -815,28 +1220,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(593) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(625) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(367) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(633) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -861,9 +1266,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupTable */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(645) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(899) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ @@ -896,7 +1301,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* channel list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1153) }, /* channel list */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* channel lineup */ \ { 0x00000002, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -904,15 +1309,14 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* target navigator list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1407) }, /* target navigator list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* current navigator target */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* media input list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1661) }, /* media input list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Low Power (server) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -921,15 +1325,13 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1915) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(379) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2169) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* application launcher list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2173) }, /* application launcher list */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* application launcher app */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -960,9 +1362,9 @@ ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ { 0x00004000, ZAP_TYPE(INT8U), 1, \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(383) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2427) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -972,9 +1374,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* audio output list */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2431) }, /* audio output list */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Descriptor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -984,21 +1386,20 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(387) }, /* start time */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(395) }, /* duration */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ + { 0x00000001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2685) }, /* start time */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2693) }, /* duration */ \ { 0x00000003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(403) }, /* playback speed */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(407) }, /* seek range end */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(415) }, /* seek range start */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* position */ \ + { 0x00000004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2701) }, /* playback speed */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2705) }, /* seek range end */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2713) }, /* seek range start */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2721) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(423) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2975) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1007,12 +1408,11 @@ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* product id */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* application app */ \ - { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* allowed vendor list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* application app */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2979) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -1025,10 +1425,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* accept header list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3011) }, /* accept header list */ \ { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(427) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(3265) }, /* supported streaming protocols */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1037,12 +1436,11 @@ { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application name */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* application app */ \ - { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ - { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* allowed vendor list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* application app */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3269) }, /* allowed vendor list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1124,13 +1522,13 @@ 0x00000030, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (client) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(36), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(36), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ 0x00000031, ZAP_ATTRIBUTE_INDEX(42), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (client) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(44), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(44), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(54), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1160,7 +1558,7 @@ 0x0000003E, ZAP_ATTRIBUTE_INDEX(165), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(172), 3, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(172), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ 0x00000040, ZAP_ATTRIBUTE_INDEX(175), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1184,13 +1582,13 @@ 0x00000503, ZAP_ATTRIBUTE_INDEX(190), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(192), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(192), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(196), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(196), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(199), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(199), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ 0x00000508, ZAP_ATTRIBUTE_INDEX(202), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1199,10 +1597,10 @@ 0x00000509, ZAP_ATTRIBUTE_INDEX(203), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(204), 3, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(204), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(207), 3, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(207), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(210), \ @@ -1220,7 +1618,7 @@ 0x0000001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(233), 3, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(233), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ 0x0000001D, ZAP_ATTRIBUTE_INDEX(236), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1229,10 +1627,10 @@ 0x00000506, ZAP_ATTRIBUTE_INDEX(241), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(249), 3, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(249), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(252), 9, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(252), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ 0x0000050E, ZAP_ATTRIBUTE_INDEX(261), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1241,10 +1639,10 @@ 0x0000001D, ZAP_ATTRIBUTE_INDEX(262), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(267), 3, 6, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(267), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(270), 9, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(270), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ 0x0000001D, ZAP_ATTRIBUTE_INDEX(279), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1259,8 +1657,8 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 24, 1238 }, { ZAP_CLUSTER_INDEX(24), 10, 58 }, { ZAP_CLUSTER_INDEX(34), 4, 33 }, \ - { ZAP_CLUSTER_INDEX(38), 5, 153 }, { ZAP_CLUSTER_INDEX(43), 3, 112 }, { ZAP_CLUSTER_INDEX(46), 2, 106 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 2012 }, { ZAP_CLUSTER_INDEX(24), 10, 1328 }, { ZAP_CLUSTER_INDEX(34), 4, 287 }, \ + { ZAP_CLUSTER_INDEX(38), 5, 439 }, { ZAP_CLUSTER_INDEX(43), 3, 398 }, { ZAP_CLUSTER_INDEX(46), 2, 106 }, \ } // Largest attribute size is needed for various buffers @@ -1270,7 +1668,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1700) +#define ATTRIBUTE_MAX_SIZE (4570) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 63402437655452..9e157cd32429f5 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -48,275 +48,381 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ + \ + /* 641 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 895 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: On/Off (server), big-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 1149 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), big-endian */ \ \ - /* 379 - SoftwareVersion, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 1153 - SoftwareVersion, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ + \ + /* 1157 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 383 - DoorOpenEvents, */ \ + /* 1411 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 387 - DoorClosedEvents, */ \ + /* 1415 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 391 - Language, */ \ + /* 1419 - Language, */ \ 2, 'e', 'n', \ \ - /* 394 - AutoRelockTime, */ \ + /* 1422 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x10, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 398 - FeatureMap, */ \ + /* 1426 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 402 - IAS CIE address, */ \ + /* 1430 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 410 - bitmap32, */ \ + /* 1438 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - bitmap64, */ \ + /* 1442 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - int32u, */ \ + /* 1450 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - int64u, */ \ + /* 1454 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - int32s, */ \ + /* 1462 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - int64s, */ \ + /* 1466 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1474 - list_int8u, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1484 - list_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1738 - list_struct_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU @@ -344,280 +450,386 @@ /* 30 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 292 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 42 - LastConnectErrorValue, */ \ + /* 296 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 308 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 46 - FeatureMap, */ \ + /* 312 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 50 - UpTime, */ \ + /* 316 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - TotalOperationalHours, */ \ + /* 324 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 62 - CurrentHeapFree, */ \ + /* 328 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - CurrentHeapUsed, */ \ + /* 336 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 78 - CurrentHeapHighWatermark, */ \ + /* 344 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - FeatureMap, */ \ + /* 352 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 90 - NetworkName, */ \ + /* 356 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 92 - ExtendedPanId, */ \ + /* 358 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 100 - OverrunCount, */ \ + /* 366 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 108 - PartitionId, */ \ + /* 374 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - TxTotalCount, */ \ + /* 378 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 116 - TxUnicastCount, */ \ + /* 382 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - TxBroadcastCount, */ \ + /* 386 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxAckRequestedCount, */ \ + /* 390 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxAckedCount, */ \ + /* 394 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxNoAckRequestedCount, */ \ + /* 398 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxDataCount, */ \ + /* 402 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxDataPollCount, */ \ + /* 406 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxBeaconCount, */ \ + /* 410 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxBeaconRequestCount, */ \ + /* 414 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxOtherCount, */ \ + /* 418 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxRetryCount, */ \ + /* 422 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxDirectMaxRetryExpiryCount, */ \ + /* 426 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxIndirectMaxRetryExpiryCount, */ \ + /* 430 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxErrCcaCount, */ \ + /* 434 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxErrAbortCount, */ \ + /* 438 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxErrBusyChannelCount, */ \ + /* 442 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - RxTotalCount, */ \ + /* 446 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - RxUnicastCount, */ \ + /* 450 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - RxBroadcastCount, */ \ + /* 454 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxDataCount, */ \ + /* 458 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxDataPollCount, */ \ + /* 462 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBeaconCount, */ \ + /* 466 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxBeaconRequestCount, */ \ + /* 470 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxOtherCount, */ \ + /* 474 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxAddressFilteredCount, */ \ + /* 478 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxDestAddrFilteredCount, */ \ + /* 482 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxDuplicatedCount, */ \ + /* 486 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxErrNoFrameCount, */ \ + /* 490 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxErrUnknownNeighborCount, */ \ + /* 494 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxErrInvalidSrcAddrCount, */ \ + /* 498 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrSecCount, */ \ + /* 502 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrFcsCount, */ \ + /* 506 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrOtherCount, */ \ + /* 510 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - ActiveTimestamp, */ \ + /* 514 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - PendingTimestamp, */ \ + /* 522 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 264 - delay, */ \ + /* 530 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - ChannelMask, */ \ + /* 534 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 275 - FeatureMap, */ \ + /* 541 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 279 - BeaconLostCount, */ \ + /* 545 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 283 - BeaconRxCount, */ \ + /* 549 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - PacketMulticastRxCount, */ \ + /* 553 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 291 - PacketMulticastTxCount, */ \ + /* 557 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - PacketUnicastRxCount, */ \ + /* 561 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketUnicastTxCount, */ \ + /* 565 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - CurrentMaxRate, */ \ + /* 569 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - OverrunCount, */ \ + /* 577 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 319 - FeatureMap, */ \ + /* 585 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 323 - PacketRxCount, */ \ + /* 589 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - PacketTxCount, */ \ + /* 597 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 339 - TxErrCount, */ \ + /* 605 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 347 - CollisionCount, */ \ + /* 613 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 355 - OverrunCount, */ \ + /* 621 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 363 - TimeSinceReset, */ \ + /* 629 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 371 - FeatureMap, */ \ + /* 637 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ + \ + /* 641 - groupKeyMap, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 895 - groupTable, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: On/Off (server), little-endian */ \ \ - /* 375 - FeatureMap, */ \ + /* 1149 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server), little-endian */ \ \ - /* 379 - SoftwareVersion, */ \ - 0x00, 0x00, 0x00, 0x00, \ + /* 1153 - SoftwareVersion, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ + \ + /* 1157 - label list, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 383 - DoorOpenEvents, */ \ + /* 1411 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 387 - DoorClosedEvents, */ \ + /* 1415 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 391 - Language, */ \ + /* 1419 - Language, */ \ 2, 'e', 'n', \ \ - /* 394 - AutoRelockTime, */ \ + /* 1422 - AutoRelockTime, */ \ 0x10, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 398 - FeatureMap, */ \ + /* 1426 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 402 - IAS CIE address, */ \ + /* 1430 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 410 - bitmap32, */ \ + /* 1438 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 414 - bitmap64, */ \ + /* 1442 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 422 - int32u, */ \ + /* 1450 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 426 - int64u, */ \ + /* 1454 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 434 - int32s, */ \ + /* 1462 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - int64s, */ \ + /* 1466 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1474 - list_int8u, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1484 - list_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1738 - list_struct_octet_string, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (87) +#define GENERATED_DEFAULTS_COUNT (95) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -747,31 +959,30 @@ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(30) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(296) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(42) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(308) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -781,23 +992,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(78) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(86) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(352) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(92) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(100) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(108) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -810,50 +1021,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(116) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(264) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(541) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -862,28 +1073,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(545) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(549) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(553) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(557) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(339) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(347) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(355) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(613) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(621) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(363) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(371) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(629) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(637) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -905,9 +1116,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* groupTable */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* groupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(895) }, /* groupTable */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ @@ -947,7 +1158,7 @@ { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1149) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ @@ -1002,7 +1213,7 @@ { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(379) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(1153) }, /* SoftwareVersion */ \ { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ @@ -1019,17 +1230,17 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1157) }, /* label list */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ - { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ - { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(383) }, /* DoorOpenEvents */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(2) }, /* LockState */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ + { 0x00000002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ + { 0x00000004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1411) }, /* DoorOpenEvents */ \ { 0x00000005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(387) }, /* DoorClosedEvents */ \ + ZAP_LONG_DEFAULTS_INDEX(1415) }, /* DoorClosedEvents */ \ { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x00000011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x00000012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1039,8 +1250,8 @@ { 0x00000017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x00000018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(391) }, /* Language */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(394) }, /* AutoRelockTime */ \ + { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1419) }, /* Language */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1422) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* SoundVolume */ \ { 0x00000025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1106,12 +1317,12 @@ { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* control sequence of operation */ \ { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* system mode */ \ - { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ - { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ - { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1426) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ @@ -1205,7 +1416,7 @@ { 0x00000001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x00000002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x00000010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(402) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(1430) }, /* IAS CIE address */ \ { 0x00000011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -1244,28 +1455,27 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ - { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ - { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ - { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(410) }, /* bitmap32 */ \ - { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(414) }, /* bitmap64 */ \ - { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ - { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(422) }, /* int32u */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(426) }, /* int64u */ \ - { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ - { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(434) }, /* int32s */ \ - { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(438) }, /* int64s */ \ - { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ - { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ - { 0x0000001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ - { 0x0000001B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* list_octet_string */ \ - { 0x0000001C, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* list_struct_octet_string */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ + { 0x00000001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ + { 0x00000002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ + { 0x00000003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1438) }, /* bitmap32 */ \ + { 0x00000004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1442) }, /* bitmap64 */ \ + { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ + { 0x00000006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1450) }, /* int32u */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1454) }, /* int64u */ \ + { 0x0000000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ + { 0x0000000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ + { 0x00000010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1462) }, /* int32s */ \ + { 0x00000014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1466) }, /* int64s */ \ + { 0x00000015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ + { 0x00000016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ + { 0x00000019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ + { 0x0000001A, ZAP_TYPE(ARRAY), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1474) }, /* list_int8u */ \ + { 0x0000001B, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1484) }, /* list_octet_string */ \ + { 0x0000001C, ZAP_TYPE(ARRAY), 254, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1738) }, /* list_struct_octet_string */ \ { 0x0000001D, ZAP_TYPE(LONG_OCTET_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_octet_string */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -1371,10 +1581,10 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(34), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(34), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(40), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(40), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000032, ZAP_ATTRIBUTE_INDEX(50), 0, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1401,7 +1611,7 @@ 0x0000003E, ZAP_ATTRIBUTE_INDEX(160), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(167), 3, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(167), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ 0x00000040, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1458,7 +1668,7 @@ 0x0000003B, ZAP_ATTRIBUTE_INDEX(235), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(238), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(238), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x00000101, \ ZAP_ATTRIBUTE_INDEX(240), \ @@ -1538,7 +1748,7 @@ 0x0000050E, ZAP_ATTRIBUTE_INDEX(386), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(387), 21, 1064, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(387), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x00000006, \ ZAP_ATTRIBUTE_INDEX(408), \ @@ -1562,7 +1772,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 20, 1226 }, { ZAP_CLUSTER_INDEX(20), 33, 2318 }, { ZAP_CLUSTER_INDEX(53), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 20, 2000 }, { ZAP_CLUSTER_INDEX(20), 33, 3090 }, { ZAP_CLUSTER_INDEX(53), 3, 8 }, \ } // Largest attribute size is needed for various buffers @@ -1572,7 +1782,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (1333) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3552) +#define ATTRIBUTE_MAX_SIZE (5098) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 0e6a160535e589..89d77401d86389 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -51,238 +51,260 @@ /* 34 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - ActiveBatteryFaults, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 46 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 42 - Breadcrumb, */ \ + /* 50 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 58 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 312 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x06, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 316 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 328 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 332 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 62 - UpTime, */ \ + /* 336 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 344 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 348 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 356 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 364 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 372 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 376 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 378 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 386 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 394 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 398 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 402 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 406 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 410 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 414 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 418 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 422 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 426 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 430 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 434 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 438 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 442 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 446 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 450 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 454 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 458 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 462 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 466 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 470 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 474 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 478 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 482 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 486 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 490 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 494 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 498 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 502 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 506 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 510 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 514 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 518 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 522 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 526 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 530 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 534 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 542 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 550 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 554 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 561 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 565 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 569 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 573 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 577 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 581 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 585 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 589 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 597 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 605 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 609 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 617 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 625 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 633 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 641 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 649 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 657 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 387 - FeatureMap, */ \ + /* 661 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 2, Cluster: Window Covering (server), big-endian */ \ \ - /* 391 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ } @@ -314,244 +336,266 @@ /* 34 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 38 - FeatureMap, */ \ + /* 38 - ActiveBatteryFaults, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 46 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 42 - Breadcrumb, */ \ + /* 50 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 50 - FeatureMap, */ \ + /* 58 - BasicCommissioningInfoList, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 312 - FeatureMap, */ \ 0x06, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 54 - LastConnectErrorValue, */ \ + /* 316 - Networks, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 328 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 58 - FeatureMap, */ \ + /* 332 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ \ - /* 62 - UpTime, */ \ + /* 336 - UpTime, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - TotalOperationalHours, */ \ + /* 344 - TotalOperationalHours, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ \ - /* 74 - CurrentHeapFree, */ \ + /* 348 - CurrentHeapFree, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 82 - CurrentHeapUsed, */ \ + /* 356 - CurrentHeapUsed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 90 - CurrentHeapHighWatermark, */ \ + /* 364 - CurrentHeapHighWatermark, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 98 - FeatureMap, */ \ + /* 372 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 102 - NetworkName, */ \ + /* 376 - NetworkName, */ \ 0x00, 0x00, \ \ - /* 104 - ExtendedPanId, */ \ + /* 378 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 112 - OverrunCount, */ \ + /* 386 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 120 - PartitionId, */ \ + /* 394 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 124 - TxTotalCount, */ \ + /* 398 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 128 - TxUnicastCount, */ \ + /* 402 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 132 - TxBroadcastCount, */ \ + /* 406 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 136 - TxAckRequestedCount, */ \ + /* 410 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 140 - TxAckedCount, */ \ + /* 414 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 144 - TxNoAckRequestedCount, */ \ + /* 418 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 148 - TxDataCount, */ \ + /* 422 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 152 - TxDataPollCount, */ \ + /* 426 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 156 - TxBeaconCount, */ \ + /* 430 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 160 - TxBeaconRequestCount, */ \ + /* 434 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 164 - TxOtherCount, */ \ + /* 438 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 168 - TxRetryCount, */ \ + /* 442 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 172 - TxDirectMaxRetryExpiryCount, */ \ + /* 446 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 176 - TxIndirectMaxRetryExpiryCount, */ \ + /* 450 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 180 - TxErrCcaCount, */ \ + /* 454 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 184 - TxErrAbortCount, */ \ + /* 458 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 188 - TxErrBusyChannelCount, */ \ + /* 462 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 192 - RxTotalCount, */ \ + /* 466 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 196 - RxUnicastCount, */ \ + /* 470 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 200 - RxBroadcastCount, */ \ + /* 474 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 204 - RxDataCount, */ \ + /* 478 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 208 - RxDataPollCount, */ \ + /* 482 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 212 - RxBeaconCount, */ \ + /* 486 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 216 - RxBeaconRequestCount, */ \ + /* 490 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 220 - RxOtherCount, */ \ + /* 494 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 224 - RxAddressFilteredCount, */ \ + /* 498 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 228 - RxDestAddrFilteredCount, */ \ + /* 502 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 232 - RxDuplicatedCount, */ \ + /* 506 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 236 - RxErrNoFrameCount, */ \ + /* 510 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 240 - RxErrUnknownNeighborCount, */ \ + /* 514 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 244 - RxErrInvalidSrcAddrCount, */ \ + /* 518 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 248 - RxErrSecCount, */ \ + /* 522 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 252 - RxErrFcsCount, */ \ + /* 526 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 256 - RxErrOtherCount, */ \ + /* 530 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ActiveTimestamp, */ \ + /* 534 - ActiveTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - PendingTimestamp, */ \ + /* 542 - PendingTimestamp, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 276 - delay, */ \ + /* 550 - delay, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 280 - ChannelMask, */ \ + /* 554 - ChannelMask, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 287 - FeatureMap, */ \ + /* 561 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 291 - BeaconLostCount, */ \ + /* 565 - BeaconLostCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 295 - BeaconRxCount, */ \ + /* 569 - BeaconRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 299 - PacketMulticastRxCount, */ \ + /* 573 - PacketMulticastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 303 - PacketMulticastTxCount, */ \ + /* 577 - PacketMulticastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 307 - PacketUnicastRxCount, */ \ + /* 581 - PacketUnicastRxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 311 - PacketUnicastTxCount, */ \ + /* 585 - PacketUnicastTxCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 315 - CurrentMaxRate, */ \ + /* 589 - CurrentMaxRate, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 323 - OverrunCount, */ \ + /* 597 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 331 - FeatureMap, */ \ + /* 605 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ \ - /* 335 - PacketRxCount, */ \ + /* 609 - PacketRxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 343 - PacketTxCount, */ \ + /* 617 - PacketTxCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 351 - TxErrCount, */ \ + /* 625 - TxErrCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 359 - CollisionCount, */ \ + /* 633 - CollisionCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 367 - OverrunCount, */ \ + /* 641 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 375 - TimeSinceReset, */ \ + /* 649 - TimeSinceReset, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 383 - FeatureMap, */ \ + /* 657 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 387 - FeatureMap, */ \ + /* 661 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Window Covering (server), little-endian */ \ \ - /* 391 - FeatureMap, */ \ + /* 665 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (78) +#define GENERATED_DEFAULTS_COUNT (81) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -647,46 +691,44 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Power Source (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(30) }, /* BatteryVoltage */ \ - { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(34) }, /* BatteryTimeRemaining */ \ - { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x00000012, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveBatteryFaults */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ + { 0x0000000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(30) }, /* BatteryVoltage */ \ + { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ + { 0x0000000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(34) }, /* BatteryTimeRemaining */ \ + { 0x0000000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ + { 0x00000012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* ActiveBatteryFaults */ \ { 0x0000001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(46) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(42) }, /* Breadcrumb */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfoList */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(50) }, /* Breadcrumb */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* BasicCommissioningInfoList */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(312) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(316) }, /* Networks */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(58) }, /* FeatureMap */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(328) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(332) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(62) }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(336) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(344) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ @@ -696,23 +738,23 @@ \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(74) }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(82) }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(90) }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(98) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(348) }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(364) }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(372) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(102) }, /* NetworkName */ \ + { 0x00000002, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(376) }, /* NetworkName */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(104) }, /* ExtendedPanId */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(378) }, /* ExtendedPanId */ \ { 0x00000005, ZAP_TYPE(OCTET_STRING), 18, 0, ZAP_EMPTY_DEFAULT() }, /* MeshLocalPrefix */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(112) }, /* OverrunCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(386) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NeighborTableList */ \ { 0x00000008, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RouteTableList */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(120) }, /* PartitionId */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(394) }, /* PartitionId */ \ { 0x0000000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x0000000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x0000000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -725,50 +767,50 @@ { 0x00000013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x00000015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(124) }, /* TxTotalCount */ \ - { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(128) }, /* TxUnicastCount */ \ - { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(132) }, /* TxBroadcastCount */ \ - { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(136) }, /* TxAckRequestedCount */ \ - { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(140) }, /* TxAckedCount */ \ - { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(144) }, /* TxNoAckRequestedCount */ \ - { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(148) }, /* TxDataCount */ \ - { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(152) }, /* TxDataPollCount */ \ - { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(156) }, /* TxBeaconCount */ \ - { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(160) }, /* TxBeaconRequestCount */ \ - { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(164) }, /* TxOtherCount */ \ - { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(168) }, /* TxRetryCount */ \ - { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(172) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(176) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(180) }, /* TxErrCcaCount */ \ - { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(184) }, /* TxErrAbortCount */ \ - { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(188) }, /* TxErrBusyChannelCount */ \ - { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(192) }, /* RxTotalCount */ \ - { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(196) }, /* RxUnicastCount */ \ - { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(200) }, /* RxBroadcastCount */ \ - { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(204) }, /* RxDataCount */ \ - { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(208) }, /* RxDataPollCount */ \ - { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(212) }, /* RxBeaconCount */ \ - { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(216) }, /* RxBeaconRequestCount */ \ - { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(220) }, /* RxOtherCount */ \ - { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(224) }, /* RxAddressFilteredCount */ \ - { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(228) }, /* RxDestAddrFilteredCount */ \ - { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(232) }, /* RxDuplicatedCount */ \ - { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(236) }, /* RxErrNoFrameCount */ \ - { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(240) }, /* RxErrUnknownNeighborCount */ \ - { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(248) }, /* RxErrSecCount */ \ - { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(252) }, /* RxErrFcsCount */ \ - { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(256) }, /* RxErrOtherCount */ \ - { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ActiveTimestamp */ \ - { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* PendingTimestamp */ \ - { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(276) }, /* delay */ \ + { 0x00000016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* TxTotalCount */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(402) }, /* TxUnicastCount */ \ + { 0x00000018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* TxBroadcastCount */ \ + { 0x00000019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(410) }, /* TxAckRequestedCount */ \ + { 0x0000001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(414) }, /* TxAckedCount */ \ + { 0x0000001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(418) }, /* TxNoAckRequestedCount */ \ + { 0x0000001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(422) }, /* TxDataCount */ \ + { 0x0000001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(426) }, /* TxDataPollCount */ \ + { 0x0000001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(430) }, /* TxBeaconCount */ \ + { 0x0000001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(434) }, /* TxBeaconRequestCount */ \ + { 0x00000020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* TxOtherCount */ \ + { 0x00000021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(442) }, /* TxRetryCount */ \ + { 0x00000022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(446) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x00000023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(450) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x00000024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(454) }, /* TxErrCcaCount */ \ + { 0x00000025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(458) }, /* TxErrAbortCount */ \ + { 0x00000026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(462) }, /* TxErrBusyChannelCount */ \ + { 0x00000027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(466) }, /* RxTotalCount */ \ + { 0x00000028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* RxUnicastCount */ \ + { 0x00000029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(474) }, /* RxBroadcastCount */ \ + { 0x0000002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(478) }, /* RxDataCount */ \ + { 0x0000002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(482) }, /* RxDataPollCount */ \ + { 0x0000002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(486) }, /* RxBeaconCount */ \ + { 0x0000002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(490) }, /* RxBeaconRequestCount */ \ + { 0x0000002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(494) }, /* RxOtherCount */ \ + { 0x0000002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(498) }, /* RxAddressFilteredCount */ \ + { 0x00000030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* RxDestAddrFilteredCount */ \ + { 0x00000031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(506) }, /* RxDuplicatedCount */ \ + { 0x00000032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(510) }, /* RxErrNoFrameCount */ \ + { 0x00000033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* RxErrUnknownNeighborCount */ \ + { 0x00000034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(518) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x00000035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* RxErrSecCount */ \ + { 0x00000036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(526) }, /* RxErrFcsCount */ \ + { 0x00000037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(530) }, /* RxErrOtherCount */ \ + { 0x00000038, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* ActiveTimestamp */ \ + { 0x00000039, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(542) }, /* PendingTimestamp */ \ + { 0x0000003A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(550) }, /* delay */ \ { 0x0000003B, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SecurityPolicy */ \ - { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(280) }, /* ChannelMask */ \ + { 0x0000003C, ZAP_TYPE(OCTET_STRING), 5, 0, ZAP_LONG_DEFAULTS_INDEX(554) }, /* ChannelMask */ \ { 0x0000003D, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* OperationalDatasetComponents */ \ { 0x0000003E, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaultsList */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(287) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(561) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ @@ -777,28 +819,28 @@ { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ { 0x00000004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(295) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(307) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(315) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(323) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(331) }, /* FeatureMap */ \ + { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(565) }, /* BeaconLostCount */ \ + { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(569) }, /* BeaconRxCount */ \ + { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(573) }, /* PacketMulticastRxCount */ \ + { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(577) }, /* PacketMulticastTxCount */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(581) }, /* PacketUnicastRxCount */ \ + { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(585) }, /* PacketUnicastTxCount */ \ + { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(589) }, /* CurrentMaxRate */ \ + { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(597) }, /* OverrunCount */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(359) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(367) }, /* OverrunCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(609) }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(617) }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(625) }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(633) }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(641) }, /* OverrunCount */ \ { 0x00000007, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(375) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(383) }, /* FeatureMap */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(649) }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(657) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -869,7 +911,7 @@ { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(387) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(661) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -907,7 +949,7 @@ { 0x00000017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* Mode */ \ { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(391) }, /* FeatureMap */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(665) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } @@ -958,13 +1000,13 @@ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayTimeFormatLocalizationServer }, /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(32), 11, 80, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(32), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Power Source (server) */ \ { \ - 0x00000030, ZAP_ATTRIBUTE_INDEX(43), 6, 16, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000030, ZAP_ATTRIBUTE_INDEX(43), 6, 270, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(49), 10, 48, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(49), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ 0x00000033, ZAP_ATTRIBUTE_INDEX(59), 9, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ @@ -1018,7 +1060,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 16, 1292 }, { ZAP_CLUSTER_INDEX(16), 3, 40 }, { ZAP_CLUSTER_INDEX(19), 2, 35 }, \ + { ZAP_CLUSTER_INDEX(0), 16, 1566 }, { ZAP_CLUSTER_INDEX(16), 3, 40 }, { ZAP_CLUSTER_INDEX(19), 2, 35 }, \ } // Largest attribute size is needed for various buffers @@ -1028,7 +1070,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1367) +#define ATTRIBUTE_MAX_SIZE (1641) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3)