From 300818567491778312fe5e22dcf47ccad1883350 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 13 Jun 2022 11:20:30 -0400 Subject: [PATCH] Mei data in all clusters (#19274) * Initial commit to add some MEI types - specifically a MEI attribute * Update code to be non-hex * Add an extensions xml file * Added a manufacturer specific extension, codegen seems to work on all clusters app * ran zap regen after adding custom command in zap file * Move extensions to separate json ... does not work in generation yet though * Detect zcl path from zap file during generation * Slight update with comment update * Update code to generate MEI command * Update comment * Remove custom command - all clusters fails to compile with that. unsure why however assuming constants generated separately in different codegen paths * Restyle * Make run_zaptool.sh be able to use test extensions for all clusters app * add zcl file detection for convert.py as well * Add json import * Ran convert.py on all-clusters * Restyle * Add extra slash to check for file path for all clusters * Add linter rule for ZCL file being in sync * Restyle --- .github/workflows/lint.yml | 4 + .../all-clusters-app.matter | 2 + .../all-clusters-common/all-clusters-app.zap | 18 +- scripts/tools/check_zcl_file_sync.py | 72 +++++ scripts/tools/zap/convert.py | 22 +- scripts/tools/zap/generate.py | 31 ++- scripts/tools/zap/run_zaptool.sh | 11 +- .../test/mode-select-extensions.xml | 37 +++ .../zcl/zcl-with-test-extensions.json | 262 ++++++++++++++++++ .../zap-generated/endpoint_config.h | 85 +++--- 10 files changed, 494 insertions(+), 50 deletions(-) create mode 100755 scripts/tools/check_zcl_file_sync.py create mode 100644 src/app/zap-templates/zcl/data-model/test/mode-select-extensions.xml create mode 100644 src/app/zap-templates/zcl/zcl-with-test-extensions.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b5c296573021d7..ce0a12059f6916 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -85,6 +85,10 @@ jobs: if: always() run: scripts/tools/check_includes.sh + - name: Check for zcl.json and extension sync status + if: always() + run: scripts/tools/check_zcl_file_sync.py . + - name: Ensure all PICS are set for tests (to true or false) if: always() run: | diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 0be9a0bdb595df..728437e3b2c6fd 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2170,6 +2170,7 @@ server cluster ModeSelect = 80 { readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + readonly attribute int8u manufacturerExtension = 4293984257; request struct ChangeToModeRequest { INT8U newMode = 0; @@ -4328,6 +4329,7 @@ endpoint 1 { callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; + ram attribute manufacturerExtension default = 255; } server cluster DoorLock { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 3b53149a8dccb4..933f095975a3c4 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -18,7 +18,7 @@ "package": [ { "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/zcl/zcl.json", + "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", "version": "ZCL Test Data", "type": "zcl-properties" }, @@ -12664,6 +12664,22 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 + }, + { + "name": "ManufacturerExtension", + "code": 4293984257, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "255", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 } ] }, diff --git a/scripts/tools/check_zcl_file_sync.py b/scripts/tools/check_zcl_file_sync.py new file mode 100755 index 00000000000000..50c520a84f0fce --- /dev/null +++ b/scripts/tools/check_zcl_file_sync.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +# +# 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. +# + +""" +Validates that the json zcl files that are used by the app are in sync. + +Current rule: + - all-clusters app uses an extension on top of the "standard" zcl file. + Ensure that the two fies are in sync EXCEPT the extension. +""" + +import json +import sys +import os +import difflib + + +def main(): + if len(sys.argv) != 2: + print('Please pass CHIP_ROOT as an argument (and only chip root)') + return 1 + + base_name = os.path.join(sys.argv[1], "src", "app", "zap-templates", "zcl", "zcl.json") + ext_name = os.path.join(sys.argv[1], "src", "app", "zap-templates", "zcl", "zcl-with-test-extensions.json") + + base_data = json.load(open(base_name)) + ext_data = json.load(open(ext_name)) + + # ext should be IDENTICAL with base if we add a few things to base: + base_data["xmlRoot"].append("./data-model/test") + base_data["xmlFile"].append("mode-select-extensions.xml") + + # do not care about sorting. mainly do not check if extension xml + # is at the end or in the middle + base_data["xmlFile"].sort() + ext_data["xmlFile"].sort() + + if base_data == ext_data: + return 0 + + print("%s and %s have unexpected differences." % (base_name, ext_name)) + print("Differences between expected and actual:") + + for l in difflib.unified_diff( + json.dumps(ext_data, indent=2).split('\n'), + json.dumps(base_data, indent=2).split('\n'), + fromfile=ext_name, + tofile="", + ): + if l.endswith('\n'): + l = l[:-1] + print(l) + + return 1 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/scripts/tools/zap/convert.py b/scripts/tools/zap/convert.py index 143bd104d91ea1..1181ebe17d989f 100755 --- a/scripts/tools/zap/convert.py +++ b/scripts/tools/zap/convert.py @@ -16,6 +16,7 @@ # import argparse +import json import os import subprocess import sys @@ -66,9 +67,28 @@ def runArgumentsParser(): return zap_file +def detectZclFile(zapFile): + print(f"Searching for zcl file from {zapFile}") + + path = 'src/app/zap-templates/zcl/zcl.json' + + data = json.load(open(zapFile)) + for package in data["package"]: + if package["type"] != "zcl-properties": + continue + + # found the right path, try to figure out the actual path + if package["pathRelativity"] == "relativeToZap": + path = os.path.abspath(os.path.join(os.path.dirname(zapFile), package["path"])) + else: + path = package["path"] + + return getFilePath(path) + + def runConversion(zap_file): templates_file = getFilePath('src/app/zap-templates/app-templates.json') - zcl_file = getFilePath('src/app/zap-templates/zcl/zcl.json') + zcl_file = detectZclFile(zap_file) generator_dir = getDirPath('third_party/zap/repo') os.chdir(generator_dir) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index 6d6b0848e3d1ed..72b63a1c7fbb6c 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -58,9 +58,27 @@ def getDirPath(name): return fullpath +def detectZclFile(zapFile): + print(f"Searching for zcl file from {zapFile}") + + path = 'src/app/zap-templates/zcl/zcl.json' + + data = json.load(open(zapFile)) + for package in data["package"]: + if package["type"] != "zcl-properties": + continue + + # found the right path, try to figure out the actual path + if package["pathRelativity"] == "relativeToZap": + path = os.path.abspath(os.path.join(os.path.dirname(zapFile), package["path"])) + else: + path = package["path"] + + return getFilePath(path) + + def runArgumentsParser(): default_templates = 'src/app/zap-templates/app-templates.json' - default_zcl = 'src/app/zap-templates/zcl/zcl.json' default_output_dir = 'zap-generated/' parser = argparse.ArgumentParser( @@ -68,8 +86,8 @@ def runArgumentsParser(): parser.add_argument('zap', help='Path to the application .zap file') parser.add_argument('-t', '--templates', default=default_templates, help='Path to the .zapt templates records to use for generating artifacts (default: "' + default_templates + '")') - parser.add_argument('-z', '--zcl', default=default_zcl, - help='Path to the zcl templates records to use for generating artifacts (default: "' + default_zcl + '")') + parser.add_argument('-z', '--zcl', + help='Path to the zcl templates records to use for generating artifacts (default: autodetect read from zap file)') parser.add_argument('-o', '--output-dir', default=None, help='Output directory for the generated files (default: automatically selected)') args = parser.parse_args() @@ -86,7 +104,12 @@ def runArgumentsParser(): output_dir = '' zap_file = getFilePath(args.zap) - zcl_file = getFilePath(args.zcl) + + if args.zcl: + zcl_file = getFilePath(args.zcl) + else: + zcl_file = detectZclFile(zap_file) + templates_file = getFilePath(args.templates) output_dir = getDirPath(output_dir) diff --git a/scripts/tools/zap/run_zaptool.sh b/scripts/tools/zap/run_zaptool.sh index c219a6cc560339..62a9d3de514bca 100755 --- a/scripts/tools/zap/run_zaptool.sh +++ b/scripts/tools/zap/run_zaptool.sh @@ -45,9 +45,16 @@ CHIP_ROOT="${SCRIPT_PATH%/scripts/tools/zap/run_zaptool.sh}" npm install fi + echo "ARGS: ${ZAP_ARGS[@]}" + + if [[ "${ZAP_ARGS[@]}" == *"/all-clusters-app.zap"* ]]; then + ZCL_FILE="$CHIP_ROOT/src/app/zap-templates/zcl/zcl-with-test-extensions.json" + else + ZCL_FILE="$CHIP_ROOT/src/app/zap-templates/zcl/zcl.json" + fi + node src-script/zap-start.js --logToStdout \ --gen "$CHIP_ROOT/src/app/zap-templates/app-templates.json" \ - --zcl "$CHIP_ROOT/src/app/zap-templates/zcl/zcl.json" \ + --zcl "$ZCL_FILE" \ "${ZAP_ARGS[@]}" - ) diff --git a/src/app/zap-templates/zcl/data-model/test/mode-select-extensions.xml b/src/app/zap-templates/zcl/data-model/test/mode-select-extensions.xml new file mode 100644 index 00000000000000..c10c691c357481 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/test/mode-select-extensions.xml @@ -0,0 +1,37 @@ + + + + + + + + ManufacturerExtension + + + + Sample manufacturer specific extension command + + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json new file mode 100644 index 00000000000000..d99dcd82e89bab --- /dev/null +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -0,0 +1,262 @@ +{ + "version": "ZCL Test Data", + "xmlRoot": [ + ".", + "./data-model/chip/", + "./data-model/silabs/", + "./data-model/test" + ], + "_comment": "Ensure access-control-definitions.xml is first in xmlFile array", + "xmlFile": [ + "access-control-definitions.xml", + "access-control-cluster.xml", + "account-login-cluster.xml", + "administrator-commissioning-cluster.xml", + "application-basic-cluster.xml", + "application-launcher-cluster.xml", + "audio-output-cluster.xml", + "basic-information-cluster.xml", + "binding-cluster.xml", + "boolean-state-cluster.xml", + "bridged-actions-cluster.xml", + "bridged-device-basic.xml", + "chip-ota.xml", + "chip-types.xml", + "channel-cluster.xml", + "clusters-extensions.xml", + "content-launch-cluster.xml", + "descriptor-cluster.xml", + "diagnostic-logs-cluster.xml", + "door-lock-cluster.xml", + "ethernet-network-diagnostics-cluster.xml", + "fixed-label-cluster.xml", + "flow-measurement-cluster.xml", + "general-commissioning-cluster.xml", + "general-diagnostics-cluster.xml", + "global-attributes.xml", + "group-key-mgmt-cluster.xml", + "identify-cluster.xml", + "illuminance-measurement-cluster.xml", + "keypad-input-cluster.xml", + "localization-configuration-cluster.xml", + "low-power-cluster.xml", + "media-input-cluster.xml", + "media-playback-cluster.xml", + "mode-select-cluster.xml", + "mode-select-extensions.xml", + "network-commissioning-cluster.xml", + "onoff-cluster.xml", + "operational-credentials-cluster.xml", + "pressure-measurement-cluster.xml", + "power-source-cluster.xml", + "power-source-configuration-cluster.xml", + "proxy-configuration-cluster.xml", + "proxy-discovery-cluster.xml", + "proxy-valid-cluster.xml", + "pump-configuration-and-control-cluster.xml", + "pwm-cluster.xml", + "relative-humidity-measurement-cluster.xml", + "scene.xml", + "software-diagnostics-cluster.xml", + "switch-cluster.xml", + "target-navigator-cluster.xml", + "temperature-measurement-cluster.xml", + "test-cluster.xml", + "thermostat-cluster.xml", + "thread-network-diagnostics-cluster.xml", + "time-format-localization-cluster.xml", + "time-synchronization-cluster.xml", + "user-label-cluster.xml", + "unit-localization-cluster.xml", + "wake-on-lan-cluster.xml", + "wifi-network-diagnostics-cluster.xml", + "window-covering.xml", + "matter-devices.xml", + "ami.xml", + "general.xml", + "ha-devices.xml", + "ha.xml", + "lo-devices.xml", + "types.xml", + "zll-devices.xml", + "zll.xml" + ], + "manufacturersXml": "../../../../third_party/zap/repo/zcl-builtin/shared/manufacturers.xml", + "options": { + "text": { + "defaultResponsePolicy": ["Always", "Conditional", "Never"] + }, + "bool": ["commandDiscovery"] + }, + "defaults": { + "text": { + "manufacturerCodes": "0x1002", + "defaultResponsePolicy": "always" + }, + "bool": { + "commandDiscovery": true + } + }, + "listsUseAttributeAccessInterface": true, + "attributeAccessInterfaceAttributes": { + "Access Control": [ + "ClusterRevision", + "SubjectsPerAccessControlEntry", + "TargetsPerAccessControlEntry", + "AccessControlEntriesPerFabric" + ], + "AdministratorCommissioning": [ + "WindowStatus", + "AdminFabricIndex", + "AdminVendorId" + ], + "Basic": [ + "DataModelRevision", + "VendorName", + "VendorID", + "ProductName", + "ProductID", + "Location", + "HardwareVersion", + "HardwareVersionString", + "SoftwareVersion", + "SoftwareVersionString", + "ManufacturingDate", + "PartNumber", + "ProductURL", + "ProductLabel", + "SerialNumber", + "UniqueID", + "CapabilityMinima" + ], + "Descriptor": ["ClusterRevision"], + "Ethernet Network Diagnostics": [ + "PHYRate", + "FullDuplex", + "CarrierDetect", + "TimeSinceReset", + "PacketRxCount", + "PacketTxCount", + "TxErrCount", + "CollisionCount", + "OverrunCount" + ], + "General Commissioning": [ + "RegulatoryConfig", + "LocationCapability", + "BasicCommissioningInfo", + "SupportsConcurrentConnection" + ], + "General Diagnostics": [ + "NetworkInterfaces", + "ActiveHardwareFaults", + "ActiveRadioFaults", + "ActiveNetworkFaults", + "RebootCount", + "UpTime", + "TotalOperationalHours", + "BootReasons" + ], + "Group Key Management": [ + "ClusterRevision", + "MaxGroupsPerFabric", + "MaxGroupKeysPerFabric", + "FeatureMap" + ], + "Operational Credentials": [ + "SupportedFabrics", + "CommissionedFabrics", + "CurrentFabricIndex" + ], + "Software Diagnostics": [ + "CurrentHeapFree", + "CurrentHeapHighWatermark", + "CurrentHeapUsed", + "FeatureMap", + "ThreadMetrics" + ], + "Test Cluster": [ + "struct_attr", + "nullable_struct", + "general_error_boolean", + "cluster_error_boolean" + ], + "Thread Network Diagnostics": [ + "channel", + "RoutingRole", + "NetworkName", + "PanId", + "ExtendedPanId", + "MeshLocalPrefix", + "OverrunCount", + "PartitionId", + "weighting", + "DataVersion", + "StableDataVersion", + "LeaderRouterId", + "DetachedRoleCount", + "ChildRoleCount", + "RouterRoleCount", + "LeaderRoleCount", + "AttachAttemptCount", + "PartitionIdChangeCount", + "BetterPartitionAttachAttemptCount", + "ParentChangeCount", + "TxTotalCount", + "TxUnicastCount", + "TxBroadcastCount", + "TxAckRequestedCount", + "TxAckedCount", + "TxNoAckRequestedCount", + "TxDataCount", + "TxDataPollCount", + "TxBeaconCount", + "TxBeaconRequestCount", + "TxOtherCount", + "TxRetryCount", + "TxDirectMaxRetryExpiryCount", + "TxIndirectMaxRetryExpiryCount", + "TxErrCcaCount", + "TxErrAbortCount", + "TxErrBusyChannelCount", + "RxTotalCount", + "RxUnicastCount", + "RxBroadcastCount", + "RxDataCount", + "RxDataPollCount", + "RxBeaconCount", + "RxBeaconRequestCount", + "RxOtherCount", + "RxAddressFilteredCount", + "RxDestAddrFilteredCount", + "RxDuplicatedCount", + "RxErrNoFrameCount", + "RxErrUnknownNeighborCount", + "RxErrInvalidSrcAddrCount", + "RxErrSecCount", + "RxErrFcsCount", + "RxErrOtherCount", + "ActiveTimestamp", + "PendingTimestamp", + "delay", + "ChannelMask" + ], + "WiFi Network Diagnostics": [ + "bssid", + "SecurityType", + "WiFiVersion", + "ChannelNumber", + "Rssi", + "BeaconLostCount", + "BeaconRxCount", + "PacketMulticastRxCount", + "PacketMulticastTxCount", + "PacketUnicastRxCount", + "PacketUnicastTxCount", + "CurrentMaxRate", + "OverrunCount" + ] + }, + "defaultReportingPolicy": "mandatory", + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"] +} 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 b9c23519f72621..d63400d1dfecb0 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -376,7 +376,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 722 +#define GENERATED_ATTRIBUTE_COUNT 723 #define GENERATED_ATTRIBUTES \ { \ \ @@ -891,8 +891,9 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ - { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* Description */ \ - { 0x00000001, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* StandardNamespace */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* Description */ \ + { 0x00000001, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* StandardNamespace */ \ + { 0xFFF10001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(255) }, /* ManufacturerExtension */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedModes */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0) }, /* CurrentMode */ \ { 0x00000004, ZAP_TYPE(INT8U), 1, \ @@ -2380,8 +2381,8 @@ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ .attributes = ZAP_ATTRIBUTE_INDEX(313), \ - .attributeCount = 8, \ - .clusterSize = 44, \ + .attributeCount = 9, \ + .clusterSize = 45, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 122 ) ,\ @@ -2390,7 +2391,7 @@ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ - .attributes = ZAP_ATTRIBUTE_INDEX(321), \ + .attributes = ZAP_ATTRIBUTE_INDEX(322), \ .attributeCount = 33, \ .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2401,7 +2402,7 @@ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(354), \ + .attributes = ZAP_ATTRIBUTE_INDEX(355), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2412,7 +2413,7 @@ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(378), \ + .attributes = ZAP_ATTRIBUTE_INDEX(379), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2423,7 +2424,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(384), \ + .attributes = ZAP_ATTRIBUTE_INDEX(385), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2434,7 +2435,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(409), \ + .attributes = ZAP_ATTRIBUTE_INDEX(410), \ .attributeCount = 17, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2445,7 +2446,7 @@ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(426), \ + .attributes = ZAP_ATTRIBUTE_INDEX(427), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2456,7 +2457,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(439), \ + .attributes = ZAP_ATTRIBUTE_INDEX(440), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2467,7 +2468,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(444), \ + .attributes = ZAP_ATTRIBUTE_INDEX(445), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2478,7 +2479,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(498), \ + .attributes = ZAP_ATTRIBUTE_INDEX(499), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2489,7 +2490,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(505), \ + .attributes = ZAP_ATTRIBUTE_INDEX(506), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2500,7 +2501,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(511), \ + .attributes = ZAP_ATTRIBUTE_INDEX(512), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2511,7 +2512,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(516), \ + .attributes = ZAP_ATTRIBUTE_INDEX(517), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2522,7 +2523,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(522), \ + .attributes = ZAP_ATTRIBUTE_INDEX(523), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2533,7 +2534,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(528), \ + .attributes = ZAP_ATTRIBUTE_INDEX(529), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2544,7 +2545,7 @@ { \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ .clusterId = 0x00000500, \ - .attributes = ZAP_ATTRIBUTE_INDEX(533), \ + .attributes = ZAP_ATTRIBUTE_INDEX(534), \ .attributeCount = 7, \ .clusterSize = 20, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ @@ -2555,7 +2556,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(540), \ + .attributes = ZAP_ATTRIBUTE_INDEX(541), \ .attributeCount = 3, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2566,7 +2567,7 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(543), \ + .attributes = ZAP_ATTRIBUTE_INDEX(544), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2577,7 +2578,7 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(546), \ + .attributes = ZAP_ATTRIBUTE_INDEX(547), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2588,7 +2589,7 @@ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(550), \ + .attributes = ZAP_ATTRIBUTE_INDEX(551), \ .attributeCount = 8, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2599,7 +2600,7 @@ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(558), \ + .attributes = ZAP_ATTRIBUTE_INDEX(559), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2610,7 +2611,7 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(562), \ + .attributes = ZAP_ATTRIBUTE_INDEX(563), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2621,7 +2622,7 @@ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(564), \ + .attributes = ZAP_ATTRIBUTE_INDEX(565), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2632,7 +2633,7 @@ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(566), \ + .attributes = ZAP_ATTRIBUTE_INDEX(567), \ .attributeCount = 4, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2643,7 +2644,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(570), \ + .attributes = ZAP_ATTRIBUTE_INDEX(571), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2654,7 +2655,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(574), \ + .attributes = ZAP_ATTRIBUTE_INDEX(575), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2665,7 +2666,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(577), \ + .attributes = ZAP_ATTRIBUTE_INDEX(578), \ .attributeCount = 9, \ .clusterSize = 110, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2676,7 +2677,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(586), \ + .attributes = ZAP_ATTRIBUTE_INDEX(587), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2687,7 +2688,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(588), \ + .attributes = ZAP_ATTRIBUTE_INDEX(589), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2698,7 +2699,7 @@ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(601), \ + .attributes = ZAP_ATTRIBUTE_INDEX(602), \ .attributeCount = 82, \ .clusterSize = 2289, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2709,7 +2710,7 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(683), \ + .attributes = ZAP_ATTRIBUTE_INDEX(684), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2720,7 +2721,7 @@ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(686), \ + .attributes = ZAP_ATTRIBUTE_INDEX(687), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2731,7 +2732,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(693), \ + .attributes = ZAP_ATTRIBUTE_INDEX(694), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2742,7 +2743,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(699), \ + .attributes = ZAP_ATTRIBUTE_INDEX(700), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2753,7 +2754,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(707), \ + .attributes = ZAP_ATTRIBUTE_INDEX(708), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2764,7 +2765,7 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(712), \ + .attributes = ZAP_ATTRIBUTE_INDEX(713), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2783,7 +2784,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 45, 3479 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 355 }, { ZAP_CLUSTER_INDEX(27), 45, 3480 }, { ZAP_CLUSTER_INDEX(72), 5, 105 }, \ { ZAP_CLUSTER_INDEX(77), 1, 0 }, \ } @@ -2796,7 +2797,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3939) +#define ATTRIBUTE_MAX_SIZE (3940) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4)