From 532a901337f1e0e510f6d7b5a076d991b4c20390 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 May 2023 10:46:51 -0400 Subject: [PATCH 1/4] Remove usage of if_enabled_clusters --- src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt | 3 --- src/app/zap-templates/templates/app/CHIPClusters.zapt | 4 ---- src/controller/java/templates/ChipClusters-java.zapt | 4 +--- src/controller/java/templates/ChipIdLookup-java.zapt | 4 +--- src/controller/java/templates/ClusterInfo-java.zapt | 3 --- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt index d28b45a8f2032d..f08c912d2ada25 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt @@ -1,6 +1,4 @@ {{> header}} - -{{#if_enabled_clusters side='client'}} #pragma once #include @@ -21,4 +19,3 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttr {{/zcl_attributes_server}} {{/all_user_clusters}} -{{/if_enabled_clusters}} \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/CHIPClusters.zapt b/src/app/zap-templates/templates/app/CHIPClusters.zapt index 2bf93e2c728fe2..05fab685053834 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters.zapt @@ -1,7 +1,4 @@ {{> header}} - -{{#if_enabled_clusters side='client'}} -// Prevent multiple inclusion #pragma once #include @@ -25,4 +22,3 @@ public: {{/all_user_clusters}} } // namespace Controller } // namespace chip -{{/if_enabled_clusters}} diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 92621720aba6b4..59cd477d802c89 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -1,6 +1,4 @@ {{> header}} -{{#if_enabled_clusters side='client'}} - package chip.devicecontroller; import javax.annotation.Nullable; @@ -247,4 +245,4 @@ public class ChipClusters { {{/not_last}} {{/zcl_clusters}} } -{{/if_enabled_clusters}} + diff --git a/src/controller/java/templates/ChipIdLookup-java.zapt b/src/controller/java/templates/ChipIdLookup-java.zapt index cd2475af515b1a..55cd007cf195f7 100644 --- a/src/controller/java/templates/ChipIdLookup-java.zapt +++ b/src/controller/java/templates/ChipIdLookup-java.zapt @@ -1,6 +1,4 @@ {{> header}} -{{#if_enabled_clusters side='client'}} - package chip.devicecontroller; public final class ChipIdLookup { @@ -53,4 +51,4 @@ public final class ChipIdLookup { return ""; } } -{{/if_enabled_clusters}} \ 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 cb4c9893c55413..53666f7b68424c 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -1,6 +1,4 @@ {{> header}} -{{#if_enabled_clusters side='client'}} - package chip.devicecontroller; import javax.annotation.Nullable; @@ -373,4 +371,3 @@ public class ClusterInfoMapping { } -{{/if_enabled_clusters}} \ No newline at end of file From 87de6dc6ba08ba0c082dc587faede26297b12e48 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 May 2023 11:31:40 -0400 Subject: [PATCH 2/4] Update unit tests --- .../all-clusters-app/app-templates/CHIPClientCallbacks.h | 1 - .../tests/outputs/all-clusters-app/app-templates/CHIPClusters.h | 2 -- .../outputs/lighting-app/app-templates/CHIPClientCallbacks.h | 1 - .../zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h | 2 -- 4 files changed, 6 deletions(-) diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClientCallbacks.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClientCallbacks.h index fba215552b81e7..0a04bdceb3d257 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClientCallbacks.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClientCallbacks.h @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - #pragma once #include diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClusters.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClusters.h index 9af15232480836..8601882bb35715 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClusters.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/CHIPClusters.h @@ -16,8 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion #pragma once #include diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClientCallbacks.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClientCallbacks.h index fba215552b81e7..0a04bdceb3d257 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClientCallbacks.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClientCallbacks.h @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - #pragma once #include diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h index 9af15232480836..8601882bb35715 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/CHIPClusters.h @@ -16,8 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion #pragma once #include From a0d8d956cf17edbf8f7240f2ac4e967c1f989e37 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 May 2023 11:46:57 -0400 Subject: [PATCH 3/4] zap regen all --- .../java/zap-generated/chip/devicecontroller/ChipClusters.java | 1 - .../java/zap-generated/chip/devicecontroller/ChipIdLookup.java | 1 - .../zap-generated/chip/devicecontroller/ClusterInfoMapping.java | 1 - .../controller-clusters/zap-generated/CHIPClientCallbacks.h | 1 - .../darwin/controller-clusters/zap-generated/CHIPClusters.h | 2 -- 5 files changed, 6 deletions(-) diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 1f28de5a0bb512..7466260a131a76 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - package chip.devicecontroller; import java.util.ArrayList; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 37fd144d52cfac..612f3ed932ce37 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - package chip.devicecontroller; public final class ChipIdLookup { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 6b5e710a42e614..b312272ea0bf59 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - package chip.devicecontroller; import chip.clusterinfo.ClusterCommandCallback; diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h index 01c46405758d23..996e953233208b 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -16,7 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - #pragma once #include diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h index db17098cf93914..5632cb9e3b5dc8 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClusters.h @@ -16,8 +16,6 @@ */ // THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion #pragma once #include From 785be9ca7e7008c720e890e4917330fb5c24055d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 May 2023 12:13:49 -0400 Subject: [PATCH 4/4] zap regen all --- .../python/chip/clusters/CHIPClusters.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index c522a4f4ff4d33..66dacdafb98862 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4346,6 +4346,94 @@ class ChipClusters: }, }, } + _TEMPERATURE_CONTROL_CLUSTER_INFO = { + "clusterName": "TemperatureControl", + "clusterId": 0x00000056, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "SetTemperature", + "args": { + "targetTemperature": "int", + "targetTemperatureLevel": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "TemperatureSetpoint", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "MinTemperature", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "MaxTemperature", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "Step", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "CurrentTemperatureLevelIndex", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "SupportedTemperatureLevels", + "attributeId": 0x00000005, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _AIR_QUALITY_CLUSTER_INFO = { "clusterName": "AirQuality", "clusterId": 0x0000005B, @@ -10818,6 +10906,7 @@ class ChipClusters: 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000046: _ICD_MANAGEMENT_CLUSTER_INFO, 0x00000050: _MODE_SELECT_CLUSTER_INFO, + 0x00000056: _TEMPERATURE_CONTROL_CLUSTER_INFO, 0x0000005B: _AIR_QUALITY_CLUSTER_INFO, 0x0000005C: _SMOKE_CO_ALARM_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, @@ -10907,6 +10996,7 @@ class ChipClusters: "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "IcdManagement": _ICD_MANAGEMENT_CLUSTER_INFO, "ModeSelect": _MODE_SELECT_CLUSTER_INFO, + "TemperatureControl": _TEMPERATURE_CONTROL_CLUSTER_INFO, "AirQuality": _AIR_QUALITY_CLUSTER_INFO, "SmokeCoAlarm": _SMOKE_CO_ALARM_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO,