From 434735288e6e89521818b8b9d4e6ae0bf08aa7be Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 19 May 2023 10:50:41 -0400 Subject: [PATCH] Move att-storage to not be codegenned (has no codegen input) (#26666) * Move att-storage to NOT be codegenned (has no codegen input) * Edit: not generated anymore * Restyled by clang-format --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- .../linux/AllClustersCommandDelegate.cpp | 2 +- .../all-clusters-app/linux/main-common.cpp | 2 +- .../linux/main-common.cpp | 2 +- examples/chef/esp32/main/main.cpp | 2 +- .../infineon/cyw30739/src/LightingManager.cpp | 2 +- src/app/AttributePathExpandIterator.cpp | 2 +- .../zap-generated => src/app}/att-storage.h | 4 ---- .../group-key-mgmt-server.cpp | 2 +- .../clusters/groups-server/groups-server.cpp | 2 +- .../mode-select-server/mode-select-server.cpp | 2 +- src/app/common/templates/templates.json | 5 ----- src/app/util/attribute-storage.h | 2 +- .../util/ember-compatibility-functions.cpp | 2 +- src/app/util/mock/attribute-storage.cpp | 2 +- .../templates/app/att-storage.zapt | 20 ------------------- src/darwin/Framework/CHIP/MTRIMDispatch.mm | 2 +- 16 files changed, 13 insertions(+), 42 deletions(-) rename {zzz_generated/app-common/app-common/zap-generated => src/app}/att-storage.h (95%) delete mode 100644 src/app/zap-templates/templates/app/att-storage.zapt diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 1a794d80f8c16a..1dd6a389abbba8 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -18,8 +18,8 @@ #include "AllClustersCommandDelegate.h" -#include #include +#include #include #include #include diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 39a4bf381a710b..dcce3f14ad12d5 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -20,9 +20,9 @@ #include "AllClustersCommandDelegate.h" #include "WindowCoveringManager.h" #include "include/tv-callbacks.h" -#include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/linux/main-common.cpp b/examples/all-clusters-minimal-app/linux/main-common.cpp index 43c98dd207f7d9..7ff4635b7ce9ed 100644 --- a/examples/all-clusters-minimal-app/linux/main-common.cpp +++ b/examples/all-clusters-minimal-app/linux/main-common.cpp @@ -17,9 +17,9 @@ */ #include "include/tv-callbacks.h" -#include #include #include +#include #include #include #include diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index e22b3e4cc279c2..49e817dfe5db9f 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -38,9 +38,9 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp index fbb88faa5ef00c..b7fa437127bacb 100644 --- a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp @@ -18,8 +18,8 @@ */ #include "LightingManager.h" -#include #include +#include #include #include diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 4e1275686689b4..6c45055c3933b0 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -18,11 +18,11 @@ #include -#include #include #include #include #include +#include #include #include #include diff --git a/zzz_generated/app-common/app-common/zap-generated/att-storage.h b/src/app/att-storage.h similarity index 95% rename from zzz_generated/app-common/app-common/zap-generated/att-storage.h rename to src/app/att-storage.h index 60559813a3fc99..9befaacf7cc160 100644 --- a/zzz_generated/app-common/app-common/zap-generated/att-storage.h +++ b/src/app/att-storage.h @@ -14,10 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion #pragma once // Cluster masks modify how clusters are used by the framework diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 359176876220a3..6f890fdd747777 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -15,12 +15,12 @@ * limitations under the License. */ -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index f9d2fb6d8ec672..feb0f55733cb55 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -17,11 +17,11 @@ #include "groups-server.h" -#include #include #include #include #include +#include #include #include #include diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index f4aac43abedb25..794662e7b7c1e8 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include #include @@ -23,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index e58894c7644a7f..de1817b98bce43 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -31,11 +31,6 @@ } ], "templates": [ - { - "path": "../../zap-templates/templates/app/att-storage.zapt", - "name": "ZCL att-storage header", - "output": "att-storage.h" - }, { "path": "../../zap-templates/templates/app/attribute-size.zapt", "name": "ZCL attribute-size header", diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 110a74c39edceb..d8617e1837dfd1 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -26,7 +26,7 @@ #include #if !defined(EMBER_SCRIPTED_TEST) -#include +#include #endif #if !defined(ATTRIBUTE_STORAGE_CONFIGURATION) && defined(EMBER_TEST) diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 8cd6b4d52f87ba..d18e284bd6f134 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,6 @@ #include #include -#include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 3c206ffcbd2d03..edda7d6993f7eb 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -28,12 +28,12 @@ * might be fixed with a mock endpoint-config.h */ -#include #include #include #include #include #include +#include #include #include diff --git a/src/app/zap-templates/templates/app/att-storage.zapt b/src/app/zap-templates/templates/app/att-storage.zapt deleted file mode 100644 index a40ab76e0846be..00000000000000 --- a/src/app/zap-templates/templates/app/att-storage.zapt +++ /dev/null @@ -1,20 +0,0 @@ -{{> header}} - -// Prevent multiple inclusion -#pragma once - -// Cluster masks modify how clusters are used by the framework -// -// Does this cluster have init function? -#define CLUSTER_MASK_INIT_FUNCTION (0x01) -// Does this cluster have attribute changed function? -#define CLUSTER_MASK_ATTRIBUTE_CHANGED_FUNCTION (0x02) -// Bits 0x04 and 0x08 are free. -// Does this cluster have shutdown function? -#define CLUSTER_MASK_SHUTDOWN_FUNCTION (0x10) -// Does this cluster have pre-attribute changed function? -#define CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION (0x20) -// Cluster is a server -#define CLUSTER_MASK_SERVER (0x40) -// Cluster is a client -#define CLUSTER_MASK_CLIENT (0x80) diff --git a/src/darwin/Framework/CHIP/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/MTRIMDispatch.mm index 3884d0236960f0..f6276fcfcc3979 100644 --- a/src/darwin/Framework/CHIP/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/MTRIMDispatch.mm @@ -18,7 +18,6 @@ #import #include -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include #include #include #include