From 24a1be085b521fa7d1fd2367b5bb844f2ec575a9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 22 Oct 2021 21:41:40 -0400 Subject: [PATCH] Move the isArray logic into the decodable/encodable type helper. (#10822) * Move the isArray logic into the decodable/encodable type helper. This way instead of ugly templating to wrap in List/DecodableList it just works automatically. * Move treatment of args as const ref into the helper as well, so we don't convert a bunch of integer args to const refs in ways that the rest of the system does not expect. --- examples/chip-tool/templates/commands.zapt | 5 +- .../templates/partials/test_cluster.zapt | 4 +- .../partials/test_cluster_command_value.zapt | 3 +- .../app/CHIPClientCallbacks-src.zapt | 2 +- .../templates/app/CHIPClientCallbacks.zapt | 2 +- .../templates/app/cluster-objects.zapt | 16 +-- src/app/zap-templates/templates/app/helper.js | 15 ++- .../java/templates/CHIPClusters-JNI.zapt | 2 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 98 +++++++++---------- .../python/chip/clusters/CHIPClusters.cpp | 76 ++++++++------ .../templates/python-CHIPClusters-cpp.zapt | 2 +- .../partials/CHIPCallbackBridge.zapt | 5 +- .../zap-generated/CHIPClientCallbacks.cpp | 57 ++++++----- .../zap-generated/CHIPClientCallbacks.cpp | 8 +- 14 files changed, 165 insertions(+), 130 deletions(-) diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 7ec7776f832678..dbad28584e6855 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -134,7 +134,7 @@ static void OnCharStringAttributeResponse(void * context, const chip::CharSpan v {{#chip_client_clusters}} {{#chip_server_cluster_attributes}} {{#if isList}} -static void On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse(void * context, const chip::app::DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & list) +static void On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list) { ModelCommand * command = static_cast(context); @@ -254,8 +254,7 @@ public: {{#chip_cluster_command_non_expanded_arguments}} {{#if isArray}} {{! TODO Implement complex types parsing in order to properly set the request parameters }} - {{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}} {{asLowerCamelCase label}}; - mRequest.{{asLowerCamelCase label}} = chip::Span<{{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}}>(&{{asLowerCamelCase label}}, 1); + mRequest.{{asLowerCamelCase label}} = {{zapTypeToEncodableClusterObjectType type ns=parent.parent.name}}(); {{/if}} {{/chip_cluster_command_non_expanded_arguments}} diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index f3e36abaadef72..8838a59c23f045 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -53,7 +53,7 @@ class {{filename}}: public TestCommand {{#*inline "successCallback"}}mOnSuccessCallback_{{index}}{{/inline}} {{#*inline "failureResponse"}}OnFailureCallback_{{index}}{{/inline}} {{#*inline "successResponse"}}OnSuccessCallback_{{index}}{{/inline}} - {{#*inline "successArguments"}}void * context{{#chip_tests_item_response_parameters}}, {{#if isList}}const chip::app::DataModel::DecodableList<{{/if}}{{zapTypeToDecodableClusterObjectType type ns=parent.cluster}}{{#if isList}}> &{{/if}} {{asLowerCamelCase name}}{{/chip_tests_item_response_parameters}}{{/inline}} + {{#*inline "successArguments"}}void * context{{#chip_tests_item_response_parameters}}, {{zapTypeToDecodableClusterObjectType type ns=parent.cluster isArgument=true}} {{asLowerCamelCase name}}{{/chip_tests_item_response_parameters}}{{/inline}} {{#*inline "failureArguments"}}void * context, uint8_t status{{/inline}} {{#chip_tests_items}} @@ -102,7 +102,7 @@ class {{filename}}: public TestCommand {{#*inline "failureResponse"}}OnFailureResponse_{{index}}{{/inline}} {{#*inline "successResponse"}}OnSuccessResponse_{{index}}{{/inline}} {{#*inline "failureArguments"}}uint8_t status{{/inline}} - {{#*inline "successArguments"}}{{#chip_tests_item_response_parameters}}{{#not_first}}, {{/not_first}}{{#if isList}}const chip::app::DataModel::DecodableList<{{/if}}{{#if isArray}}const chip::app::DataModel::DecodableList<{{/if}}{{zapTypeToDecodableClusterObjectType type ns=parent.cluster}}{{#if isList}}>& {{/if}}{{#if isArray}}>& {{/if}} {{asLowerCamelCase name}}{{/chip_tests_item_response_parameters}}{{/inline}} + {{#*inline "successArguments"}}{{#chip_tests_item_response_parameters}}{{#not_first}}, {{/not_first}}{{zapTypeToDecodableClusterObjectType type ns=parent.cluster isArgument=true}} {{asLowerCamelCase name}}{{/chip_tests_item_response_parameters}}{{/inline}} CHIP_ERROR {{>testCommand}}() { diff --git a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt index fc15e210e0cb50..d515e952379707 100644 --- a/examples/chip-tool/templates/partials/test_cluster_command_value.zapt +++ b/examples/chip-tool/templates/partials/test_cluster_command_value.zapt @@ -1,6 +1,7 @@ {{#if isArray}} - {{zapTypeToEncodableClusterObjectType type ns=ns}} {{asLowerCamelCase label}}List[{{definedValue.length}}]; + {{! forceNotList=true because we really want the type of a single item here }} + {{zapTypeToEncodableClusterObjectType type ns=ns forceNotList=true}} {{asLowerCamelCase label}}List[{{definedValue.length}}]; {{#each definedValue}} {{>commandValue ns=../ns container=(concat (asLowerCamelCase ../label) "List[" @index "]") definedValue=. type=../type ignore=true}} {{/each}} diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt index 5c1d467ea89995..95028e5dd7e2fe 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks-src.zapt @@ -129,7 +129,7 @@ app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInsta {{#if isList}} void {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> list; + {{zapTypeToDecodableClusterObjectType type ns=parent.name}} list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt index 5656851f0cdf6e..366f132904349b 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt @@ -32,7 +32,7 @@ typedef void (*{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}C {{#chip_server_cluster_attributes}} {{#if isList}} void {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); -typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & data); +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 9d21d5e0052187..7f1cf4d58dd6f3 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -60,7 +60,7 @@ namespace {{asUpperCamelCase name}} { struct Type { public: {{#zcl_struct_items}} - {{#if isArray}}DataModel::List<{{/if}}{{zapTypeToEncodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase label}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; {{/zcl_struct_items}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -73,7 +73,7 @@ namespace {{asUpperCamelCase name}} { struct DecodableType { public: {{#zcl_struct_items}} - {{#if isArray}}DataModel::DecodableList<{{/if}}{{zapTypeToDecodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase label}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; {{/zcl_struct_items}} CHIP_ERROR Decode(TLV::TLVReader &reader); }; @@ -106,7 +106,7 @@ public: static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; } {{#zcl_command_arguments}} - {{#if isArray}}DataModel::List<{{/if}}{{zapTypeToEncodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase label}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase label}}; {{/zcl_command_arguments}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -118,7 +118,7 @@ public: static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; } {{#zcl_command_arguments}} - {{#if isArray}}DataModel::DecodableList<{{/if}}{{zapTypeToDecodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase label}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase label}}; {{/zcl_command_arguments}} CHIP_ERROR Decode(TLV::TLVReader &reader); }; @@ -137,8 +137,8 @@ namespace Attributes { namespace {{asUpperCamelCase label}} { struct TypeInfo { {{#if entryType}} - using Type = DataModel::List<{{zapTypeToEncodableClusterObjectType entryType}}>; - using DecodableType = DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType entryType}}>; + using Type = {{zapTypeToEncodableClusterObjectType entryType}}; + using DecodableType = {{zapTypeToDecodableClusterObjectType entryType}}; {{else}} using Type = {{zapTypeToEncodableClusterObjectType type}}; using DecodableType = {{zapTypeToDecodableClusterObjectType type}}; @@ -176,7 +176,7 @@ public: static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} - {{#if isArray}}DataModel::List<{{/if}}{{zapTypeToEncodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase name}}; + {{zapTypeToEncodableClusterObjectType type}} {{asLowerCamelCase name}}; {{/zcl_event_fields}} CHIP_ERROR Encode(TLV::TLVWriter &writer, TLV::Tag tag) const; @@ -189,7 +189,7 @@ public: static constexpr ClusterId GetClusterId() { return {{asUpperCamelCase parent.name}}::Id; } {{#zcl_event_fields}} - {{#if isArray}}DataModel::DecodableList<{{/if}}{{zapTypeToDecodableClusterObjectType type}}{{#if isArray}}>{{/if}} {{asLowerCamelCase name}}; + {{zapTypeToDecodableClusterObjectType type}} {{asLowerCamelCase name}}; {{/zcl_event_fields}} CHIP_ERROR Decode(TLV::TLVReader &reader); diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 8d1ed13600dc83..4e751e771cdabc 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -350,6 +350,7 @@ function asMEI(prefix, suffix) */ async function zapTypeToClusterObjectType(type, isDecodable, options) { + let passByReference = false; async function fn(pkgId) { const ns = options.hash.ns ? ('chip::app::Clusters::' + asUpperCamelCase(options.hash.ns) + '::') : ''; @@ -364,13 +365,25 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) } if (await typeChecker('isStruct')) { + passByReference = true; return ns + 'Structs::' + type + '::' + (isDecodable ? 'DecodableType' : 'Type'); } return zclHelper.asUnderlyingZclType.call({ global : this.global }, type, options); } - const promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)); + let promise = templateUtil.ensureZclPackageId(this).then(fn.bind(this)); + if ((this.isList || this.isArray || this.entryType) && !options.hash.forceNotList) { + passByReference = true; + let listType = isDecodable ? "DecodableList" : "List"; + // If we did not have a namespace provided, we can assume we're inside + // chip::app. + let listNamespace = options.hash.ns ? "chip::app::" : "" + promise = promise.then(typeStr => `${listNamespace}DataModel::${listType}<${typeStr}>`); + } + if (options.hash.isArgument && passByReference) { + promise = promise.then(typeStr => `const ${typeStr} &`); + } return templateUtil.templatePromise(this.global, promise) } diff --git a/src/controller/java/templates/CHIPClusters-JNI.zapt b/src/controller/java/templates/CHIPClusters-JNI.zapt index c0dbab713fad44..7738b756e40cd4 100644 --- a/src/controller/java/templates/CHIPClusters-JNI.zapt +++ b/src/controller/java/templates/CHIPClusters-JNI.zapt @@ -413,7 +413,7 @@ class CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCall } } - static void CallbackFn(void * context, const app::DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & list) + static void CallbackFn(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index b41e8d47f28a27..62078df45a4416 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -5981,7 +5981,7 @@ class CHIPApplicationLauncherApplicationLauncherListAttributeCallback } } - static void CallbackFn(void * context, const app::DataModel::DecodableList & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6057,7 +6057,7 @@ class CHIPAudioOutputAudioOutputListAttributeCallback : public Callback::Callbac static void CallbackFn( void * context, - const app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6147,7 +6147,7 @@ class CHIPContentLauncherAcceptsHeaderListAttributeCallback } } - static void CallbackFn(void * context, const app::DataModel::DecodableList & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6222,7 +6222,7 @@ class CHIPContentLauncherSupportedStreamingTypesAttributeCallback static void CallbackFn(void * context, - const app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6296,9 +6296,9 @@ class CHIPDescriptorDeviceListAttributeCallback : public Callback::Callback & list) + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6384,7 +6384,7 @@ class CHIPDescriptorServerListAttributeCallback : public Callback::Callback & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6458,7 +6458,7 @@ class CHIPDescriptorClientListAttributeCallback : public Callback::Callback & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6532,7 +6532,7 @@ class CHIPDescriptorPartsListAttributeCallback : public Callback::Callback & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6606,9 +6606,9 @@ class CHIPFixedLabelLabelListAttributeCallback : public Callback::Callback & list) + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6699,7 +6699,7 @@ class CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallback static void CallbackFn(void * context, - const app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6791,10 +6791,9 @@ class CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback } } - static void CallbackFn( - void * context, - const app::DataModel::DecodableList & - list) + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6893,7 +6892,8 @@ class CHIPGroupKeyManagementGroupsAttributeCallback : public Callback::Callback< static void CallbackFn( void * context, - const app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6981,7 +6981,7 @@ class CHIPGroupKeyManagementGroupKeysAttributeCallback : public Callback::Callba static void CallbackFn( void * context, - const app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7074,9 +7074,9 @@ class CHIPMediaInputMediaInputListAttributeCallback : public Callback::Callback< } } - static void - CallbackFn(void * context, - const app::DataModel::DecodableList & list) + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7167,10 +7167,9 @@ class CHIPOperationalCredentialsFabricsListAttributeCallback } } - static void CallbackFn( - void * context, - const app::DataModel::DecodableList & - list) + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7266,7 +7265,7 @@ class CHIPPowerSourceActiveBatteryFaultsAttributeCallback } } - static void CallbackFn(void * context, const app::DataModel::DecodableList & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7340,9 +7339,9 @@ class CHIPTvChannelTvChannelListAttributeCallback : public Callback::Callback & list) + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7438,7 +7437,7 @@ class CHIPTargetNavigatorTargetNavigatorListAttributeCallback } static void CallbackFn(void * context, - const app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; @@ -7528,7 +7527,7 @@ class CHIPTestClusterListInt8uAttributeCallback : public Callback::Callback & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7602,7 +7601,7 @@ class CHIPTestClusterListOctetStringAttributeCallback : public Callback::Callbac } } - static void CallbackFn(void * context, const app::DataModel::DecodableList & list) + static void CallbackFn(void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7677,7 +7676,8 @@ class CHIPTestClusterListStructOctetStringAttributeCallback static void CallbackFn( void * context, - const app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7767,10 +7767,9 @@ class CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallback } } - static void CallbackFn( - void * context, - const app::DataModel::DecodableList & - list) + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7873,10 +7872,9 @@ class CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallback } } - static void CallbackFn( - void * context, - const app::DataModel::DecodableList & - list) + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTable::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7974,10 +7972,9 @@ class CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallback } } - static void CallbackFn( - void * context, - const app::DataModel::DecodableList & - list) + static void CallbackFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8068,7 +8065,7 @@ class CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallback static void CallbackFn(void * context, - const app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; @@ -8175,8 +8172,9 @@ class CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback } } - static void CallbackFn(void * context, - const app::DataModel::DecodableList & list) + static void + CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp index 1b6cf2f47924ef..4e93af6c5a5141 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ b/src/controller/python/chip/clusters/CHIPClusters.cpp @@ -101,8 +101,9 @@ void OnAttributeResponse(void * /* context */, bool value) gSuccessResponseDelegate(); } -static void OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, - const DataModel::DecodableList & list) +static void +OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -145,7 +146,7 @@ chip::Callback::Callback & list) + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -189,8 +190,9 @@ static void OnAudioOutputAudioOutputListListAttributeResponse( chip::Callback::Callback gAudioOutputAudioOutputListListAttributeCallback{ OnAudioOutputAudioOutputListListAttributeResponse, nullptr }; -static void OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, - const DataModel::DecodableList & list) +static void +OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -230,7 +232,8 @@ static void OnContentLauncherAcceptsHeaderListListAttributeResponse(void * conte chip::Callback::Callback gContentLauncherAcceptsHeaderListListAttributeCallback{ OnContentLauncherAcceptsHeaderListListAttributeResponse, nullptr }; static void OnContentLauncherSupportedStreamingTypesListAttributeResponse( - void * context, const DataModel::DecodableList & list) + void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -271,7 +274,8 @@ chip::Callback::Callback & list) + void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -314,7 +318,8 @@ static void OnDescriptorDeviceListListAttributeResponse( chip::Callback::Callback gDescriptorDeviceListListAttributeCallback{ OnDescriptorDeviceListListAttributeResponse, nullptr }; -static void OnDescriptorServerListListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnDescriptorServerListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -354,7 +359,8 @@ static void OnDescriptorServerListListAttributeResponse(void * context, const Da chip::Callback::Callback gDescriptorServerListListAttributeCallback{ OnDescriptorServerListListAttributeResponse, nullptr }; -static void OnDescriptorClientListListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnDescriptorClientListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -394,7 +400,8 @@ static void OnDescriptorClientListListAttributeResponse(void * context, const Da chip::Callback::Callback gDescriptorClientListListAttributeCallback{ OnDescriptorClientListListAttributeResponse, nullptr }; -static void OnDescriptorPartsListListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnDescriptorPartsListListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -435,7 +442,8 @@ chip::Callback::Callback gDescriptorPa OnDescriptorPartsListListAttributeResponse, nullptr }; static void OnFixedLabelLabelListListAttributeResponse( - void * context, const DataModel::DecodableList & list) + void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -480,8 +488,8 @@ chip::Callback::Callback gFixedLabelLa }; static void OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse( void * context, - const DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -526,7 +534,8 @@ chip::Callback::Callback & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -575,7 +584,7 @@ chip::Callback::Callback & list) + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -621,7 +630,7 @@ chip::Callback::Callback gGroupKe }; static void OnGroupKeyManagementGroupKeysListAttributeResponse( void * context, - const DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -668,7 +677,8 @@ chip::Callback::Callback gGrou OnGroupKeyManagementGroupKeysListAttributeResponse, nullptr }; static void OnMediaInputMediaInputListListAttributeResponse( - void * context, const DataModel::DecodableList & list) + void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -715,7 +725,8 @@ chip::Callback::Callback gMediaIn }; static void OnOperationalCredentialsFabricsListListAttributeResponse( void * context, - const DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -761,7 +772,8 @@ static void OnOperationalCredentialsFabricsListListAttributeResponse( } chip::Callback::Callback gOperationalCredentialsFabricsListListAttributeCallback{ OnOperationalCredentialsFabricsListListAttributeResponse, nullptr }; -static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -802,7 +814,8 @@ chip::Callback::Callback gP OnPowerSourceActiveBatteryFaultsListAttributeResponse, nullptr }; static void OnTvChannelTvChannelListListAttributeResponse( - void * context, const DataModel::DecodableList & list) + void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -851,7 +864,8 @@ chip::Callback::Callback gTvChannel }; static void OnTargetNavigatorTargetNavigatorListListAttributeResponse( void * context, - const DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -893,7 +907,7 @@ static void OnTargetNavigatorTargetNavigatorListListAttributeResponse( } chip::Callback::Callback gTargetNavigatorTargetNavigatorListListAttributeCallback{ OnTargetNavigatorTargetNavigatorListListAttributeResponse, nullptr }; -static void OnTestClusterListInt8uListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnTestClusterListInt8uListAttributeResponse(void * context, const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -933,7 +947,8 @@ static void OnTestClusterListInt8uListAttributeResponse(void * context, const Da chip::Callback::Callback gTestClusterListInt8uListAttributeCallback{ OnTestClusterListInt8uListAttributeResponse, nullptr }; -static void OnTestClusterListOctetStringListAttributeResponse(void * context, const DataModel::DecodableList & list) +static void OnTestClusterListOctetStringListAttributeResponse(void * context, + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -975,7 +990,7 @@ chip::Callback::Callback gTestC }; static void OnTestClusterListStructOctetStringListAttributeResponse( void * context, - const DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); @@ -1019,7 +1034,8 @@ chip::Callback::Callback gTestClusterListStructOctetStringListAttributeCallback{ OnTestClusterListStructOctetStringListAttributeResponse, nullptr }; static void OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse( void * context, - const DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -1077,7 +1093,8 @@ chip::Callback::Callback & list) + const chip::app::DataModel::DecodableList & + list) { uint16_t count = 0; auto iter = list.begin(); @@ -1130,7 +1147,8 @@ chip::Callback::Callback & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) { uint16_t count = 0; auto iter = list.begin(); @@ -1175,7 +1193,7 @@ chip::Callback::Callback & list) { uint16_t count = 0; @@ -1231,7 +1249,7 @@ chip::Callback::Callback & list) + void * context, const chip::app::DataModel::DecodableList & list) { uint16_t count = 0; auto iter = list.begin(); diff --git a/src/controller/python/templates/python-CHIPClusters-cpp.zapt b/src/controller/python/templates/python-CHIPClusters-cpp.zapt index e70512eba2b6db..cce7d71f3e7fa0 100644 --- a/src/controller/python/templates/python-CHIPClusters-cpp.zapt +++ b/src/controller/python/templates/python-CHIPClusters-cpp.zapt @@ -88,7 +88,7 @@ void OnAttributeResponse(void * /* context */, bool value) {{#chip_client_clusters}} {{#chip_server_cluster_attributes}} {{#if isList}} -static void On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse(void * context, const DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & list) +static void On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list) { uint16_t count = 0; auto iter = list.begin(); diff --git a/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt b/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt index 746ea54b6f520b..d089aba436bea3 100644 --- a/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/CHIPCallbackBridge.zapt @@ -10,7 +10,7 @@ public: {{#if (isStrEqual partial-type "Command")}} {{#chip_cluster_response_arguments}}, {{asUnderlyingZclType type}} {{asSymbol label}}{{/chip_cluster_response_arguments}} {{else if (isStrEqual partial-type "List")}} - , const chip::app::DataModel::DecodableList<{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & list + , {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list {{else if partial-type}} , {{asUnderlyingZclType partial-type}} value {{else}} @@ -22,8 +22,7 @@ void CHIP{{> @partial-block}}Bridge::OnSuccessFn(void * context {{#if (isStrEqual partial-type "Command")}} {{#chip_cluster_response_arguments}}, {{asUnderlyingZclType type}} {{asSymbol label}}{{/chip_cluster_response_arguments}} {{else if (isStrEqual partial-type "List")}} - , const chip::app::DataModel::DecodableList - <{{zapTypeToDecodableClusterObjectType type ns=parent.name}}> & list + , {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list {{else if partial-type}} , {{asUnderlyingZclType partial-type}} value {{else}} diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index 49b3288103e4cb..35c3fcc73f4ad8 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -140,7 +140,7 @@ void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::T Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -164,7 +164,7 @@ void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::T void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -188,7 +188,7 @@ void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvDa void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -213,7 +213,7 @@ void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVRe Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -237,7 +237,7 @@ void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVRe void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -261,7 +261,7 @@ void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Ca void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -285,7 +285,7 @@ void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Ca void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -309,7 +309,7 @@ void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Ca void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -333,7 +333,7 @@ void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Cal void FixedLabelClusterLabelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -358,7 +358,9 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> + list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -383,7 +385,7 @@ void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReade Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -407,7 +409,7 @@ void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReade void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -431,7 +433,7 @@ void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -455,7 +457,7 @@ void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvD void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -479,7 +481,7 @@ void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -503,7 +505,7 @@ void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -527,7 +529,7 @@ void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(TLV::TLVReader * t void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -552,7 +554,8 @@ void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList + list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -576,7 +579,7 @@ void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -600,7 +603,7 @@ void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Ca void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -624,7 +627,7 @@ void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvDa void TestClusterClusterListStructOctetStringListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -649,7 +652,7 @@ void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(TLV::TL Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -674,7 +677,7 @@ void ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter(TLV::TLVRe Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -699,7 +702,7 @@ void ThreadNetworkDiagnosticsClusterSecurityPolicyListAttributeFilter(TLV::TLVRe Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -724,7 +727,9 @@ void ThreadNetworkDiagnosticsClusterOperationalDatasetComponentsListAttributeFil Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> + list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -750,7 +755,7 @@ void ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter(T Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index 98a6747514aecb..df004060de32d3 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -140,7 +140,9 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> + list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -164,7 +166,7 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) { @@ -189,7 +191,7 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(TLV Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - DecodableList list; + chip::app::DataModel::DecodableList list; CHIP_ERROR err = Decode(*tlvData, list); if (err != CHIP_NO_ERROR) {