From 6dae0bf00ab5bdf7b0f9757e3d9fee2506bc7e33 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 10:52:52 -0400 Subject: [PATCH 01/45] move emberAfLocateAttributeMetadata to attribute-storage.h as it is implemented in attribute-storage.cpp --- src/app/util/af.h | 14 -------------- src/app/util/attribute-storage.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/app/util/af.h b/src/app/util/af.h index f747d50523a5d6..6eb230a0dab0c8 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -36,20 +36,6 @@ static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; -/** - * @brief locate attribute metadata - * - * Function returns pointer to the attribute metadata structure, - * or NULL if attribute was not found. - * - * @param endpoint Zigbee endpoint number. - * @param clusterId Cluster ID of the sought cluster. - * @param attributeId Attribute ID of the sought attribute. - * - * @return Returns pointer to the attribute metadata location. - */ -const EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, - chip::AttributeId attributeId); /** * @brief Returns true if endpoint contains the ZCL server with specified id. * diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 4365366e707f8a..37c8ff4f20cf3c 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -243,3 +243,18 @@ bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrO * implementing AttributeAccessInterface is being destroyed). */ void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * @brief locate attribute metadata + * + * Function returns pointer to the attribute metadata structure, + * or NULL if attribute was not found. + * + * @param endpoint Zigbee endpoint number. + * @param clusterId Cluster ID of the sought cluster. + * @param attributeId Attribute ID of the sought attribute. + * + * @return Returns pointer to the attribute metadata location. + */ +const EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, + chip::AttributeId attributeId); From 152cfe24cffbd04b119d9e87448effbff3b9ca63 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 10:55:26 -0400 Subject: [PATCH 02/45] Move more methods --- src/app/util/af.h | 27 --------------------------- src/app/util/attribute-storage.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/app/util/af.h b/src/app/util/af.h index 6eb230a0dab0c8..567c23817d1f96 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -36,33 +36,6 @@ static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; -/** - * @brief Returns true if endpoint contains the ZCL server with specified id. - * - * This function returns true if - * the endpoint contains server of a given cluster. - */ -bool emberAfContainsServer(chip::EndpointId endpoint, chip::ClusterId clusterId); - -/** - * @brief Returns true if endpoint of given index contains the ZCL server with specified id. - * - * This function returns true if - * the endpoint of given index contains server of a given cluster. - * If this function is used with a manufacturer specific clusterId - * then this will return the first cluster that it finds in the Cluster table. - * and will not return any other clusters that share that id. - */ -bool emberAfContainsServerFromIndex(uint16_t index, chip::ClusterId clusterId); - -/** - * @brief Returns true if endpoint contains the ZCL client with specified id. - * - * This function returns true if - * the endpoint contains client of a given cluster. - */ -bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId); - /** * @brief write an attribute, performing all the checks. * diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 37c8ff4f20cf3c..c6c3d6e0c766a8 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -258,3 +258,30 @@ void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * att */ const EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); + +/** + * @brief Returns true if endpoint contains the ZCL server with specified id. + * + * This function returns true if + * the endpoint contains server of a given cluster. + */ +bool emberAfContainsServer(chip::EndpointId endpoint, chip::ClusterId clusterId); + +/** + * @brief Returns true if endpoint of given index contains the ZCL server with specified id. + * + * This function returns true if + * the endpoint of given index contains server of a given cluster. + * If this function is used with a manufacturer specific clusterId + * then this will return the first cluster that it finds in the Cluster table. + * and will not return any other clusters that share that id. + */ +bool emberAfContainsServerFromIndex(uint16_t index, chip::ClusterId clusterId); + +/** + * @brief Returns true if endpoint contains the ZCL client with specified id. + * + * This function returns true if + * the endpoint contains client of a given cluster. + */ +bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId); From 5fdee6fcee0d946606c21a637ed5046431db9812 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 10:56:38 -0400 Subject: [PATCH 03/45] Global endpoints extern should not exist --- src/app/util/af.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/util/af.h b/src/app/util/af.h index 567c23817d1f96..170923f23f7eb3 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -79,11 +79,6 @@ chip::Protocols::InteractionModel::Status emberAfReadAttribute(chip::EndpointId */ #define emberAfAttributeSize(metadata) ((metadata)->size) -#if !defined(DOXYGEN_SHOULD_SKIP_THIS) -// master array of all defined endpoints -extern EmberAfDefinedEndpoint emAfEndpoints[]; -#endif - /** * @brief Returns parent endpoint for a given endpoint index */ From 65427e9f97b18299d07f068a949d627d6724e5dd Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 11:46:37 -0400 Subject: [PATCH 04/45] move more things --- .../linux/AllClustersCommandDelegate.cpp | 1 + .../diagnostic-logs-server.cpp | 2 +- .../low-power-server/low-power-server.cpp | 2 +- src/app/reporting/reporting.cpp | 2 +- src/app/util/af.h | 143 ------------------ src/app/util/attribute-storage.h | 136 +++++++++++++++++ 6 files changed, 140 insertions(+), 146 deletions(-) diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index d1bab3649f0b67..5357a861a71066 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp index 83beb46484bb71..8744582c35becd 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp @@ -17,7 +17,7 @@ #include -#include +#include #include #include #include diff --git a/src/app/clusters/low-power-server/low-power-server.cpp b/src/app/clusters/low-power-server/low-power-server.cpp index fab5217908afea..76f7e6dc7415d2 100644 --- a/src/app/clusters/low-power-server/low-power-server.cpp +++ b/src/app/clusters/low-power-server/low-power-server.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/app/reporting/reporting.cpp b/src/app/reporting/reporting.cpp index 8ed06a8e13c857..0ee0ca954aaf6c 100644 --- a/src/app/reporting/reporting.cpp +++ b/src/app/reporting/reporting.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include using namespace chip; diff --git a/src/app/util/af.h b/src/app/util/af.h index 170923f23f7eb3..c5201761ccf1eb 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -31,9 +31,6 @@ #include #include -/** @name Attribute Storage */ -// @{ - static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; /** @@ -71,143 +68,3 @@ chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId chip::Protocols::InteractionModel::Status emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength); - -/** - * @brief macro that returns size of attribute in bytes. - * - * @param metadata EmberAfAttributeMetadata* to consider. - */ -#define emberAfAttributeSize(metadata) ((metadata)->size) - -/** - * @brief Returns parent endpoint for a given endpoint index - */ -chip::EndpointId emberAfParentEndpointFromIndex(uint16_t index); - -/** - * Returns the index of a given endpoint. Will return 0xFFFF if this is not a - * valid endpoint id or if the endpoint is disabled. - */ -uint16_t emberAfIndexFromEndpoint(chip::EndpointId endpoint); - -/** - * @brief Returns the index of the given endpoint in the list of all endpoints that might support the given cluster server. - * - * Returns kEmberInvalidEndpointIndex if the given endpoint does not support the - * given cluster or if the given endpoint is disabled. - * - * This function always returns the same index for a given endpointId instance, fixed or dynamic. - * - * The return index for fixed endpoints will range from 0 to (fixedClusterServerEndpointCount - 1), - * For dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting - * the given server cluster and their index will range from fixedClusterServerEndpointCount to - * (fixedClusterServerEndpointCount + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT - 1). - * - * For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic - * endpoints, and cluster X is supported on endpoints 1 and 3, then - * fixedClusterServerEndpointCount should be 2 and - * - * 1) emberAfGetClusterServerEndpointIndex(0, X) returns kEmberInvalidEndpointIndex - * 2) emberAfGetClusterServerEndpointIndex(1, X) returns 0 - * 3) emberAfGetClusterServerEndpointIndex(2, X) returns kEmberInvalidEndpointIndex - * 4) emberAfGetClusterServerEndpointIndex(3, X) returns 1 - - * The Dynamic endpoints are placed after the fixed ones; - * therefore their return index will always be >= to fixedClusterServerEndpointCount - * - * If a dynamic endpoint, supporting cluster X, is defined to dynamic index 1 with endpoint id 7, - * (via emberAfSetDynamicEndpoint(1, 7, ...)) - * then emberAfGetClusterServerEndpointIndex(7, X) returns 3 (fixedClusterServerEndpointCount{2} + DynamicEndpointIndex {1}). - * - * If now a second dynamic endpoint, also supporting cluster X, is defined to dynamic index 0 - * with endpoint id 9 (via emberAfSetDynamicEndpoint(0, 9, ...)), - * emberAfGetClusterServerEndpointIndex(9, X) returns 2. (fixedClusterServerEndpointCount{2} + DynamicEndpointIndex {0}). - * and emberAfGetClusterServerEndpointIndex(7, X) still returns 3 - * - * @param endpoint Endpoint number - * @param cluster Id the of the Cluster server you are interrested on - * @param fixedClusterServerEndpointCount The number of fixed endpoints containing this cluster server. Typically one of the - MATTER_DM_*_CLUSTER_SERVER_ENDPOINT_COUNT constants. - */ -uint16_t emberAfGetClusterServerEndpointIndex(chip::EndpointId endpoint, chip::ClusterId cluster, - uint16_t fixedClusterServerEndpointCount); - -/** - * @brief Returns the number of pre-compiled endpoints. - */ -uint16_t emberAfFixedEndpointCount(void); - -/** @} END Attribute Storage */ - -/** @} END addtogroup */ - -/** - * Returns the pointer to the data version storage for the given endpoint and - * cluster. Can return null in the following cases: - * - * 1) There is no such endpoint. - * 2) There is no such server cluster on the given endpoint. - * 3) No storage for a data version was provided for the endpoint. - */ -chip::DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & aConcreteClusterPath); - -namespace chip { -namespace app { - -class EnabledEndpointsWithServerCluster -{ -public: - EnabledEndpointsWithServerCluster(ClusterId clusterId); - - // Instead of having a separate Iterator class, optimize for codesize by - // just reusing ourselves as our own iterator. We could do a bit better - // here with C++17 and using a different type for the end iterator, but this - // is the best I've found with C++14 so far. - // - // This does mean that you can only iterate a given - // EnabledEndpointsWithServerCluster once, but that's OK given how we use it - // in practice. - EnabledEndpointsWithServerCluster & begin() { return *this; } - const EnabledEndpointsWithServerCluster & end() const { return *this; } - - bool operator!=(const EnabledEndpointsWithServerCluster & other) const { return mEndpointIndex != mEndpointCount; } - - EnabledEndpointsWithServerCluster & operator++(); - - EndpointId operator*() const { return emberAfEndpointFromIndex(mEndpointIndex); } - -private: - void EnsureMatchingEndpoint(); - - uint16_t mEndpointIndex = 0; - uint16_t mEndpointCount = emberAfEndpointCount(); - ClusterId mClusterId; -}; - -/** - * @brief Sets the parent endpoint for a given endpoint - */ -CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint); - -/** - * @brief Sets an Endpoint to use Flat Composition - */ -CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint); - -/** - * @brief Sets an Endpoint to use Tree Composition - */ -CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint); - -/** - * @brief Returns true is an Endpoint has flat composition - */ -bool IsFlatCompositionForEndpoint(EndpointId endpoint); - -/** - * @brief Returns true is an Endpoint has tree composition - */ -bool IsTreeCompositionForEndpoint(EndpointId endpoint); - -} // namespace app -} // namespace chip diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index c6c3d6e0c766a8..39d00f7784385a 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -285,3 +285,139 @@ bool emberAfContainsServerFromIndex(uint16_t index, chip::ClusterId clusterId); * the endpoint contains client of a given cluster. */ bool emberAfContainsClient(chip::EndpointId endpoint, chip::ClusterId clusterId); + +/** + * @brief macro that returns size of attribute in bytes. + * + * @param metadata EmberAfAttributeMetadata* to consider. + */ +#define emberAfAttributeSize(metadata) ((metadata)->size) + +/** + * Returns the index of a given endpoint. Will return 0xFFFF if this is not a + * valid endpoint id or if the endpoint is disabled. + */ +uint16_t emberAfIndexFromEndpoint(chip::EndpointId endpoint); + +/** + * @brief Returns parent endpoint for a given endpoint index + */ +chip::EndpointId emberAfParentEndpointFromIndex(uint16_t index); + +/** + * @brief Returns the index of the given endpoint in the list of all endpoints that might support the given cluster server. + * + * Returns kEmberInvalidEndpointIndex if the given endpoint does not support the + * given cluster or if the given endpoint is disabled. + * + * This function always returns the same index for a given endpointId instance, fixed or dynamic. + * + * The return index for fixed endpoints will range from 0 to (fixedClusterServerEndpointCount - 1), + * For dynamic endpoints the indexing assumes that any dynamic endpoint could start supporting + * the given server cluster and their index will range from fixedClusterServerEndpointCount to + * (fixedClusterServerEndpointCount + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT - 1). + * + * For example, if a device has 4 fixed endpoints (ids 0-3) and 2 dynamic + * endpoints, and cluster X is supported on endpoints 1 and 3, then + * fixedClusterServerEndpointCount should be 2 and + * + * 1) emberAfGetClusterServerEndpointIndex(0, X) returns kEmberInvalidEndpointIndex + * 2) emberAfGetClusterServerEndpointIndex(1, X) returns 0 + * 3) emberAfGetClusterServerEndpointIndex(2, X) returns kEmberInvalidEndpointIndex + * 4) emberAfGetClusterServerEndpointIndex(3, X) returns 1 + + * The Dynamic endpoints are placed after the fixed ones; + * therefore their return index will always be >= to fixedClusterServerEndpointCount + * + * If a dynamic endpoint, supporting cluster X, is defined to dynamic index 1 with endpoint id 7, + * (via emberAfSetDynamicEndpoint(1, 7, ...)) + * then emberAfGetClusterServerEndpointIndex(7, X) returns 3 (fixedClusterServerEndpointCount{2} + DynamicEndpointIndex {1}). + * + * If now a second dynamic endpoint, also supporting cluster X, is defined to dynamic index 0 + * with endpoint id 9 (via emberAfSetDynamicEndpoint(0, 9, ...)), + * emberAfGetClusterServerEndpointIndex(9, X) returns 2. (fixedClusterServerEndpointCount{2} + DynamicEndpointIndex {0}). + * and emberAfGetClusterServerEndpointIndex(7, X) still returns 3 + * + * @param endpoint Endpoint number + * @param cluster Id the of the Cluster server you are interrested on + * @param fixedClusterServerEndpointCount The number of fixed endpoints containing this cluster server. Typically one of the + MATTER_DM_*_CLUSTER_SERVER_ENDPOINT_COUNT constants. + */ +uint16_t emberAfGetClusterServerEndpointIndex(chip::EndpointId endpoint, chip::ClusterId cluster, + uint16_t fixedClusterServerEndpointCount); + +/** + * Returns the pointer to the data version storage for the given endpoint and + * cluster. Can return null in the following cases: + * + * 1) There is no such endpoint. + * 2) There is no such server cluster on the given endpoint. + * 3) No storage for a data version was provided for the endpoint. + */ +chip::DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & aConcreteClusterPath); + +/** + * @brief Returns the number of pre-compiled endpoints. + */ +uint16_t emberAfFixedEndpointCount(); + +namespace chip { +namespace app { + +class EnabledEndpointsWithServerCluster +{ +public: + EnabledEndpointsWithServerCluster(ClusterId clusterId); + + // Instead of having a separate Iterator class, optimize for codesize by + // just reusing ourselves as our own iterator. We could do a bit better + // here with C++17 and using a different type for the end iterator, but this + // is the best I've found with C++14 so far. + // + // This does mean that you can only iterate a given + // EnabledEndpointsWithServerCluster once, but that's OK given how we use it + // in practice. + EnabledEndpointsWithServerCluster & begin() { return *this; } + const EnabledEndpointsWithServerCluster & end() const { return *this; } + + bool operator!=(const EnabledEndpointsWithServerCluster & other) const { return mEndpointIndex != mEndpointCount; } + + EnabledEndpointsWithServerCluster & operator++(); + + EndpointId operator*() const { return emberAfEndpointFromIndex(mEndpointIndex); } + +private: + void EnsureMatchingEndpoint(); + + uint16_t mEndpointIndex = 0; + uint16_t mEndpointCount = emberAfEndpointCount(); + ClusterId mClusterId; +}; + +/** + * @brief Sets the parent endpoint for a given endpoint + */ +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint); + +/** + * @brief Sets an Endpoint to use Flat Composition + */ +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Sets an Endpoint to use Tree Composition + */ +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has flat composition + */ +bool IsFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has tree composition + */ +bool IsTreeCompositionForEndpoint(EndpointId endpoint); + +} // namespace app +} // namespace chip From 22b3b06266b3a0656e9814f2336d36397395f76d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 11:55:42 -0400 Subject: [PATCH 05/45] restyle --- examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 5357a861a71066..4450a48e648e3c 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include #include #include From cdde329b44947448d41e771a369708992e84704a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:13:56 -0400 Subject: [PATCH 06/45] Move the last bits from af.h into the corresponding headers. Remove af.h (this will cause compile issues) --- src/app/util/af.h | 70 -------------------------------- src/app/util/attribute-storage.h | 2 + src/app/util/attribute-table.h | 35 ++++++++++++++++ 3 files changed, 37 insertions(+), 70 deletions(-) delete mode 100644 src/app/util/af.h diff --git a/src/app/util/af.h b/src/app/util/af.h deleted file mode 100644 index c5201761ccf1eb..00000000000000 --- a/src/app/util/af.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * - * Copyright (c) 2020-2021 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. - */ - -#pragma once - -#ifndef CONFIGURATION_HEADER -#define CONFIGURATION_HEADER -#endif -#include CONFIGURATION_HEADER - -#include - -#include - -#include -#include -#include -#include - -static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; - -/** - * @brief write an attribute, performing all the checks. - * - * This function will attempt to write the attribute value from - * the provided pointer. This function will only check that the - * attribute exists. If it does it will write the value into - * the attribute table for the given attribute. - * - * This function will not check to see if the attribute is - * writable since the read only / writable characteristic - * of an attribute only pertains to external devices writing - * over the air. Because this function is being called locally - * it assumes that the device knows what it is doing and has permission - * to perform the given operation. - * - * This function also does NOT check that the input dataType matches the expected - * data type (as Accessors.h/cpp have this correct by default). - * TODO: this not checking seems off - what if this is run without Accessors.h ? - */ -chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType); - -/** - * @brief Read the attribute value, performing all the checks. - * - * This function will attempt to read the attribute and store it into the - * pointer. - * - * dataPtr may be NULL, signifying that we don't need the value, just the status - * (i.e. whether the attribute can be read). - */ -chip::Protocols::InteractionModel::Status emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * dataPtr, - uint16_t readLength); diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 39d00f7784385a..c09cbe0cdeea2b 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -30,6 +30,8 @@ #include +static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; + // If we have fixed number of endpoints, then max is the same. #ifdef FIXED_ENDPOINT_COUNT #define MAX_ENDPOINT_COUNT (FIXED_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 7b86298209326f..5ccb8c8ad89902 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -64,3 +64,38 @@ chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(chip::Endpo chip::Protocols::InteractionModel::Status emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * data, EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType); +/** + * @brief write an attribute, performing all the checks. + * + * This function will attempt to write the attribute value from + * the provided pointer. This function will only check that the + * attribute exists. If it does it will write the value into + * the attribute table for the given attribute. + * + * This function will not check to see if the attribute is + * writable since the read only / writable characteristic + * of an attribute only pertains to external devices writing + * over the air. Because this function is being called locally + * it assumes that the device knows what it is doing and has permission + * to perform the given operation. + * + * This function also does NOT check that the input dataType matches the expected + * data type (as Accessors.h/cpp have this correct by default). + * TODO: this not checking seems off - what if this is run without Accessors.h ? + */ +chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeID, uint8_t * dataPtr, + EmberAfAttributeType dataType); + +/** + * @brief Read the attribute value, performing all the checks. + * + * This function will attempt to read the attribute and store it into the + * pointer. + * + * dataPtr may be NULL, signifying that we don't need the value, just the status + * (i.e. whether the attribute can be read). + */ +chip::Protocols::InteractionModel::Status emberAfReadAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeID, uint8_t * dataPtr, + uint16_t readLength); From 5786bcef85c8bdf65c75534c975fbc059d92d90b Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:18:23 -0400 Subject: [PATCH 07/45] Remove all references to af.h --- examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/air-purifier-app/ameba/main/chipinterface.cpp | 1 - examples/air-purifier-app/linux/main.cpp | 1 - examples/air-quality-sensor-app/linux/main.cpp | 1 - .../all-clusters-common/include/dishwasher-mode.h | 1 - .../include/laundry-dryer-controls-delegate-impl.h | 1 - .../include/laundry-washer-controls-delegate-impl.h | 1 - .../all-clusters-common/include/laundry-washer-mode.h | 1 - .../all-clusters-common/include/microwave-oven-mode.h | 1 - .../all-clusters-app/all-clusters-common/include/oven-modes.h | 1 - .../all-clusters-app/all-clusters-common/include/rvc-modes.h | 1 - .../all-clusters-common/include/static-supported-modes-manager.h | 1 - .../include/static-supported-temperature-levels.h | 1 - examples/all-clusters-app/all-clusters-common/include/tcc-mode.h | 1 - examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/all-clusters-app/ameba/main/chipinterface.cpp | 1 - examples/all-clusters-app/asr/src/DeviceCallbacks.cpp | 1 - examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp | 1 - examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp | 1 - examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp | 1 - examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp | 1 - examples/all-clusters-app/esp32/main/main.cpp | 1 - examples/all-clusters-app/linux/main-common.cpp | 1 - examples/all-clusters-app/nxp/common/main/ZclCallbacks.cpp | 1 - examples/all-clusters-app/tizen/src/main.cpp | 1 - examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp | 1 - examples/all-clusters-minimal-app/asr/src/DeviceCallbacks.cpp | 1 - examples/all-clusters-minimal-app/esp32/main/main.cpp | 1 - examples/all-clusters-minimal-app/linux/main-common.cpp | 1 - examples/all-clusters-minimal-app/tizen/src/main.cpp | 1 - examples/bridge-app/asr/src/DeviceCallbacks.cpp | 1 - examples/bridge-app/linux/main.cpp | 1 - examples/chef/ameba/main/DeviceCallbacks.cpp | 1 - examples/chef/ameba/main/chipinterface.cpp | 1 - .../chef/common/chef-laundry-washer-controls-delegate-impl.h | 1 - examples/chef/common/chef-laundry-washer-mode.h | 1 - examples/chef/common/chef-rvc-mode-delegate.h | 1 - examples/chef/common/clusters/door-lock/chef-doorlock-stubs.cpp | 1 - examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp | 1 - examples/chef/common/clusters/door-lock/chef-lock-manager.cpp | 1 - examples/chef/common/clusters/door-lock/chef-lock-manager.h | 1 - examples/chef/esp32/main/main.cpp | 1 - examples/contact-sensor-app/linux/main.cpp | 1 - examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp | 1 - examples/contact-sensor-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp | 1 - examples/dishwasher-app/asr/src/DeviceCallbacks.cpp | 1 - .../include/DeviceEnergyManagementDelegateImpl.h | 1 - .../energy-management-common/include/EnergyEvseDelegateImpl.h | 1 - .../include/device-energy-management-modes.h | 1 - .../energy-management-common/include/energy-evse-modes.h | 1 - examples/laundry-washer-app/nxp/common/main/ZclCallbacks.cpp | 1 - examples/light-switch-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/light-switch-app/ameba/main/chipinterface.cpp | 1 - examples/light-switch-app/asr/src/DeviceCallbacks.cpp | 1 - examples/lighting-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/lighting-app/ameba/main/chipinterface.cpp | 1 - examples/lighting-app/asr/src/DeviceCallbacks.cpp | 1 - examples/lighting-app/beken/main/DeviceCallbacks.cpp | 1 - examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp | 1 - examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp | 1 - examples/lighting-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp | 1 - examples/lock-app/asr/src/DeviceCallbacks.cpp | 1 - examples/lock-app/lock-common/include/LockManager.h | 1 - examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp | 1 - .../ota-provider-app/ota-provider-common/OTAProviderExample.cpp | 1 - examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp | 1 - examples/ota-requestor-app/ameba/main/chipinterface.cpp | 1 - examples/ota-requestor-app/asr/src/DeviceCallbacks.cpp | 1 - examples/ota-requestor-app/esp32/main/main.cpp | 1 - examples/ota-requestor-app/linux/main.cpp | 1 - .../placeholder/linux/include/static-supported-modes-manager.h | 1 - .../linux/include/static-supported-temperature-levels.h | 1 - .../platform/esp32/mode-support/static-supported-modes-manager.h | 1 - examples/platform/openiotsdk/app/openiotsdk_platform.cpp | 1 - examples/platform/silabs/SoftwareFaultReports.cpp | 1 - examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp | 1 - examples/pump-app/cc13x4_26x4/main/AppTask.cpp | 1 - examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp | 1 - examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp | 1 - examples/refrigerator-app/asr/src/DeviceCallbacks.cpp | 1 - .../include/static-supported-temperature-levels.h | 1 - examples/rvc-app/rvc-common/include/rvc-mode-delegates.h | 1 - examples/shell/shell_common/cmd_server.cpp | 1 - examples/thermostat/linux/main.cpp | 1 - examples/thermostat/nxp/common/main/ZclCallbacks.cpp | 1 - .../tv-app/android/include/account-login/AccountLoginManager.cpp | 1 - examples/tv-app/android/java/AppImpl.cpp | 1 - examples/tv-app/android/java/DeviceCallbacks.cpp | 1 - examples/tv-app/android/java/LevelManager.cpp | 1 - examples/tv-app/android/java/OnOffManager.cpp | 1 - examples/tv-app/linux/main.cpp | 1 - .../tv-common/clusters/account-login/AccountLoginManager.cpp | 1 - examples/tv-app/tv-common/src/AppTv.cpp | 1 - examples/virtual-device-app/android/java/ColorControlManager.cpp | 1 - examples/virtual-device-app/android/java/DoorLockManager.cpp | 1 - examples/virtual-device-app/android/java/OnOffManager.cpp | 1 - examples/virtual-device-app/android/java/PowerSourceManager.cpp | 1 - examples/window-app/common/src/WindowApp.cpp | 1 - examples/window-app/common/src/ZclCallbacks.cpp | 1 - examples/window-app/nrfconnect/main/WindowCovering.cpp | 1 - examples/window-app/nrfconnect/main/ZclCallbacks.cpp | 1 - examples/window-app/silabs/src/WindowManager.cpp | 1 - examples/window-app/silabs/src/ZclCallbacks.cpp | 1 - examples/window-app/telink/src/WindowCovering.cpp | 1 - src/app/CommandResponseHelper.h | 1 - src/app/clusters/access-control-server/access-control-server.cpp | 1 - src/app/clusters/account-login-server/account-login-delegate.h | 1 - src/app/clusters/account-login-server/account-login-server.cpp | 1 - .../administrator-commissioning-server.cpp | 1 - .../application-basic-server/application-basic-delegate.h | 1 - .../application-launcher-server/application-launcher-delegate.h | 1 - src/app/clusters/audio-output-server/audio-output-delegate.h | 1 - .../clusters/barrier-control-server/barrier-control-server.cpp | 1 - src/app/clusters/bindings/bindings.cpp | 1 - src/app/clusters/channel-server/channel-delegate.h | 1 - src/app/clusters/color-control-server/color-control-server.cpp | 1 - src/app/clusters/color-control-server/color-control-server.h | 1 - .../concentration-measurement-server.h | 1 - .../content-app-observer/content-app-observer-delegate.h | 1 - src/app/clusters/content-app-observer/content-app-observer.cpp | 1 - .../clusters/content-control-server/content-control-delegate.h | 1 - .../clusters/content-control-server/content-control-server.cpp | 1 - src/app/clusters/content-launch-server/content-launch-delegate.h | 1 - src/app/clusters/content-launch-server/content-launch-server.cpp | 1 - .../clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h | 1 - src/app/clusters/door-lock-server/door-lock-server-callback.cpp | 1 - src/app/clusters/door-lock-server/door-lock-server.cpp | 1 - src/app/clusters/door-lock-server/door-lock-server.h | 1 - .../ethernet-network-diagnostics-server.cpp | 1 - src/app/clusters/fan-control-server/fan-control-delegate.h | 1 - .../clusters/fault-injection-server/fault-injection-server.cpp | 1 - .../general-commissioning-server.cpp | 1 - .../general-diagnostics-server/general-diagnostics-server.h | 1 - src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp | 1 - src/app/clusters/groups-server/groups-server.cpp | 1 - src/app/clusters/icd-management-server/icd-management-server.cpp | 1 - src/app/clusters/identify-server/identify-server.cpp | 1 - src/app/clusters/keypad-input-server/keypad-input-delegate.h | 1 - src/app/clusters/keypad-input-server/keypad-input-server.cpp | 1 - .../laundry-dryer-controls-server.cpp | 1 - .../laundry-dryer-controls-server.h | 1 - .../laundry-washer-controls-server.cpp | 1 - .../laundry-washer-controls-server.h | 1 - src/app/clusters/level-control/level-control.cpp | 1 - src/app/clusters/media-input-server/media-input-delegate.h | 1 - src/app/clusters/media-playback-server/media-playback-delegate.h | 1 - src/app/clusters/messages-server/messages-delegate.h | 1 - src/app/clusters/mode-base-server/mode-base-server.h | 1 - src/app/clusters/mode-select-server/mode-select-server.cpp | 1 - .../clusters/occupancy-sensor-server/occupancy-sensor-server.cpp | 1 - src/app/clusters/on-off-server/on-off-server.cpp | 1 - .../operational-credentials-server.cpp | 1 - .../clusters/operational-state-server/operational-state-server.h | 1 - src/app/clusters/ota-provider/ota-provider-delegate.h | 1 - src/app/clusters/ota-provider/ota-provider.cpp | 1 - src/app/clusters/power-source-server/power-source-server.cpp | 1 - .../pump-configuration-and-control-client.cpp | 1 - .../pump-configuration-and-control-server.cpp | 1 - .../resource-monitoring-server/resource-monitoring-server.cpp | 1 - src/app/clusters/sample-mei-server/sample-mei-server.cpp | 1 - src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h | 1 - .../software-diagnostics-server/software-diagnostics-server.cpp | 1 - src/app/clusters/switch-server/switch-server.cpp | 1 - src/app/clusters/switch-server/switch-server.h | 1 - .../clusters/target-navigator-server/target-navigator-delegate.h | 1 - src/app/clusters/thermostat-client/thermostat-client.cpp | 1 - src/app/clusters/thermostat-server/thermostat-server.cpp | 1 - .../thermostat-user-interface-configuration-server.cpp | 1 - .../thread-network-diagnostics-server.cpp | 1 - .../wifi-network-diagnostics-server.cpp | 1 - .../clusters/window-covering-server/window-covering-delegate.h | 1 - .../clusters/window-covering-server/window-covering-server.cpp | 1 - src/app/tests/TestPowerSourceCluster.cpp | 1 - src/app/util/attribute-storage.cpp | 1 - src/app/util/attribute-storage.h | 1 - src/app/util/attribute-table.h | 1 - src/app/util/ember-compatibility-functions.cpp | 1 - src/app/util/mock/MockNodeConfig.cpp | 1 - src/app/util/mock/attribute-storage.cpp | 1 - src/app/util/util.cpp | 1 - .../zap-templates/templates/app/attributes/Accessors-src.zapt | 1 - src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm | 1 - .../app-common/app-common/zap-generated/attributes/Accessors.cpp | 1 - 184 files changed, 184 deletions(-) diff --git a/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp b/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp index 42551f7cb40579..deb3731f1b25d4 100644 --- a/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/air-purifier-app/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/air-purifier-app/ameba/main/chipinterface.cpp b/examples/air-purifier-app/ameba/main/chipinterface.cpp index 264ad532b513aa..1362ab0ea8c4ca 100644 --- a/examples/air-purifier-app/ameba/main/chipinterface.cpp +++ b/examples/air-purifier-app/ameba/main/chipinterface.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/air-purifier-app/linux/main.cpp b/examples/air-purifier-app/linux/main.cpp index 98d8d405cfadfb..0335ebcaac3bba 100644 --- a/examples/air-purifier-app/linux/main.cpp +++ b/examples/air-purifier-app/linux/main.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #define AIR_PURIFIER_ENDPOINT 1 diff --git a/examples/air-quality-sensor-app/linux/main.cpp b/examples/air-quality-sensor-app/linux/main.cpp index 9dee0c20982f0a..d8fcbffd0262cc 100644 --- a/examples/air-quality-sensor-app/linux/main.cpp +++ b/examples/air-quality-sensor-app/linux/main.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED diff --git a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h index 604496f886b3c2..2ff1696e9378cc 100644 --- a/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-dryer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-dryer-controls-delegate-impl.h index 898cf8806f4111..920d7030c2aa78 100644 --- a/examples/all-clusters-app/all-clusters-common/include/laundry-dryer-controls-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-dryer-controls-delegate-impl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h index 15a72482726ba0..f9d3d1bf8c7bdf 100644 --- a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h index 2f59b0dfd04bab..5d35c03d4e50cd 100644 --- a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-mode.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/microwave-oven-mode.h b/examples/all-clusters-app/all-clusters-common/include/microwave-oven-mode.h index dd5d5b4bcaf2eb..df06d23a7dc5d7 100644 --- a/examples/all-clusters-app/all-clusters-common/include/microwave-oven-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/microwave-oven-mode.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/oven-modes.h b/examples/all-clusters-app/all-clusters-common/include/oven-modes.h index 7e264a4c47e272..2c58229ef6e541 100644 --- a/examples/all-clusters-app/all-clusters-common/include/oven-modes.h +++ b/examples/all-clusters-app/all-clusters-common/include/oven-modes.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h index 8af4aa5f6f9155..8449878260f053 100644 --- a/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-modes.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/static-supported-modes-manager.h b/examples/all-clusters-app/all-clusters-common/include/static-supported-modes-manager.h index ef90de38697f4c..b4ce50b8cd49a3 100644 --- a/examples/all-clusters-app/all-clusters-common/include/static-supported-modes-manager.h +++ b/examples/all-clusters-app/all-clusters-common/include/static-supported-modes-manager.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/include/static-supported-temperature-levels.h b/examples/all-clusters-app/all-clusters-common/include/static-supported-temperature-levels.h index 3fdce87e109317..9698df8c094cc8 100644 --- a/examples/all-clusters-app/all-clusters-common/include/static-supported-temperature-levels.h +++ b/examples/all-clusters-app/all-clusters-common/include/static-supported-temperature-levels.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h b/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h index dcd9024e8d0385..8d8cdb02962d68 100644 --- a/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h +++ b/examples/all-clusters-app/all-clusters-common/include/tcc-mode.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp index 338a469bb32947..ef4a733dde4339 100644 --- a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index c9547136035f81..64afacec480911 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/asr/src/DeviceCallbacks.cpp b/examples/all-clusters-app/asr/src/DeviceCallbacks.cpp index cc48488fd7e3ca..459b3e9921799f 100644 --- a/examples/all-clusters-app/asr/src/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/asr/src/DeviceCallbacks.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp index b6b9bf1e8bd8f4..f506539393ca72 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -21,7 +21,6 @@ #include "AppConfig.h" #include "AppEvent.h" #include -#include #include "FreeRTOS.h" #include "Globals.h" diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp index ba3f7bd1c205f8..f2668eca426677 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include using namespace ::chip; diff --git a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp index f82436346fc241..4a136f1b83e8e4 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp @@ -20,7 +20,6 @@ #include "AppConfig.h" #include "AppEvent.h" #include -#include #include "FreeRTOS.h" #include "Globals.h" diff --git a/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp b/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp index 09505504315cad..b21e2ad4c1b9f0 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp +++ b/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include using namespace ::chip; diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index a3af54f3a22e06..e38c2113082094 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -34,7 +34,6 @@ #include "platform/PlatformManager.h" #include "shell_extension/launch.h" #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 8760bcb92d456c..d2d140e05896c6 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-app/nxp/common/main/ZclCallbacks.cpp b/examples/all-clusters-app/nxp/common/main/ZclCallbacks.cpp index 86ea10f4687558..d4be6f1eb89a8c 100644 --- a/examples/all-clusters-app/nxp/common/main/ZclCallbacks.cpp +++ b/examples/all-clusters-app/nxp/common/main/ZclCallbacks.cpp @@ -25,7 +25,6 @@ #include #include #include -#include using namespace ::chip; diff --git a/examples/all-clusters-app/tizen/src/main.cpp b/examples/all-clusters-app/tizen/src/main.cpp index e3e8aa736846fc..8695225f552992 100644 --- a/examples/all-clusters-app/tizen/src/main.cpp +++ b/examples/all-clusters-app/tizen/src/main.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp index 67b13d9abb9506..a02dd619100928 100644 --- a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp index bc297dfa3d426b..9acb21d22ba165 100644 --- a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/asr/src/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/asr/src/DeviceCallbacks.cpp index 89266592872d3e..c40de8c006e1fc 100644 --- a/examples/all-clusters-minimal-app/asr/src/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/asr/src/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index 0ac538607efd89..4393cc5fc67cfe 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -36,7 +36,6 @@ #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 d9f0a51cd747cf..f0bf3cafe8553c 100644 --- a/examples/all-clusters-minimal-app/linux/main-common.cpp +++ b/examples/all-clusters-minimal-app/linux/main-common.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp index 327623911831bb..1562e1848ae2b9 100644 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ b/examples/all-clusters-minimal-app/tizen/src/main.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/examples/bridge-app/asr/src/DeviceCallbacks.cpp b/examples/bridge-app/asr/src/DeviceCallbacks.cpp index f16b4c956c8022..232e22799e7b65 100644 --- a/examples/bridge-app/asr/src/DeviceCallbacks.cpp +++ b/examples/bridge-app/asr/src/DeviceCallbacks.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index c569e7c06e8b45..ee59d310f057fa 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/chef/ameba/main/DeviceCallbacks.cpp b/examples/chef/ameba/main/DeviceCallbacks.cpp index fd8a63e5a846c4..90c783a8578f33 100644 --- a/examples/chef/ameba/main/DeviceCallbacks.cpp +++ b/examples/chef/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/chef/ameba/main/chipinterface.cpp b/examples/chef/ameba/main/chipinterface.cpp index ad9946ef5a3719..3645f781341fa7 100644 --- a/examples/chef/ameba/main/chipinterface.cpp +++ b/examples/chef/ameba/main/chipinterface.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/chef/common/chef-laundry-washer-controls-delegate-impl.h b/examples/chef/common/chef-laundry-washer-controls-delegate-impl.h index 15a72482726ba0..f9d3d1bf8c7bdf 100644 --- a/examples/chef/common/chef-laundry-washer-controls-delegate-impl.h +++ b/examples/chef/common/chef-laundry-washer-controls-delegate-impl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/examples/chef/common/chef-laundry-washer-mode.h b/examples/chef/common/chef-laundry-washer-mode.h index 2f59b0dfd04bab..5d35c03d4e50cd 100644 --- a/examples/chef/common/chef-laundry-washer-mode.h +++ b/examples/chef/common/chef-laundry-washer-mode.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/chef/common/chef-rvc-mode-delegate.h b/examples/chef/common/chef-rvc-mode-delegate.h index 3b08552776319a..5f96957420a441 100644 --- a/examples/chef/common/chef-rvc-mode-delegate.h +++ b/examples/chef/common/chef-rvc-mode-delegate.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/chef/common/clusters/door-lock/chef-doorlock-stubs.cpp b/examples/chef/common/clusters/door-lock/chef-doorlock-stubs.cpp index 7d92300ca5659c..90b9fd017b0a01 100644 --- a/examples/chef/common/clusters/door-lock/chef-doorlock-stubs.cpp +++ b/examples/chef/common/clusters/door-lock/chef-doorlock-stubs.cpp @@ -17,7 +17,6 @@ */ #include -#include #include #ifdef MATTER_DM_PLUGIN_DOOR_LOCK_SERVER diff --git a/examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp b/examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp index 4770a9ce6e3c4b..c7fe5696d9ba74 100644 --- a/examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp +++ b/examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp @@ -17,7 +17,6 @@ */ #include -#include #include #include #include diff --git a/examples/chef/common/clusters/door-lock/chef-lock-manager.cpp b/examples/chef/common/clusters/door-lock/chef-lock-manager.cpp index 0b81cce895b264..b6c3f7a4a35090 100644 --- a/examples/chef/common/clusters/door-lock/chef-lock-manager.cpp +++ b/examples/chef/common/clusters/door-lock/chef-lock-manager.cpp @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include #include #include diff --git a/examples/chef/common/clusters/door-lock/chef-lock-manager.h b/examples/chef/common/clusters/door-lock/chef-lock-manager.h index 709f13c1addc66..495ed0f890d434 100644 --- a/examples/chef/common/clusters/door-lock/chef-lock-manager.h +++ b/examples/chef/common/clusters/door-lock/chef-lock-manager.h @@ -22,7 +22,6 @@ #include #include -#include class LockManager { diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index 3744cacc225ef8..c5f29dc0f847d8 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/examples/contact-sensor-app/linux/main.cpp b/examples/contact-sensor-app/linux/main.cpp index 0b520bdd538e04..f1d2889c724377 100644 --- a/examples/contact-sensor-app/linux/main.cpp +++ b/examples/contact-sensor-app/linux/main.cpp @@ -17,7 +17,6 @@ */ #include -#include #include #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp index fafcb37290aab8..2a38dd8d1c84e2 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp @@ -27,7 +27,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app; diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp b/examples/contact-sensor-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp index 5937d134194c30..e69daab9803d23 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #if CONFIG_DIAG_LOGS_DEMO #include "DiagnosticLogsProviderDelegateImpl.h" diff --git a/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp b/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp index 23e6de9a118b03..9f9e7fd8d3e0e4 100644 --- a/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp +++ b/examples/dishwasher-app/asr/src/DeviceCallbacks.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h index 973e1e622576a4..a61be0f3c1770c 100644 --- a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h @@ -20,7 +20,6 @@ #include "app/clusters/device-energy-management-server/device-energy-management-server.h" -#include #include #include diff --git a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h index e6f5c8c324d91e..df0d08b76f7e4e 100644 --- a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h @@ -21,7 +21,6 @@ #include "app/clusters/energy-evse-server/energy-evse-server.h" #include -#include #include #include diff --git a/examples/energy-management-app/energy-management-common/include/device-energy-management-modes.h b/examples/energy-management-app/energy-management-common/include/device-energy-management-modes.h index 75d1a66fcb0f37..61c65892910ef9 100644 --- a/examples/energy-management-app/energy-management-common/include/device-energy-management-modes.h +++ b/examples/energy-management-app/energy-management-common/include/device-energy-management-modes.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/energy-management-app/energy-management-common/include/energy-evse-modes.h b/examples/energy-management-app/energy-management-common/include/energy-evse-modes.h index 97189b0069fa81..0e8fd42e21c6f7 100644 --- a/examples/energy-management-app/energy-management-common/include/energy-evse-modes.h +++ b/examples/energy-management-app/energy-management-common/include/energy-evse-modes.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/laundry-washer-app/nxp/common/main/ZclCallbacks.cpp b/examples/laundry-washer-app/nxp/common/main/ZclCallbacks.cpp index 0a26df6424b771..7602ab4d52ac21 100644 --- a/examples/laundry-washer-app/nxp/common/main/ZclCallbacks.cpp +++ b/examples/laundry-washer-app/nxp/common/main/ZclCallbacks.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include "laundry-washer-controls-delegate-impl.h" diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp index 8463ccce3ada74..119fb710e5873e 100644 --- a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp index 98bf21626b87a1..2fefb090adb129 100644 --- a/examples/light-switch-app/ameba/main/chipinterface.cpp +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/light-switch-app/asr/src/DeviceCallbacks.cpp b/examples/light-switch-app/asr/src/DeviceCallbacks.cpp index e967094e0fbccd..80d2893d09aa72 100644 --- a/examples/light-switch-app/asr/src/DeviceCallbacks.cpp +++ b/examples/light-switch-app/asr/src/DeviceCallbacks.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp index 0ba785b9b9233e..7783e6818f5668 100644 --- a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index 1f05a9edb5b58e..778ce84794c0dd 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/asr/src/DeviceCallbacks.cpp b/examples/lighting-app/asr/src/DeviceCallbacks.cpp index f486aba1f5d9e0..10dc52e7c22025 100644 --- a/examples/lighting-app/asr/src/DeviceCallbacks.cpp +++ b/examples/lighting-app/asr/src/DeviceCallbacks.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lighting-app/beken/main/DeviceCallbacks.cpp b/examples/lighting-app/beken/main/DeviceCallbacks.cpp index f2e5b099700d91..48b715feb76faf 100644 --- a/examples/lighting-app/beken/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/beken/main/DeviceCallbacks.cpp @@ -30,7 +30,6 @@ #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 3d750b9446ea11..a121801134a24c 100644 --- a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp +++ b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp @@ -19,7 +19,6 @@ #include "LightingManager.h" #include -#include #include #include diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp index 5a4eee6e2c09e4..caccdf51b0665b 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp @@ -25,7 +25,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app::Clusters; diff --git a/examples/lighting-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp b/examples/lighting-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp index a9c6aee8798c49..97a3fb9aa72a98 100644 --- a/examples/lighting-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp +++ b/examples/lighting-app/nxp/k32w/k32w1/main/ZclCallbacks.cpp @@ -25,7 +25,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app::Clusters; diff --git a/examples/lock-app/asr/src/DeviceCallbacks.cpp b/examples/lock-app/asr/src/DeviceCallbacks.cpp index 8782f038f29677..c4670d59ea0125 100644 --- a/examples/lock-app/asr/src/DeviceCallbacks.cpp +++ b/examples/lock-app/asr/src/DeviceCallbacks.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/lock-app/lock-common/include/LockManager.h b/examples/lock-app/lock-common/include/LockManager.h index eea60d568ef06b..a75cb7828bace7 100644 --- a/examples/lock-app/lock-common/include/LockManager.h +++ b/examples/lock-app/lock-common/include/LockManager.h @@ -22,7 +22,6 @@ #include #include -#include class LockManager { diff --git a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp index 2b0b8810f4ff6e..a67c51bfc90428 100644 --- a/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp +++ b/examples/lock-app/lock-common/src/ZCLDoorLockCallbacks.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include "LockManager.h" diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index 234ee940b6d9db..381d3b43f7b763 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp index bd53af45ed4f61..61223f9997d69e 100644 --- a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index 841e95c1720df8..de72ee032f4a62 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/examples/ota-requestor-app/asr/src/DeviceCallbacks.cpp b/examples/ota-requestor-app/asr/src/DeviceCallbacks.cpp index a1fa28e413f647..2ad405f665b671 100644 --- a/examples/ota-requestor-app/asr/src/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/asr/src/DeviceCallbacks.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index c3ee1d5803b207..d34a5f6d9bc4b6 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -16,7 +16,6 @@ */ #include "DeviceCallbacks.h" -#include "app/util/af.h" #include "esp_heap_caps_init.h" #include "esp_log.h" #include "esp_netif.h" diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 0cc7271618b400..80b16222c61912 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include using chip::BDXDownloader; diff --git a/examples/placeholder/linux/include/static-supported-modes-manager.h b/examples/placeholder/linux/include/static-supported-modes-manager.h index ef90de38697f4c..b4ce50b8cd49a3 100644 --- a/examples/placeholder/linux/include/static-supported-modes-manager.h +++ b/examples/placeholder/linux/include/static-supported-modes-manager.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include diff --git a/examples/placeholder/linux/include/static-supported-temperature-levels.h b/examples/placeholder/linux/include/static-supported-temperature-levels.h index 3fdce87e109317..9698df8c094cc8 100644 --- a/examples/placeholder/linux/include/static-supported-temperature-levels.h +++ b/examples/placeholder/linux/include/static-supported-temperature-levels.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/examples/platform/esp32/mode-support/static-supported-modes-manager.h b/examples/platform/esp32/mode-support/static-supported-modes-manager.h index cdd79688c5212c..8d6bb3c665ff0c 100644 --- a/examples/platform/esp32/mode-support/static-supported-modes-manager.h +++ b/examples/platform/esp32/mode-support/static-supported-modes-manager.h @@ -19,7 +19,6 @@ #pragma once #include -#include namespace chip { namespace app { diff --git a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp index 29662d6e8df4e9..0d4bbf91f03806 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp @@ -43,7 +43,6 @@ #ifdef USE_CHIP_DATA_MODEL #include #include -#include #include #include #endif // USE_CHIP_DATA_MODEL diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index eab4278e1246cb..e0fb72a5c54645 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -20,7 +20,6 @@ #include "FreeRTOS.h" #include "silabs_utils.h" #include -#include #include #include #include diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index 8ac373b643bfce..b4f0a9445d3302 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -28,7 +28,6 @@ #include "FreeRTOS.h" #include #include -#include #include #include #include diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index ea094e96767665..2d1fba0f9ec498 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -32,7 +32,6 @@ #include #include -#include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp index 0650341acbc081..f2442efdb876a6 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -28,7 +28,6 @@ #include #include -#include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include diff --git a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp index a8a61bda096d22..9192411cd22846 100644 --- a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp @@ -28,7 +28,6 @@ #include #include -#include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include diff --git a/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp b/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp index 23e6de9a118b03..9f9e7fd8d3e0e4 100644 --- a/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp +++ b/examples/refrigerator-app/asr/src/DeviceCallbacks.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h b/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h index 3fdce87e109317..9698df8c094cc8 100644 --- a/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h +++ b/examples/refrigerator-app/refrigerator-common/include/static-supported-temperature-levels.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h index af5e2c451abb83..d926693cf17980 100644 --- a/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h +++ b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index cb6b5e558627ce..05015eda8db4a3 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/examples/thermostat/linux/main.cpp b/examples/thermostat/linux/main.cpp index 77de93055e3aa0..b9f82696e8ce79 100644 --- a/examples/thermostat/linux/main.cpp +++ b/examples/thermostat/linux/main.cpp @@ -21,7 +21,6 @@ #include #include #include -#include using namespace chip; using namespace chip::app; diff --git a/examples/thermostat/nxp/common/main/ZclCallbacks.cpp b/examples/thermostat/nxp/common/main/ZclCallbacks.cpp index 86ea10f4687558..d4be6f1eb89a8c 100644 --- a/examples/thermostat/nxp/common/main/ZclCallbacks.cpp +++ b/examples/thermostat/nxp/common/main/ZclCallbacks.cpp @@ -25,7 +25,6 @@ #include #include #include -#include using namespace ::chip; diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp index b3160b2ec2fd8b..56e0be2f21e522 100644 --- a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp @@ -19,7 +19,6 @@ #include "AccountLoginManager.h" #include #include -#include #include #include diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 1dfae0f8afd3f2..94b3bf8514b9e3 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/tv-app/android/java/DeviceCallbacks.cpp b/examples/tv-app/android/java/DeviceCallbacks.cpp index a85402a10fef7e..51f57a58d6cc2d 100644 --- a/examples/tv-app/android/java/DeviceCallbacks.cpp +++ b/examples/tv-app/android/java/DeviceCallbacks.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index f9be7578e830ab..08635202ef8496 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -18,7 +18,6 @@ #include "TvApp-JNI.h" #include #include -#include #include #include #include diff --git a/examples/tv-app/android/java/OnOffManager.cpp b/examples/tv-app/android/java/OnOffManager.cpp index db694748e8a11b..925d69a1ec1451 100644 --- a/examples/tv-app/android/java/OnOffManager.cpp +++ b/examples/tv-app/android/java/OnOffManager.cpp @@ -18,7 +18,6 @@ #include "TvApp-JNI.h" #include #include -#include #include #include #include diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 859b3f47284929..6847d6a9bcdb88 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #if defined(ENABLE_CHIP_SHELL) #include "AppTvShellCommands.h" diff --git a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp index 0f3e5b5036e081..e0962cead0d913 100644 --- a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp @@ -19,7 +19,6 @@ #include "AccountLoginManager.h" #include #include -#include using namespace std; using namespace chip::app::Clusters::AccountLogin; diff --git a/examples/tv-app/tv-common/src/AppTv.cpp b/examples/tv-app/tv-common/src/AppTv.cpp index 4acb0d61d21f99..3a8cba6e56a9fa 100644 --- a/examples/tv-app/tv-common/src/AppTv.cpp +++ b/examples/tv-app/tv-common/src/AppTv.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/virtual-device-app/android/java/ColorControlManager.cpp b/examples/virtual-device-app/android/java/ColorControlManager.cpp index 1a4dfbe26c09f6..2b9ebb23ccfd57 100644 --- a/examples/virtual-device-app/android/java/ColorControlManager.cpp +++ b/examples/virtual-device-app/android/java/ColorControlManager.cpp @@ -18,7 +18,6 @@ #include "DeviceApp-JNI.h" #include #include -#include #include #include #include diff --git a/examples/virtual-device-app/android/java/DoorLockManager.cpp b/examples/virtual-device-app/android/java/DoorLockManager.cpp index b3e245ea75dac2..3a2ed97b07901c 100644 --- a/examples/virtual-device-app/android/java/DoorLockManager.cpp +++ b/examples/virtual-device-app/android/java/DoorLockManager.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/virtual-device-app/android/java/OnOffManager.cpp b/examples/virtual-device-app/android/java/OnOffManager.cpp index c058e99a91c111..bb06f5bf0c1dae 100644 --- a/examples/virtual-device-app/android/java/OnOffManager.cpp +++ b/examples/virtual-device-app/android/java/OnOffManager.cpp @@ -18,7 +18,6 @@ #include "DeviceApp-JNI.h" #include #include -#include #include #include #include diff --git a/examples/virtual-device-app/android/java/PowerSourceManager.cpp b/examples/virtual-device-app/android/java/PowerSourceManager.cpp index e71a5bb1eec692..0adfd8d932d3fd 100644 --- a/examples/virtual-device-app/android/java/PowerSourceManager.cpp +++ b/examples/virtual-device-app/android/java/PowerSourceManager.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index aa0e2654a5e4d3..fffa68462e9bbc 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/examples/window-app/common/src/ZclCallbacks.cpp b/examples/window-app/common/src/ZclCallbacks.cpp index ae2416576bb009..e02869186704d1 100644 --- a/examples/window-app/common/src/ZclCallbacks.cpp +++ b/examples/window-app/common/src/ZclCallbacks.cpp @@ -32,7 +32,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app::Clusters::WindowCovering; diff --git a/examples/window-app/nrfconnect/main/WindowCovering.cpp b/examples/window-app/nrfconnect/main/WindowCovering.cpp index 4d200ffa3c919e..f0cf55b775b0a8 100644 --- a/examples/window-app/nrfconnect/main/WindowCovering.cpp +++ b/examples/window-app/nrfconnect/main/WindowCovering.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/examples/window-app/nrfconnect/main/ZclCallbacks.cpp b/examples/window-app/nrfconnect/main/ZclCallbacks.cpp index 12e95a7f566788..9262518104df4d 100644 --- a/examples/window-app/nrfconnect/main/ZclCallbacks.cpp +++ b/examples/window-app/nrfconnect/main/ZclCallbacks.cpp @@ -31,7 +31,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app::Clusters::WindowCovering; diff --git a/examples/window-app/silabs/src/WindowManager.cpp b/examples/window-app/silabs/src/WindowManager.cpp index 197836f486a112..af607fdbee7a64 100644 --- a/examples/window-app/silabs/src/WindowManager.cpp +++ b/examples/window-app/silabs/src/WindowManager.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/examples/window-app/silabs/src/ZclCallbacks.cpp b/examples/window-app/silabs/src/ZclCallbacks.cpp index 4e2a688383da31..f658a45230a023 100644 --- a/examples/window-app/silabs/src/ZclCallbacks.cpp +++ b/examples/window-app/silabs/src/ZclCallbacks.cpp @@ -32,7 +32,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::app::Clusters::WindowCovering; diff --git a/examples/window-app/telink/src/WindowCovering.cpp b/examples/window-app/telink/src/WindowCovering.cpp index 5c1b8d10559c33..1ed5bdb8e91ff2 100644 --- a/examples/window-app/telink/src/WindowCovering.cpp +++ b/examples/window-app/telink/src/WindowCovering.cpp @@ -20,7 +20,6 @@ #include "PWMDevice.h" #include -#include #include #include #include diff --git a/src/app/CommandResponseHelper.h b/src/app/CommandResponseHelper.h index 48d36d1ea82013..a0209acbe32194 100644 --- a/src/app/CommandResponseHelper.h +++ b/src/app/CommandResponseHelper.h @@ -20,7 +20,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index a5f49cb7c39aa1..20fb879186a21c 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include using namespace chip; diff --git a/src/app/clusters/account-login-server/account-login-delegate.h b/src/app/clusters/account-login-server/account-login-delegate.h index 8b8a1c4ca28196..36458db98e66d8 100644 --- a/src/app/clusters/account-login-server/account-login-delegate.h +++ b/src/app/clusters/account-login-server/account-login-delegate.h @@ -21,7 +21,6 @@ #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index 684558eec0f0bc..a41f8897e86a9a 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 8189ae3d67ae12..0226a893a8ec04 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/application-basic-server/application-basic-delegate.h b/src/app/clusters/application-basic-server/application-basic-delegate.h index 82696b5b77a674..a049655afd67db 100644 --- a/src/app/clusters/application-basic-server/application-basic-delegate.h +++ b/src/app/clusters/application-basic-server/application-basic-delegate.h @@ -21,7 +21,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/application-launcher-server/application-launcher-delegate.h b/src/app/clusters/application-launcher-server/application-launcher-delegate.h index 1a945e8714db71..0d4276d1e1b35e 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-delegate.h +++ b/src/app/clusters/application-launcher-server/application-launcher-delegate.h @@ -22,7 +22,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/audio-output-server/audio-output-delegate.h b/src/app/clusters/audio-output-server/audio-output-delegate.h index 9d4f5fae029ca2..1477121e957c9f 100644 --- a/src/app/clusters/audio-output-server/audio-output-delegate.h +++ b/src/app/clusters/audio-output-server/audio-output-delegate.h @@ -21,7 +21,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp index 99bd0621ba793d..da7d23e7038933 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index 7e0f3ce306da32..f11ce51da2aa90 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/channel-server/channel-delegate.h b/src/app/clusters/channel-server/channel-delegate.h index c92ada4adda08a..24c42ebc2df053 100644 --- a/src/app/clusters/channel-server/channel-delegate.h +++ b/src/app/clusters/channel-server/channel-delegate.h @@ -21,7 +21,6 @@ #include #include #include -#include #include namespace chip { diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 3e883cf5165e3a..508f4b691bb0d1 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 5c13c5619c82cf..756f69076830c9 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h index c2799fd822cdf9..984eefee065fd2 100644 --- a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/content-app-observer/content-app-observer-delegate.h b/src/app/clusters/content-app-observer/content-app-observer-delegate.h index d206f19ff1c174..13b6dd53da2f52 100644 --- a/src/app/clusters/content-app-observer/content-app-observer-delegate.h +++ b/src/app/clusters/content-app-observer/content-app-observer-delegate.h @@ -21,7 +21,6 @@ #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/content-app-observer/content-app-observer.cpp b/src/app/clusters/content-app-observer/content-app-observer.cpp index 08ed95c10aa679..91abf8b9a29d37 100644 --- a/src/app/clusters/content-app-observer/content-app-observer.cpp +++ b/src/app/clusters/content-app-observer/content-app-observer.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/content-control-server/content-control-delegate.h b/src/app/clusters/content-control-server/content-control-delegate.h index b587c3a7610a3c..e03f39f44113b7 100644 --- a/src/app/clusters/content-control-server/content-control-delegate.h +++ b/src/app/clusters/content-control-server/content-control-delegate.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/content-control-server/content-control-server.cpp b/src/app/clusters/content-control-server/content-control-server.cpp index 60c30f4b71845a..1f2099b729094a 100644 --- a/src/app/clusters/content-control-server/content-control-server.cpp +++ b/src/app/clusters/content-control-server/content-control-server.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/content-launch-server/content-launch-delegate.h b/src/app/clusters/content-launch-server/content-launch-delegate.h index 8fcf70560d6179..e2a66dd559c581 100644 --- a/src/app/clusters/content-launch-server/content-launch-delegate.h +++ b/src/app/clusters/content-launch-server/content-launch-delegate.h @@ -22,7 +22,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index 3b0a5d7f633983..ed2f5fa7627bac 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h index 5f4e77242a49e7..0de17f679eac4d 100644 --- a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp index 64ab48232c4f40..cedaf4f3acc6a9 100644 --- a/src/app/clusters/door-lock-server/door-lock-server-callback.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server-callback.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 0e65644eb935be..d5cef9597e1d25 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index f50a666ca67721..61c7d6ddd585e9 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index 5d73f36ca12b8c..8db33174f07429 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/fan-control-server/fan-control-delegate.h b/src/app/clusters/fan-control-server/fan-control-delegate.h index 8b70a046268742..4879a9836f1eb2 100644 --- a/src/app/clusters/fan-control-server/fan-control-delegate.h +++ b/src/app/clusters/fan-control-server/fan-control-delegate.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/fault-injection-server/fault-injection-server.cpp b/src/app/clusters/fault-injection-server/fault-injection-server.cpp index 0b7385e39dd98e..ed4382b30649d6 100644 --- a/src/app/clusters/fault-injection-server/fault-injection-server.cpp +++ b/src/app/clusters/fault-injection-server/fault-injection-server.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 536ac205454862..d32ddc0ee90a5c 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h index 144bae3264e8ad..dfb5993874fad8 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h @@ -21,7 +21,6 @@ #include #include #include -#include #include namespace chip { 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 cba03ef005360d..5efc037014a704 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 @@ -21,7 +21,6 @@ #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 6434edf7cfd734..add0261927c621 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 0f71345a38d0f1..51ec9b9239f929 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include using namespace chip; diff --git a/src/app/clusters/identify-server/identify-server.cpp b/src/app/clusters/identify-server/identify-server.cpp index 6ea8a34ca4db33..4be1133b184ee2 100644 --- a/src/app/clusters/identify-server/identify-server.cpp +++ b/src/app/clusters/identify-server/identify-server.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/keypad-input-server/keypad-input-delegate.h b/src/app/clusters/keypad-input-server/keypad-input-delegate.h index 24c0a3fd7f4ac9..bc94ad9fd8bc97 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-delegate.h +++ b/src/app/clusters/keypad-input-server/keypad-input-delegate.h @@ -21,7 +21,6 @@ #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/keypad-input-server/keypad-input-server.cpp b/src/app/clusters/keypad-input-server/keypad-input-server.cpp index e298a2cb3f2392..b07c1fac8123ea 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp index 7a3d47f823c409..c29f61b5a21f55 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h index 5a7123c0ee78e0..933e3cdde1b479 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h @@ -20,7 +20,6 @@ #include "laundry-dryer-controls-delegate.h" #include #include -#include #include namespace chip { diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 4e58236e9b2cad..d648216db55699 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h index c19b6f88518bf8..cbf5f146d30bcc 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h @@ -20,7 +20,6 @@ #include "laundry-washer-controls-delegate.h" #include #include -#include #include diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 0077c59509edc9..01d0b38be26d7a 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/app/clusters/media-input-server/media-input-delegate.h b/src/app/clusters/media-input-server/media-input-delegate.h index 609c66bef69ed9..f010b5a0c2b597 100644 --- a/src/app/clusters/media-input-server/media-input-delegate.h +++ b/src/app/clusters/media-input-server/media-input-delegate.h @@ -20,7 +20,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/media-playback-server/media-playback-delegate.h b/src/app/clusters/media-playback-server/media-playback-delegate.h index 12e89b25efecdc..b54948924e26dd 100644 --- a/src/app/clusters/media-playback-server/media-playback-delegate.h +++ b/src/app/clusters/media-playback-server/media-playback-delegate.h @@ -22,7 +22,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/messages-server/messages-delegate.h b/src/app/clusters/messages-server/messages-delegate.h index 6be09de781d340..7d33627ab30ae7 100644 --- a/src/app/clusters/messages-server/messages-delegate.h +++ b/src/app/clusters/messages-server/messages-delegate.h @@ -22,7 +22,6 @@ #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/mode-base-server/mode-base-server.h b/src/app/clusters/mode-base-server/mode-base-server.h index bf7b82a79bf169..f787e9fc19f11f 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.h +++ b/src/app/clusters/mode-base-server/mode-base-server.h @@ -22,7 +22,6 @@ #include #include #include -#include #include namespace chip { 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 105d1985e3990d..f162a26cf4e5df 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp index 51cc04b0f4ec24..c95cafc6b43775 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -17,7 +17,6 @@ #include "occupancy-sensor-server.h" -#include #include diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index e4ba82bb8bdc2f..47dd00843e2484 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 459c42fcbcc8b3..9483cf59d90700 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index 5a461c272177ba..c1640cb99e9ce7 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -22,7 +22,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/ota-provider/ota-provider-delegate.h b/src/app/clusters/ota-provider/ota-provider-delegate.h index 3da8668908064c..2990977ce6ab47 100644 --- a/src/app/clusters/ota-provider/ota-provider-delegate.h +++ b/src/app/clusters/ota-provider/ota-provider-delegate.h @@ -22,7 +22,6 @@ #include #include #include -#include #include namespace chip { diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index 3da02b62cec9a8..27f94dbbd5c0d3 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index 717c610830b8fb..a545ea91d3f4ef 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp b/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp index f1adbc7d52c804..897ffd4960790d 100644 --- a/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp +++ b/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index eea313c3eb31db..5996cfe01f9eff 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index 8f79f39d5d5767..95480ddfcc23aa 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.cpp b/src/app/clusters/sample-mei-server/sample-mei-server.cpp index 25bcb2aaf77b13..ce0da17319d23b 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.cpp +++ b/src/app/clusters/sample-mei-server/sample-mei-server.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h index 42efc49ee8e092..68b048e29bf5aa 100644 --- a/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h +++ b/src/app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h @@ -25,7 +25,6 @@ #include #include -#include #include /** diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index e024d74d61b4b8..b6071587292167 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/switch-server/switch-server.cpp b/src/app/clusters/switch-server/switch-server.cpp index 64cce040f0adb3..7a9dd1c0957101 100644 --- a/src/app/clusters/switch-server/switch-server.cpp +++ b/src/app/clusters/switch-server/switch-server.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/switch-server/switch-server.h b/src/app/clusters/switch-server/switch-server.h index c88701620740b2..5eb12056bddd69 100644 --- a/src/app/clusters/switch-server/switch-server.h +++ b/src/app/clusters/switch-server/switch-server.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/target-navigator-server/target-navigator-delegate.h b/src/app/clusters/target-navigator-server/target-navigator-delegate.h index f3be65c818fbdd..dd0d80cce91cc9 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-delegate.h +++ b/src/app/clusters/target-navigator-server/target-navigator-delegate.h @@ -22,7 +22,6 @@ #include #include -#include #include namespace chip { diff --git a/src/app/clusters/thermostat-client/thermostat-client.cpp b/src/app/clusters/thermostat-client/thermostat-client.cpp index bdd4b1a1f8394d..0115e00e8b7340 100644 --- a/src/app/clusters/thermostat-client/thermostat-client.cpp +++ b/src/app/clusters/thermostat-client/thermostat-client.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index c0e43593316816..b9060dbce06472 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include diff --git a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp index 25e0edc034a855..a74a038f9612dc 100644 --- a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp +++ b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include #include #include diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp index cae2948e8e970e..b21f9015af8b28 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 3cf9239ddff59e..0657e37f23b860 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/window-covering-server/window-covering-delegate.h b/src/app/clusters/window-covering-server/window-covering-delegate.h index dac189e7f9e564..4b8b4e88401206 100644 --- a/src/app/clusters/window-covering-server/window-covering-delegate.h +++ b/src/app/clusters/window-covering-server/window-covering-delegate.h @@ -21,7 +21,6 @@ #include #include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index ba7d74c56583a5..bfa5e1e97fa588 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp index e9983368d57d65..8962c8487c522b 100644 --- a/src/app/tests/TestPowerSourceCluster.cpp +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -19,7 +19,6 @@ #include "lib/support/CHIPMem.h" #include #include -#include #include #include #include diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 6aa8e334a9380f..e13396f9aee6de 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index c09cbe0cdeea2b..d25f6fa88a1f07 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -20,7 +20,6 @@ // #include PLATFORM_HEADER #include #include -#include #include #include #include diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 5ccb8c8ad89902..965713c9b41fba 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -17,7 +17,6 @@ #pragma once -#include #include diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 81bf518558a5e3..6365e124e8f908 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp index 3b9fa2416c57eb..2b8224e54b6548 100644 --- a/src/app/util/mock/MockNodeConfig.cpp +++ b/src/app/util/mock/MockNodeConfig.cpp @@ -18,7 +18,6 @@ #include -#include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index cf36ddc560e583..fcf9c2ac1b586f 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index c1b55ab836f223..29a320786b7fbb 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index 2dd92f0f7450ec..5adda99513ba2e 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 53500caed103b8..ccdb1ca750c1e1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -54,7 +54,6 @@ #import #include -#include #include #include #include diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index a3e74424d0768b..4212f6c1d4a554 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include From eb5f3ce6604afa6b740a7721c5cd27a5964a46fa Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:22:06 -0400 Subject: [PATCH 08/45] Restyle and zap regen --- examples/chef/common/clusters/door-lock/chef-lock-manager.h | 1 - examples/lock-app/lock-common/include/LockManager.h | 1 - .../clusters/occupancy-sensor-server/occupancy-sensor-server.cpp | 1 - .../pump-configuration-and-control-client.cpp | 1 - src/app/clusters/thermostat-client/thermostat-client.cpp | 1 - src/app/clusters/thermostat-server/thermostat-server.cpp | 1 - .../thermostat-user-interface-configuration-server.cpp | 1 - src/app/util/attribute-table.h | 1 - .../zap-templates/templates/app/attributes/Accessors-src.zapt | 1 + .../app-common/app-common/zap-generated/attributes/Accessors.cpp | 1 + 10 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/chef/common/clusters/door-lock/chef-lock-manager.h b/examples/chef/common/clusters/door-lock/chef-lock-manager.h index 495ed0f890d434..f941620880678e 100644 --- a/examples/chef/common/clusters/door-lock/chef-lock-manager.h +++ b/examples/chef/common/clusters/door-lock/chef-lock-manager.h @@ -22,7 +22,6 @@ #include #include - class LockManager { public: diff --git a/examples/lock-app/lock-common/include/LockManager.h b/examples/lock-app/lock-common/include/LockManager.h index a75cb7828bace7..71dcf6f02dc072 100644 --- a/examples/lock-app/lock-common/include/LockManager.h +++ b/examples/lock-app/lock-common/include/LockManager.h @@ -22,7 +22,6 @@ #include #include - class LockManager { public: diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp index c95cafc6b43775..50056387e3c359 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -17,7 +17,6 @@ #include "occupancy-sensor-server.h" - #include #include "occupancy-hal.h" diff --git a/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp b/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp index 897ffd4960790d..041ecc0bfa7f18 100644 --- a/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp +++ b/src/app/clusters/pump-configuration-and-control-client/pump-configuration-and-control-client.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ - #include #include diff --git a/src/app/clusters/thermostat-client/thermostat-client.cpp b/src/app/clusters/thermostat-client/thermostat-client.cpp index 0115e00e8b7340..9b66eaf5bbe355 100644 --- a/src/app/clusters/thermostat-client/thermostat-client.cpp +++ b/src/app/clusters/thermostat-client/thermostat-client.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ - #include #include diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index b9060dbce06472..91d9b33da69ca5 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ - #include #include diff --git a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp index a74a038f9612dc..5d18326b37df1c 100644 --- a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp +++ b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ - #include #include #include diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 965713c9b41fba..d59889bece6226 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -17,7 +17,6 @@ #pragma once - #include /** diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index 5adda99513ba2e..c2dfed70cfee7e 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 4212f6c1d4a554..539b26eefb5e5a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include From 4e9edbd5b0244b8f1731c164bdc7c0d9ba013f6a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:29:30 -0400 Subject: [PATCH 09/45] All-clusters now compiles on linux --- src/app/clusters/color-control-server/color-control-server.h | 1 + .../thermostat-user-interface-configuration-server.cpp | 1 + src/app/util/attribute-storage.h | 1 + src/app/util/attribute-table.h | 2 ++ 4 files changed, 5 insertions(+) diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 756f69076830c9..72dabb5600ff33 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp index 5d18326b37df1c..1325d5042caf12 100644 --- a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp +++ b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp @@ -17,6 +17,7 @@ #include #include +#include #include using namespace chip::app; diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index d25f6fa88a1f07..0d97462560d5af 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index d59889bece6226..0257720f727309 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -17,6 +17,8 @@ #pragma once +#include +#include #include /** From f9d7e7dc88509fe4c6492bfe16f11bc2f9c0bf4d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:47:54 -0400 Subject: [PATCH 10/45] Fix ota requester compile --- src/app/clusters/on-off-server/on-off-server.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 47dd00843e2484..bc71044ae44075 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include From 3719a48ff8a3421dd980beaad401e29047fff187 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:50:02 -0400 Subject: [PATCH 11/45] Make tests compile --- src/app/tests/TestPowerSourceCluster.cpp | 2 +- src/app/util/mock/MockNodeConfig.cpp | 1 + src/app/util/mock/attribute-storage.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp index 8962c8487c522b..21015be8c024b9 100644 --- a/src/app/tests/TestPowerSourceCluster.cpp +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -18,6 +18,7 @@ #include "lib/support/CHIPMem.h" #include +#include #include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #include diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp index 2b8224e54b6548..b4f6b1d27cfc5c 100644 --- a/src/app/util/mock/MockNodeConfig.cpp +++ b/src/app/util/mock/MockNodeConfig.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index fcf9c2ac1b586f..db9ffd523d907e 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include From 5e97dd11d62f97ef506b8cbd022a0d3e16f92441 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:50:40 -0400 Subject: [PATCH 12/45] Restyle --- src/app/tests/TestPowerSourceCluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp index 21015be8c024b9..46371b332a1804 100644 --- a/src/app/tests/TestPowerSourceCluster.cpp +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -18,8 +18,8 @@ #include "lib/support/CHIPMem.h" #include -#include #include +#include #include #include #include From 33f6c05e6a956566699e46625506b309f96464b8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 12:53:05 -0400 Subject: [PATCH 13/45] Fix lint.yml: af.h does not exist anymore --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c028e0ad018381..5a14d2f57d89a9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -100,7 +100,6 @@ jobs: --known-failure app/reporting/tests/MockReportScheduler.cpp \ --known-failure app/reporting/tests/MockReportScheduler.h \ --known-failure app/TestEventTriggerDelegate.h \ - --known-failure app/util/af.h \ --known-failure app/util/attribute-storage.cpp \ --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-table.cpp \ From 8e3e3d9183de476519a7a7e65671e1ab1de85ec2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:03:21 -0400 Subject: [PATCH 14/45] Fix door lock compile --- src/app/clusters/door-lock-server/door-lock-server.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index 61c7d6ddd585e9..fa7f4183723b45 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include From 672a1cde3cc8b6b805339833e34d1b539a7e670e Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:20:00 -0400 Subject: [PATCH 15/45] Ensure everything using emberAfEndpointEnableDisable includes endpoint-config-api --- examples/air-purifier-app/ameba/main/chipinterface.cpp | 1 + examples/all-clusters-app/ameba/main/chipinterface.cpp | 1 + examples/all-clusters-app/asr/src/AppTask.cpp | 1 + examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp | 1 + examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp | 1 + examples/all-clusters-app/esp32/main/main.cpp | 1 + examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp | 1 + examples/all-clusters-app/nrfconnect/main/AppTask.cpp | 1 + examples/all-clusters-app/nxp/common/main/AppTask.cpp | 1 + examples/all-clusters-app/tizen/src/main.cpp | 1 + examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp | 1 + examples/all-clusters-minimal-app/asr/src/AppTask.cpp | 1 + examples/all-clusters-minimal-app/esp32/main/main.cpp | 1 + examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp | 1 + examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp | 1 + examples/all-clusters-minimal-app/tizen/src/main.cpp | 1 + examples/bridge-app/asr/src/AppTask.cpp | 1 + examples/bridge-app/asr/subdevice/SubDeviceManager.cpp | 1 + examples/bridge-app/esp32/main/main.cpp | 1 + examples/bridge-app/linux/main.cpp | 1 + examples/bridge-app/telink/src/AppTask.cpp | 1 + examples/chef/ameba/main/chipinterface.cpp | 1 + examples/dishwasher-app/asr/src/AppTask.cpp | 1 + examples/light-switch-app/ameba/main/chipinterface.cpp | 1 + examples/light-switch-app/asr/src/AppTask.cpp | 1 + examples/lighting-app/ameba/main/chipinterface.cpp | 1 + examples/lighting-app/asr/src/AppTask.cpp | 1 + examples/lock-app/asr/src/AppTask.cpp | 1 + examples/ota-requestor-app/ameba/main/chipinterface.cpp | 1 + examples/ota-requestor-app/asr/src/AppTask.cpp | 1 + examples/ota-requestor-app/esp32/main/main.cpp | 1 + examples/ota-requestor-app/genio/src/AppTask.cpp | 1 + examples/platform/openiotsdk/app/openiotsdk_platform.cpp | 1 + examples/platform/telink/common/src/AppTaskCommon.cpp | 1 + examples/refrigerator-app/asr/src/AppTask.cpp | 1 + examples/temperature-measurement-app/asr/src/AppTask.cpp | 1 + examples/thermostat/asr/src/AppTask.cpp | 1 + examples/tv-app/android/java/AppImpl.cpp | 1 + examples/tv-app/linux/main.cpp | 1 + src/app/app-platform/ContentAppPlatform.cpp | 1 + src/app/util/attribute-storage.cpp | 1 + src/controller/tests/TestReadChunking.cpp | 1 + 42 files changed, 42 insertions(+) diff --git a/examples/air-purifier-app/ameba/main/chipinterface.cpp b/examples/air-purifier-app/ameba/main/chipinterface.cpp index 1362ab0ea8c4ca..fd1c568afbf44f 100644 --- a/examples/air-purifier-app/ameba/main/chipinterface.cpp +++ b/examples/air-purifier-app/ameba/main/chipinterface.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 64afacec480911..aa7cc4afe75047 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/asr/src/AppTask.cpp b/examples/all-clusters-app/asr/src/AppTask.cpp index 92b6aaef3dba49..1a829ca3de1798 100644 --- a/examples/all-clusters-app/asr/src/AppTask.cpp +++ b/examples/all-clusters-app/asr/src/AppTask.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp index f506539393ca72..234458d8638e48 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -24,6 +24,7 @@ #include "FreeRTOS.h" #include "Globals.h" +#include #include #include diff --git a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp index 4a136f1b83e8e4..49bd738f0ca067 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp @@ -23,6 +23,7 @@ #include "FreeRTOS.h" #include "Globals.h" +#include #include #include diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index e38c2113082094..af94d2b2d36afe 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -34,6 +34,7 @@ #include "platform/PlatformManager.h" #include "shell_extension/launch.h" #include +#include #include #include #include diff --git a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp index b75b5abfc74294..0d0ba0f5b25663 100644 --- a/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index efdee7153b493c..3551087a969411 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/examples/all-clusters-app/nxp/common/main/AppTask.cpp b/examples/all-clusters-app/nxp/common/main/AppTask.cpp index 7f4c1f257d0405..0b945d49561e43 100644 --- a/examples/all-clusters-app/nxp/common/main/AppTask.cpp +++ b/examples/all-clusters-app/nxp/common/main/AppTask.cpp @@ -23,6 +23,7 @@ #include "ICDUtil.h" #include #include +#include using namespace chip; using namespace chip::app::Clusters; diff --git a/examples/all-clusters-app/tizen/src/main.cpp b/examples/all-clusters-app/tizen/src/main.cpp index 8695225f552992..49c9f06ad9b8f6 100644 --- a/examples/all-clusters-app/tizen/src/main.cpp +++ b/examples/all-clusters-app/tizen/src/main.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp index 9acb21d22ba165..abb0791ac9a132 100644 --- a/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/chipinterface.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp index d6f77d2f28a836..f9d05c2157382d 100644 --- a/examples/all-clusters-minimal-app/asr/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/asr/src/AppTask.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index 4393cc5fc67cfe..993dc609300943 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp index 7cbaf6f447d405..ccc271dd7a2d06 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/infineon/psoc6/src/AppTask.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index b3c8b951372c0f..86bfe7a9aa132b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp index 1562e1848ae2b9..fd2a345c952dd8 100644 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ b/examples/all-clusters-minimal-app/tizen/src/main.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/examples/bridge-app/asr/src/AppTask.cpp b/examples/bridge-app/asr/src/AppTask.cpp index 9583fb3a7017e4..ea95500d402f07 100755 --- a/examples/bridge-app/asr/src/AppTask.cpp +++ b/examples/bridge-app/asr/src/AppTask.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp index 9d4eda96e98438..3508068c4832c6 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 07db2ba94a534f..016b75803cd69b 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index ee59d310f057fa..9b3a98b71962b0 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/telink/src/AppTask.cpp b/examples/bridge-app/telink/src/AppTask.cpp index 72a997c91e9511..d70f9c078e3027 100644 --- a/examples/bridge-app/telink/src/AppTask.cpp +++ b/examples/bridge-app/telink/src/AppTask.cpp @@ -21,6 +21,7 @@ #include #include +#include #include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/chef/ameba/main/chipinterface.cpp b/examples/chef/ameba/main/chipinterface.cpp index 3645f781341fa7..f747cbbd886c42 100644 --- a/examples/chef/ameba/main/chipinterface.cpp +++ b/examples/chef/ameba/main/chipinterface.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/dishwasher-app/asr/src/AppTask.cpp b/examples/dishwasher-app/asr/src/AppTask.cpp index 8e9cb88b8f5b34..8c038cfe3674e9 100644 --- a/examples/dishwasher-app/asr/src/AppTask.cpp +++ b/examples/dishwasher-app/asr/src/AppTask.cpp @@ -23,6 +23,7 @@ #include "qrcodegen.h" #include #include +#include #include #include #include diff --git a/examples/light-switch-app/ameba/main/chipinterface.cpp b/examples/light-switch-app/ameba/main/chipinterface.cpp index 2fefb090adb129..c141769ba7d483 100644 --- a/examples/light-switch-app/ameba/main/chipinterface.cpp +++ b/examples/light-switch-app/ameba/main/chipinterface.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/light-switch-app/asr/src/AppTask.cpp b/examples/light-switch-app/asr/src/AppTask.cpp index f398b3496edd0c..6dcabc80a9e91c 100755 --- a/examples/light-switch-app/asr/src/AppTask.cpp +++ b/examples/light-switch-app/asr/src/AppTask.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index 778ce84794c0dd..461b8bea6143f6 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/lighting-app/asr/src/AppTask.cpp b/examples/lighting-app/asr/src/AppTask.cpp index b72ff5c8588f31..9bbd40af01a3a7 100755 --- a/examples/lighting-app/asr/src/AppTask.cpp +++ b/examples/lighting-app/asr/src/AppTask.cpp @@ -25,6 +25,7 @@ #include "qrcodegen.h" #include #include +#include #include #include #include diff --git a/examples/lock-app/asr/src/AppTask.cpp b/examples/lock-app/asr/src/AppTask.cpp index a90d0013761324..4d359a4bc6eab3 100644 --- a/examples/lock-app/asr/src/AppTask.cpp +++ b/examples/lock-app/asr/src/AppTask.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index de72ee032f4a62..dfac5c97f2ecf6 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/examples/ota-requestor-app/asr/src/AppTask.cpp b/examples/ota-requestor-app/asr/src/AppTask.cpp index 56910e92019f55..78c4ec47b8be1f 100755 --- a/examples/ota-requestor-app/asr/src/AppTask.cpp +++ b/examples/ota-requestor-app/asr/src/AppTask.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index d34a5f6d9bc4b6..e375ded305e1dc 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -25,6 +25,7 @@ #include "freertos/task.h" #include "nvs_flash.h" #include +#include #include #include #include diff --git a/examples/ota-requestor-app/genio/src/AppTask.cpp b/examples/ota-requestor-app/genio/src/AppTask.cpp index 50d1d080a5b7b4..ff78e703e4be81 100644 --- a/examples/ota-requestor-app/genio/src/AppTask.cpp +++ b/examples/ota-requestor-app/genio/src/AppTask.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include diff --git a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp index 0d4bbf91f03806..761b5488eeab9b 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp @@ -32,6 +32,7 @@ #endif #include +#include #include #include #include diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index a77f4363df65f5..3d93aa3ed5d07f 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #if CONFIG_BOOTLOADER_MCUBOOT #include diff --git a/examples/refrigerator-app/asr/src/AppTask.cpp b/examples/refrigerator-app/asr/src/AppTask.cpp index 7e2481ebc05e3f..5ac229c9b99a29 100644 --- a/examples/refrigerator-app/asr/src/AppTask.cpp +++ b/examples/refrigerator-app/asr/src/AppTask.cpp @@ -23,6 +23,7 @@ #include "qrcodegen.h" #include #include +#include #include #include #include diff --git a/examples/temperature-measurement-app/asr/src/AppTask.cpp b/examples/temperature-measurement-app/asr/src/AppTask.cpp index 4d0fd57f527bb6..e55657e45bf095 100755 --- a/examples/temperature-measurement-app/asr/src/AppTask.cpp +++ b/examples/temperature-measurement-app/asr/src/AppTask.cpp @@ -24,6 +24,7 @@ #include "qrcodegen.h" #include #include +#include #include #include #include diff --git a/examples/thermostat/asr/src/AppTask.cpp b/examples/thermostat/asr/src/AppTask.cpp index dbdf8a853b3d75..6117fbf972b52c 100755 --- a/examples/thermostat/asr/src/AppTask.cpp +++ b/examples/thermostat/asr/src/AppTask.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 94b3bf8514b9e3..59a64327967dee 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/tv-app/linux/main.cpp b/examples/tv-app/linux/main.cpp index 6847d6a9bcdb88..29fdd69cb36792 100644 --- a/examples/tv-app/linux/main.cpp +++ b/examples/tv-app/linux/main.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #if defined(ENABLE_CHIP_SHELL) #include "AppTvShellCommands.h" diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 3d17a521996b65..53a36a4bb25a08 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index e13396f9aee6de..36bf9e9bc96733 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index ecc53c941977c9..1a1f9c77d1af57 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include From 6e0ebb6e315529d3523de0d56b54a48a8b7de020 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:22:29 -0400 Subject: [PATCH 16/45] Fix emberAfContainsServer include needs --- src/app/clusters/level-control/level-control.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 01d0b38be26d7a..b93bf50927c5eb 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include From 1eae3d821ef2099f24c80cf85ab36f183197d752 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:26:22 -0400 Subject: [PATCH 17/45] Include attribute-storage.h whenever kEmberinvalidEndpointIndex is defined --- examples/tv-app/android/java/LevelManager.cpp | 1 + examples/tv-app/android/java/OnOffManager.cpp | 1 + examples/virtual-device-app/android/java/ColorControlManager.cpp | 1 + examples/virtual-device-app/android/java/OnOffManager.cpp | 1 + src/app/app-platform/ContentAppPlatform.cpp | 1 + src/app/clusters/content-app-observer/content-app-observer.cpp | 1 + .../clusters/content-control-server/content-control-server.cpp | 1 + src/app/clusters/ota-provider/ota-provider.cpp | 1 + src/app/clusters/scenes-server/scenes-server.h | 1 + 9 files changed, 9 insertions(+) diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index 08635202ef8496..4fc392dca01314 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -18,6 +18,7 @@ #include "TvApp-JNI.h" #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/OnOffManager.cpp b/examples/tv-app/android/java/OnOffManager.cpp index 925d69a1ec1451..203d08d7937b64 100644 --- a/examples/tv-app/android/java/OnOffManager.cpp +++ b/examples/tv-app/android/java/OnOffManager.cpp @@ -18,6 +18,7 @@ #include "TvApp-JNI.h" #include #include +#include #include #include #include diff --git a/examples/virtual-device-app/android/java/ColorControlManager.cpp b/examples/virtual-device-app/android/java/ColorControlManager.cpp index 2b9ebb23ccfd57..22d24eb8a2a826 100644 --- a/examples/virtual-device-app/android/java/ColorControlManager.cpp +++ b/examples/virtual-device-app/android/java/ColorControlManager.cpp @@ -16,6 +16,7 @@ */ #include "ColorControlManager.h" #include "DeviceApp-JNI.h" +#include #include #include #include diff --git a/examples/virtual-device-app/android/java/OnOffManager.cpp b/examples/virtual-device-app/android/java/OnOffManager.cpp index bb06f5bf0c1dae..65b3d6f3bef5a9 100644 --- a/examples/virtual-device-app/android/java/OnOffManager.cpp +++ b/examples/virtual-device-app/android/java/OnOffManager.cpp @@ -18,6 +18,7 @@ #include "DeviceApp-JNI.h" #include #include +#include #include #include #include diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 53a36a4bb25a08..0d7c511d9a4919 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/content-app-observer/content-app-observer.cpp b/src/app/clusters/content-app-observer/content-app-observer.cpp index 91abf8b9a29d37..d595b058126924 100644 --- a/src/app/clusters/content-app-observer/content-app-observer.cpp +++ b/src/app/clusters/content-app-observer/content-app-observer.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/content-control-server/content-control-server.cpp b/src/app/clusters/content-control-server/content-control-server.cpp index 1f2099b729094a..8c9d076a71d7c5 100644 --- a/src/app/clusters/content-control-server/content-control-server.cpp +++ b/src/app/clusters/content-control-server/content-control-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index 27f94dbbd5c0d3..80144b6e8f53a3 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/scenes-server/scenes-server.h b/src/app/clusters/scenes-server/scenes-server.h index 86459fb8e82c67..320a9dae4488e0 100644 --- a/src/app/clusters/scenes-server/scenes-server.h +++ b/src/app/clusters/scenes-server/scenes-server.h @@ -24,6 +24,7 @@ #include #include #include +#include #include namespace chip { From a3cd6d98b90e5cd4286551a3f0788be0dd479550 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:27:17 -0400 Subject: [PATCH 18/45] Include attribute-storage.h whenever kEmberinvalidEndpointIndex is used --- .../virtual-device-app/android/java/ColorControlManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/virtual-device-app/android/java/ColorControlManager.cpp b/examples/virtual-device-app/android/java/ColorControlManager.cpp index 22d24eb8a2a826..34712afe4350d6 100644 --- a/examples/virtual-device-app/android/java/ColorControlManager.cpp +++ b/examples/virtual-device-app/android/java/ColorControlManager.cpp @@ -16,9 +16,9 @@ */ #include "ColorControlManager.h" #include "DeviceApp-JNI.h" -#include #include #include +#include #include #include #include From 310a7ff0fd9c1d3e8fcfde9154c6478c99250cda Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:28:10 -0400 Subject: [PATCH 19/45] Fix linter --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5a14d2f57d89a9..7bc22d454df12a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -251,7 +251,7 @@ jobs: - name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters if: always() run: | - git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0 + git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0 # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, From 24df9de1d5e23f631e713e000303ed08b8fdcea3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:28:48 -0400 Subject: [PATCH 20/45] Another lint cleanup --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7bc22d454df12a..d4c3c70d2f9c5e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -261,7 +261,7 @@ jobs: - name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters if: always() run: | - git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0 + git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0 # Run ruff python linter - name: Check for errors using ruff Python linter From 5f0af791173ed4c822c3bba2c169247a2226915f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:36:29 -0400 Subject: [PATCH 21/45] Fix all includes referencing EnabledEndpointsWithServerCluster --- examples/lighting-app/linux/LightingAppCommandDelegate.cpp | 1 + examples/platform/silabs/SoftwareFaultReports.cpp | 1 + examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp | 1 + examples/pump-app/cc13x4_26x4/main/AppTask.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp index 61946938e294c0..cce765f58fd680 100644 --- a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp +++ b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include using namespace chip; diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index e0fb72a5c54645..d2b03492d1eba8 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index b4f0a9445d3302..49ba5480e43f02 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -28,6 +28,7 @@ #include "FreeRTOS.h" #include #include +#include #include #include #include diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index 2d1fba0f9ec498..e3be2996b09162 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -32,6 +32,7 @@ #include #include +#include #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include From 58222f1976f0d563b1d61db73be86bb64844fd76 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:39:40 -0400 Subject: [PATCH 22/45] Restyle --- examples/platform/silabs/SoftwareFaultReports.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index d2b03492d1eba8..813a66037fbe84 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -20,9 +20,9 @@ #include "FreeRTOS.h" #include "silabs_utils.h" #include +#include #include #include -#include #include #include From 114269bf61c0e1c355c3ca84e9a8ead8a3457a8a Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:49:18 -0400 Subject: [PATCH 23/45] Fix andorid tv compile --- .../android/include/account-login/AccountLoginManager.cpp | 1 + .../include/target-navigator/TargetNavigatorManager.cpp | 1 + examples/tv-app/android/java/ContentLauncherManager.cpp | 1 + .../clusters/target-navigator/TargetNavigatorManager.cpp | 1 + .../application-basic-server/application-basic-delegate.h | 3 +++ 5 files changed, 7 insertions(+) diff --git a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp index 56e0be2f21e522..12e6ba44dfb220 100644 --- a/examples/tv-app/android/include/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/android/include/account-login/AccountLoginManager.cpp @@ -19,6 +19,7 @@ #include "AccountLoginManager.h" #include #include +#include #include #include diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp index 23cf8058bab068..d18c58d0bdb92d 100644 --- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp @@ -17,6 +17,7 @@ #include "TargetNavigatorManager.h" #include +#include #include using namespace std; diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index f68e1131fa6fb8..9aacc2d6e56b22 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -20,6 +20,7 @@ #include "TvApp-JNI.h" #include #include +#include #include #include #include diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp index 9b907339df02e4..51be2c99cc4b08 100644 --- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp @@ -17,6 +17,7 @@ #include "TargetNavigatorManager.h" #include +#include using namespace std; using namespace chip::app; diff --git a/src/app/clusters/application-basic-server/application-basic-delegate.h b/src/app/clusters/application-basic-server/application-basic-delegate.h index a049655afd67db..e128963bc4a410 100644 --- a/src/app/clusters/application-basic-server/application-basic-delegate.h +++ b/src/app/clusters/application-basic-server/application-basic-delegate.h @@ -21,7 +21,10 @@ #include #include +#include + #include +#include namespace chip { namespace app { From c9c8b62056375994acc0c6ae8e9434e2d35022ff Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:57:36 -0400 Subject: [PATCH 24/45] Fix linter complain: application basic delegate was already stl-bound, add string as well --- scripts/tools/check_includes_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 0d9a7df82015be..b69c6f488e5484 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -121,7 +121,7 @@ 'src/platform/mbed/MbedEventTimeout.h': {'chrono'}, 'src/app/app-platform/ContentApp.h': {'list', 'string'}, - 'src/app/clusters/application-basic-server/application-basic-delegate.h': {'list'}, + 'src/app/clusters/application-basic-server/application-basic-delegate.h': {'list', 'string'}, 'src/app/clusters/application-basic-server/application-basic-server.cpp': {'list'}, 'src/app/clusters/application-launcher-server/application-launcher-delegate.h': {'list'}, 'src/app/clusters/audio-output-server/audio-output-delegate.h': {'list'}, From 3a86282ed03a1c8ae92b60b890f06dd94fff4ba8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 13:58:53 -0400 Subject: [PATCH 25/45] Fix Attributes.h using emberAfWriteAttribute --- examples/common/pigweed/rpc_services/Attributes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index 78e310f70ab5b5..e246c5361bd281 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include From 6b471fb6aba314588166b055540a7add69818972 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 14:00:51 -0400 Subject: [PATCH 26/45] Fix dependencies on AccountLogingManager ... needs config to access SERVER_ENDPOINT_COUNT --- .../tv-common/clusters/account-login/AccountLoginManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp index e0962cead0d913..9264553c14d002 100644 --- a/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp +++ b/examples/tv-app/tv-common/clusters/account-login/AccountLoginManager.cpp @@ -19,6 +19,7 @@ #include "AccountLoginManager.h" #include #include +#include using namespace std; using namespace chip::app::Clusters::AccountLogin; From 19f404fcb9a0aaa8ec56c232cf41b98ed26925b9 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 14:49:57 -0400 Subject: [PATCH 27/45] Add a lot of includes for std::string where std::string is used --- .../linux/AirQualitySensorAppAttrUpdateDelegate.cpp | 1 + .../linux/AirQualitySensorAppAttrUpdateDelegate.h | 2 ++ examples/air-quality-sensor-app/linux/main.cpp | 2 ++ examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp | 4 ++++ examples/all-clusters-app/esp32/main/QRCodeScreen.cpp | 2 ++ examples/all-clusters-app/esp32/main/StatusScreen.cpp | 2 ++ examples/all-clusters-app/esp32/main/include/QRCodeScreen.h | 1 + .../all-clusters-app/linux/AllClustersCommandDelegate.cpp | 2 ++ examples/all-clusters-app/linux/AllClustersCommandDelegate.h | 2 ++ examples/all-clusters-app/linux/AppOptions.cpp | 2 ++ examples/all-clusters-app/linux/AppOptions.h | 2 ++ .../linux/diagnostic-logs-provider-delegate-impl.cpp | 2 ++ .../linux/include/diagnostic-logs-provider-delegate-impl.h | 1 + examples/all-clusters-app/linux/main-common.cpp | 2 ++ .../all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp | 3 +++ examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp | 2 ++ examples/all-clusters-minimal-app/esp32/main/StatusScreen.cpp | 2 ++ .../esp32/main/include/QRCodeScreen.h | 1 + examples/android/CHIPTool/app/src/main/cpp/native-lib.cpp | 2 ++ examples/bridge-app/linux/Device.cpp | 2 ++ examples/bridge-app/linux/include/Device.h | 1 + examples/bridge-app/linux/main.cpp | 1 + examples/bridge-app/telink/include/Device.h | 1 + examples/bridge-app/telink/src/Device.cpp | 2 ++ .../chef/common/clusters/audio-output/AudioOutputManager.h | 1 + examples/chef/common/clusters/channel/ChannelManager.cpp | 1 + examples/chef/common/clusters/media-input/MediaInputManager.h | 2 ++ .../common/clusters/media-playback/MediaPlaybackManager.cpp | 2 ++ .../clusters/target-navigator/TargetNavigatorManager.cpp | 3 +++ .../common/clusters/target-navigator/TargetNavigatorManager.h | 2 ++ examples/chef/esp32/main/QRCodeScreen.cpp | 2 ++ examples/chef/esp32/main/include/QRCodeScreen.h | 1 + examples/chip-tool/commands/clusters/CustomArgument.h | 2 ++ .../commands/common/BDXDiagnosticLogsServerDelegate.cpp | 1 + examples/chip-tool/commands/common/CHIPCommand.cpp | 2 ++ examples/chip-tool/commands/common/CHIPCommand.h | 2 +- examples/chip-tool/commands/common/Command.cpp | 1 + examples/chip-tool/commands/common/Command.h | 1 + examples/chip-tool/commands/common/Commands.h | 1 + examples/chip-tool/commands/common/DeviceScanner.h | 1 + .../chip-tool/commands/interactive/InteractiveCommands.cpp | 3 +++ examples/chip-tool/commands/interactive/InteractiveCommands.h | 2 ++ .../commands/pairing/GetCommissionerRootCertificateCommand.h | 2 ++ examples/chip-tool/commands/pairing/IssueNOCChainCommand.h | 2 ++ examples/chip-tool/commands/pairing/PairingCommand.cpp | 2 ++ examples/chip-tool/commands/pairing/ToTLVCert.cpp | 2 ++ .../commands/payload/SetupPayloadGenerateCommand.cpp | 2 ++ .../chip-tool/commands/payload/SetupPayloadParseCommand.cpp | 2 ++ .../chip-tool/commands/payload/SetupPayloadParseCommand.h | 2 ++ examples/chip-tool/commands/payload/SetupPayloadVerhoeff.cpp | 2 ++ examples/chip-tool/commands/payload/SetupPayloadVerhoeff.h | 2 ++ examples/common/screen-framework/ScreenManager.cpp | 1 + examples/common/tracing/TraceDecoder.cpp | 2 ++ examples/common/tracing/TraceDecoder.h | 2 ++ examples/common/websocket-server/WebSocketServer.cpp | 1 + .../commands/common/CHIPCommandBridge.mm | 3 +++ .../commands/interactive/InteractiveCommands.mm | 2 ++ examples/lighting-app/esp32/main/DeviceWithDisplay.cpp | 2 ++ examples/lighting-app/esp32/main/QRCodeScreen.cpp | 2 ++ examples/lighting-app/esp32/main/StatusScreen.cpp | 2 ++ examples/lighting-app/esp32/main/include/QRCodeScreen.h | 1 + examples/lighting-app/linux/LightingAppCommandDelegate.cpp | 2 ++ examples/lighting-app/linux/main.cpp | 2 ++ examples/lock-app/linux/src/LockAppCommandDelegate.cpp | 1 + examples/placeholder/linux/InteractiveServer.cpp | 2 ++ examples/platform/esp32/pw_sys_io/sys_io_esp32.cc | 1 + examples/platform/linux/NamedPipeCommands.cpp | 2 ++ examples/platform/linux/Options.cpp | 1 + examples/platform/linux/system_rpc_server.cc | 2 ++ examples/platform/silabs/SilabsDeviceDataProvider.cpp | 2 ++ examples/platform/tizen/OptionsProxy.cpp | 2 ++ examples/rvc-app/linux/RvcAppCommandDelegate.cpp | 1 + examples/rvc-app/linux/RvcAppCommandDelegate.h | 2 ++ examples/rvc-app/linux/main.cpp | 2 ++ examples/rvc-app/rvc-common/include/rvc-device.h | 2 ++ examples/rvc-app/rvc-common/src/rvc-device.cpp | 2 ++ .../include/content-launcher/AppContentLauncherManager.cpp | 3 +++ .../include/content-launcher/AppContentLauncherManager.h | 3 +++ .../include/media-playback/AppMediaPlaybackManager.cpp | 2 ++ examples/tv-app/android/include/messages/MessagesManager.h | 2 ++ .../include/target-navigator/TargetNavigatorManager.cpp | 3 +++ .../android/include/target-navigator/TargetNavigatorManager.h | 3 +++ examples/tv-app/android/java/AppImpl.cpp | 2 ++ examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp | 2 ++ examples/tv-app/android/java/ChannelManager.cpp | 2 ++ examples/tv-app/android/java/ContentAppAttributeDelegate.cpp | 2 ++ examples/tv-app/android/java/ContentAppAttributeDelegate.h | 2 ++ examples/tv-app/android/java/ContentAppCommandDelegate.cpp | 2 ++ examples/tv-app/android/java/ContentAppCommandDelegate.h | 2 ++ examples/tv-app/android/java/ContentLauncherManager.cpp | 2 ++ examples/tv-app/android/java/MediaInputManager.cpp | 2 ++ examples/tv-app/android/java/MediaPlaybackManager.cpp | 2 ++ examples/tv-app/android/java/MessagesManager.cpp | 2 ++ examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp | 1 + .../clusters/content-launcher/ContentLauncherManager.cpp | 3 +++ .../clusters/content-launcher/ContentLauncherManager.h | 1 + .../clusters/media-playback/MediaPlaybackManager.cpp | 2 ++ .../tv-app/tv-common/clusters/messages/MessagesManager.cpp | 1 + examples/tv-app/tv-common/clusters/messages/MessagesManager.h | 1 + .../clusters/target-navigator/TargetNavigatorManager.cpp | 2 ++ .../clusters/target-navigator/TargetNavigatorManager.h | 3 +++ examples/tv-app/tv-common/shell/AppTvShellCommands.cpp | 2 ++ examples/tv-app/tv-common/src/AppTv.cpp | 2 ++ .../App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.cpp | 2 ++ .../tv-casting-common/commands/common/CHIPCommand.cpp | 2 ++ src/app/app-platform/ContentApp.cpp | 2 ++ src/app/app-platform/ContentApp.h | 2 ++ src/app/app-platform/ContentAppPlatform.cpp | 2 ++ .../application-basic-server/application-basic-server.cpp | 1 + .../application-launcher-server.cpp | 2 ++ src/app/tests/suites/credentials/TestHarnessDACProvider.cpp | 1 + src/app/util/attribute-storage.h | 1 - src/controller/CHIPDeviceController.cpp | 1 + src/controller/ExamplePersistentStorage.cpp | 2 ++ src/controller/java/AndroidCallbacks.cpp | 1 + src/controller/java/AndroidCommissioningWindowOpener.cpp | 2 ++ src/controller/java/AndroidDeviceControllerWrapper.cpp | 1 + src/controller/java/AndroidInteractionClient.cpp | 2 ++ src/controller/java/OTAProviderDelegateBridge.cpp | 2 ++ .../java/zap-generated/CHIPAttributeTLVValueDecoder.cpp | 2 ++ .../java/zap-generated/CHIPEventTLVValueDecoder.cpp | 2 ++ .../ChipDeviceController-ScriptDevicePairingDelegate.cpp | 2 ++ src/crypto/tests/TestPersistentStorageOpKeyStore.cpp | 2 ++ src/darwin/Framework/CHIP/MTRDeviceController.mm | 1 + src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.mm | 2 ++ src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.mm | 2 ++ src/darwin/Framework/CHIP/MTRSetupPayload.mm | 2 ++ src/lib/support/jsontlv/TextFormat.cpp | 1 + src/lib/support/jsontlv/TlvToJson.cpp | 2 ++ src/lib/support/tests/TestIniEscaping.cpp | 2 ++ src/lib/support/tests/TestJsonToTlv.cpp | 2 ++ src/lib/support/tests/TestJsonToTlvToJson.cpp | 2 ++ src/lib/support/tests/TestTlvToJson.cpp | 2 ++ src/platform/Darwin/DnssdContexts.cpp | 2 ++ src/platform/Darwin/DnssdImpl.cpp | 2 ++ src/platform/Darwin/DnssdType.cpp | 1 + src/platform/Darwin/DnssdType.h | 1 + src/platform/Linux/CHIPLinuxStorage.h | 1 + src/platform/Linux/CHIPLinuxStorageIni.h | 3 +++ src/platform/Linux/DnssdImpl.cpp | 1 + src/platform/Linux/bluez/BluezObjectManager.cpp | 1 + src/platform/mt793x/DnssdContexts.cpp | 2 ++ src/platform/mt793x/DnssdImpl.cpp | 1 + src/platform/nxp/mw320/ConnectivityManagerImpl.cpp | 1 + src/platform/nxp/mw320/ConnectivityManagerImpl.h | 2 ++ src/platform/webos/BLEManagerImpl.cpp | 1 + src/platform/webos/BLEManagerImpl.h | 2 ++ src/platform/webos/CHIPWebOSStorage.h | 1 + src/platform/webos/CHIPWebOSStorageIni.h | 2 ++ src/platform/webos/ChipDeviceScanner.cpp | 2 ++ src/platform/webos/ChipDeviceScanner.h | 1 + src/platform/webos/DnssdImpl.cpp | 1 + src/qrcodetool/setup_payload_commands.cpp | 2 ++ src/setup_payload/AdditionalDataPayloadParser.cpp | 1 + src/setup_payload/Base38Decode.cpp | 2 ++ src/setup_payload/ManualSetupPayloadGenerator.cpp | 1 + src/setup_payload/QRCodeSetupPayloadGenerator.cpp | 1 + src/setup_payload/QRCodeSetupPayloadGenerator.h | 2 ++ src/setup_payload/QRCodeSetupPayloadParser.cpp | 1 + src/setup_payload/SetupPayload.cpp | 1 + src/setup_payload/SetupPayloadHelper.cpp | 1 + src/setup_payload/tests/TestHelpers.h | 2 ++ src/tracing/json/json_tracing.h | 1 + 163 files changed, 285 insertions(+), 2 deletions(-) diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp index 41a53d4fd94c7d..7aaa873a906706 100644 --- a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp +++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp @@ -30,6 +30,7 @@ #include #include +#include using namespace chip; using namespace chip::app; diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h index e608b7a671457d..88b60d13174300 100644 --- a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h +++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.h @@ -23,6 +23,8 @@ #include #include +#include + class AirQualitySensorAttrUpdateHandler { public: diff --git a/examples/air-quality-sensor-app/linux/main.cpp b/examples/air-quality-sensor-app/linux/main.cpp index d8fcbffd0262cc..39a13ba1c8e20c 100644 --- a/examples/air-quality-sensor-app/linux/main.cpp +++ b/examples/air-quality-sensor-app/linux/main.cpp @@ -22,6 +22,8 @@ #include +#include + #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED #include #include diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 0668411a9bfbd3..6f35995a445110 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -22,6 +22,10 @@ #include #include +#include +#include +#include + #if CONFIG_HAVE_DISPLAY using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp b/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp index 578f44003f435e..ac39b9498e9f21 100644 --- a/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp +++ b/examples/all-clusters-app/esp32/main/QRCodeScreen.cpp @@ -42,6 +42,8 @@ #include #include +#include + // TODO need sensible library tag when put in library extern const char TAG[]; diff --git a/examples/all-clusters-app/esp32/main/StatusScreen.cpp b/examples/all-clusters-app/esp32/main/StatusScreen.cpp index 55f42a32723823..0013bda66c5c70 100644 --- a/examples/all-clusters-app/esp32/main/StatusScreen.cpp +++ b/examples/all-clusters-app/esp32/main/StatusScreen.cpp @@ -45,6 +45,8 @@ #include #include +#include + #define MAX_LENGTH_SMALL_FONT 30 using namespace chip; diff --git a/examples/all-clusters-app/esp32/main/include/QRCodeScreen.h b/examples/all-clusters-app/esp32/main/include/QRCodeScreen.h index ced5be2ac3a670..9599280b7fd3b0 100644 --- a/examples/all-clusters-app/esp32/main/include/QRCodeScreen.h +++ b/examples/all-clusters-app/esp32/main/include/QRCodeScreen.h @@ -31,6 +31,7 @@ #include "ScreenManager.h" #include +#include #include class QRCodeScreen : public Screen diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 4450a48e648e3c..8effe6426cc49d 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -36,6 +36,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index 4022b06e9f8565..f097c539b54fb6 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -23,6 +23,8 @@ #include #include +#include + class AllClustersAppCommandHandler { public: diff --git a/examples/all-clusters-app/linux/AppOptions.cpp b/examples/all-clusters-app/linux/AppOptions.cpp index 50be6561c6bb4a..bd5147102715eb 100644 --- a/examples/all-clusters-app/linux/AppOptions.cpp +++ b/examples/all-clusters-app/linux/AppOptions.cpp @@ -21,6 +21,8 @@ #include #include +#include + using namespace chip::ArgParser; using chip::ArgParser::OptionDef; diff --git a/examples/all-clusters-app/linux/AppOptions.h b/examples/all-clusters-app/linux/AppOptions.h index dfdd2c0e66fe70..69c1af83b72909 100644 --- a/examples/all-clusters-app/linux/AppOptions.h +++ b/examples/all-clusters-app/linux/AppOptions.h @@ -22,6 +22,8 @@ #include +#include + class AppOptions { public: diff --git a/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp b/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp index 4dc94da1338c28..afb75a7ef666c4 100644 --- a/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp +++ b/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp @@ -20,6 +20,8 @@ #include +#include + using namespace chip; using namespace chip::app::Clusters::DiagnosticLogs; diff --git a/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h b/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h index c0e69f1c5bde0b..f90c8d600f4526 100644 --- a/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h +++ b/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h @@ -22,6 +22,7 @@ #include #include +#include namespace chip { namespace app { diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index d2d140e05896c6..73af031ecbdb5d 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -60,6 +60,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::DeviceLayer; diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index c588c84bcff2d0..f56a3e69a023e7 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -21,6 +21,9 @@ #include #include +#include +#include + #if CONFIG_HAVE_DISPLAY using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp b/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp index 578f44003f435e..ac39b9498e9f21 100644 --- a/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/QRCodeScreen.cpp @@ -42,6 +42,8 @@ #include #include +#include + // TODO need sensible library tag when put in library extern const char TAG[]; diff --git a/examples/all-clusters-minimal-app/esp32/main/StatusScreen.cpp b/examples/all-clusters-minimal-app/esp32/main/StatusScreen.cpp index 55f42a32723823..0013bda66c5c70 100644 --- a/examples/all-clusters-minimal-app/esp32/main/StatusScreen.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/StatusScreen.cpp @@ -45,6 +45,8 @@ #include #include +#include + #define MAX_LENGTH_SMALL_FONT 30 using namespace chip; diff --git a/examples/all-clusters-minimal-app/esp32/main/include/QRCodeScreen.h b/examples/all-clusters-minimal-app/esp32/main/include/QRCodeScreen.h index da0ca8de53fe20..c02cd619d3ca82 100644 --- a/examples/all-clusters-minimal-app/esp32/main/include/QRCodeScreen.h +++ b/examples/all-clusters-minimal-app/esp32/main/include/QRCodeScreen.h @@ -32,6 +32,7 @@ #include "ScreenManager.h" #include +#include #include class QRCodeScreen : public Screen diff --git a/examples/android/CHIPTool/app/src/main/cpp/native-lib.cpp b/examples/android/CHIPTool/app/src/main/cpp/native-lib.cpp index 4a0235adbff06e..abf57152cd153d 100644 --- a/examples/android/CHIPTool/app/src/main/cpp/native-lib.cpp +++ b/examples/android/CHIPTool/app/src/main/cpp/native-lib.cpp @@ -26,6 +26,8 @@ #include #include +#include + // This is just a sample function to demonstrate end-to-end calling in/out of CHIP stack // is working. std::string base38Encode(void) diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp index e049e270c49f42..d7862260f820d2 100644 --- a/examples/bridge-app/linux/Device.cpp +++ b/examples/bridge-app/linux/Device.cpp @@ -22,6 +22,8 @@ #include #include +#include + using namespace chip::app::Clusters::Actions; Device::Device(const char * szDeviceName, std::string szLocation) diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h index d5c8434b29eda1..1a5f5bba795394 100644 --- a/examples/bridge-app/linux/include/Device.h +++ b/examples/bridge-app/linux/include/Device.h @@ -24,6 +24,7 @@ #include #include +#include #include class Device diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 9b3a98b71962b0..3016ece7a2e768 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -48,6 +48,7 @@ #include #include +#include #include using namespace chip; diff --git a/examples/bridge-app/telink/include/Device.h b/examples/bridge-app/telink/include/Device.h index bd91dcb9f346c0..19b3b1bae7c1af 100644 --- a/examples/bridge-app/telink/include/Device.h +++ b/examples/bridge-app/telink/include/Device.h @@ -20,6 +20,7 @@ #include #include +#include #include diff --git a/examples/bridge-app/telink/src/Device.cpp b/examples/bridge-app/telink/src/Device.cpp index 053bf2ce187679..769f1ec420f154 100644 --- a/examples/bridge-app/telink/src/Device.cpp +++ b/examples/bridge-app/telink/src/Device.cpp @@ -21,6 +21,8 @@ #include #include +#include + using namespace ::chip::Platform; Device::Device(const char * szDeviceName, const char * szLocation) diff --git a/examples/chef/common/clusters/audio-output/AudioOutputManager.h b/examples/chef/common/clusters/audio-output/AudioOutputManager.h index 5f9157de773ee7..ad64b7c9c96d5d 100644 --- a/examples/chef/common/clusters/audio-output/AudioOutputManager.h +++ b/examples/chef/common/clusters/audio-output/AudioOutputManager.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include class AudioOutputManager : public chip::app::Clusters::AudioOutput::Delegate diff --git a/examples/chef/common/clusters/channel/ChannelManager.cpp b/examples/chef/common/clusters/channel/ChannelManager.cpp index 36df31af6de280..c47bf447dd3124 100644 --- a/examples/chef/common/clusters/channel/ChannelManager.cpp +++ b/examples/chef/common/clusters/channel/ChannelManager.cpp @@ -23,6 +23,7 @@ #include #include +#include #include using namespace chip; diff --git a/examples/chef/common/clusters/media-input/MediaInputManager.h b/examples/chef/common/clusters/media-input/MediaInputManager.h index 104db65e2bbe97..ebd4a436fdbf24 100644 --- a/examples/chef/common/clusters/media-input/MediaInputManager.h +++ b/examples/chef/common/clusters/media-input/MediaInputManager.h @@ -20,6 +20,8 @@ #include #include + +#include #include class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate diff --git a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp index 512da2966d68b6..14be124252a7c0 100644 --- a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp +++ b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp @@ -21,6 +21,8 @@ #include #include +#include + using namespace std; using namespace chip::app::DataModel; using namespace chip::app::Clusters::MediaPlayback; diff --git a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp index 17acf11b39bf23..be20f92f53a8fe 100644 --- a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp +++ b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.cpp @@ -20,6 +20,9 @@ #include "TargetNavigatorManager.h" #include +#include +#include + using namespace std; using namespace chip::app; using namespace chip::app::Clusters::TargetNavigator; diff --git a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.h b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.h index 21a08b9595cd82..e9528081661e8d 100644 --- a/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.h +++ b/examples/chef/common/clusters/target-navigator/TargetNavigatorManager.h @@ -19,6 +19,8 @@ #include +#include + class TargetNavigatorManager : public chip::app::Clusters::TargetNavigator::Delegate { using TargetInfoType = chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::Type; diff --git a/examples/chef/esp32/main/QRCodeScreen.cpp b/examples/chef/esp32/main/QRCodeScreen.cpp index 578f44003f435e..ac39b9498e9f21 100644 --- a/examples/chef/esp32/main/QRCodeScreen.cpp +++ b/examples/chef/esp32/main/QRCodeScreen.cpp @@ -42,6 +42,8 @@ #include #include +#include + // TODO need sensible library tag when put in library extern const char TAG[]; diff --git a/examples/chef/esp32/main/include/QRCodeScreen.h b/examples/chef/esp32/main/include/QRCodeScreen.h index e24fcd86d81e1a..f4994a3d6c372a 100644 --- a/examples/chef/esp32/main/include/QRCodeScreen.h +++ b/examples/chef/esp32/main/include/QRCodeScreen.h @@ -31,6 +31,7 @@ #if CONFIG_HAVE_DISPLAY #include +#include #include class QRCodeScreen : public Screen diff --git a/examples/chip-tool/commands/clusters/CustomArgument.h b/examples/chip-tool/commands/clusters/CustomArgument.h index f977cd20c1a027..c7d81414659755 100644 --- a/examples/chip-tool/commands/clusters/CustomArgument.h +++ b/examples/chip-tool/commands/clusters/CustomArgument.h @@ -24,6 +24,8 @@ #include #include +#include + #include "JsonParser.h" namespace { diff --git a/examples/chip-tool/commands/common/BDXDiagnosticLogsServerDelegate.cpp b/examples/chip-tool/commands/common/BDXDiagnosticLogsServerDelegate.cpp index 2a5b2d5d7c97a1..9be365ab27e2bf 100644 --- a/examples/chip-tool/commands/common/BDXDiagnosticLogsServerDelegate.cpp +++ b/examples/chip-tool/commands/common/BDXDiagnosticLogsServerDelegate.cpp @@ -18,6 +18,7 @@ #include "BDXDiagnosticLogsServerDelegate.h" +#include #include constexpr const char kTmpDir[] = "/tmp/"; diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index 29de06b5e0069c..c35eb11836d6c8 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -27,6 +27,8 @@ #include #include +#include + #if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED #include "TraceDecoder.h" #include "TraceHandlers.h" diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 55817b5213e589..50ab851d284502 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -37,7 +37,7 @@ #include #include -#pragma once +#include inline constexpr char kIdentityAlpha[] = "alpha"; inline constexpr char kIdentityBeta[] = "beta"; diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index 8d32a3fd1fc4f7..2c4f1eb3540e9f 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/examples/chip-tool/commands/common/Command.h b/examples/chip-tool/commands/common/Command.h index 26b80e54b6b322..556716a5c1d2ca 100644 --- a/examples/chip-tool/commands/common/Command.h +++ b/examples/chip-tool/commands/common/Command.h @@ -30,6 +30,7 @@ #include #include #include +#include #include class Command; diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h index bb6c62dcb035fe..e6a392cbeec248 100644 --- a/examples/chip-tool/commands/common/Commands.h +++ b/examples/chip-tool/commands/common/Commands.h @@ -24,6 +24,7 @@ #include "Command.h" #include +#include class Commands { diff --git a/examples/chip-tool/commands/common/DeviceScanner.h b/examples/chip-tool/commands/common/DeviceScanner.h index bcdcf26c84feb1..0f29c87175a18e 100644 --- a/examples/chip-tool/commands/common/DeviceScanner.h +++ b/examples/chip-tool/commands/common/DeviceScanner.h @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp index 284c145cfe0569..92861f7711d566 100644 --- a/examples/chip-tool/commands/interactive/InteractiveCommands.cpp +++ b/examples/chip-tool/commands/interactive/InteractiveCommands.cpp @@ -22,6 +22,9 @@ #include +#include +#include + constexpr char kInteractiveModePrompt[] = ">>> "; constexpr char kInteractiveModeHistoryFileName[] = "chip_tool_history"; constexpr char kInteractiveModeStopCommand[] = "quit()"; diff --git a/examples/chip-tool/commands/interactive/InteractiveCommands.h b/examples/chip-tool/commands/interactive/InteractiveCommands.h index 88a33dcb26c96f..a3b66769ced308 100644 --- a/examples/chip-tool/commands/interactive/InteractiveCommands.h +++ b/examples/chip-tool/commands/interactive/InteractiveCommands.h @@ -24,6 +24,8 @@ #include +#include + class Commands; class InteractiveCommand : public CHIPCommand diff --git a/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h b/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h index 7a350a9ca16bb8..88fa95a139c9ee 100644 --- a/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h +++ b/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h @@ -22,6 +22,8 @@ #include "ToTLVCert.h" +#include + class GetCommissionerRootCertificateCommand : public CHIPCommand { public: diff --git a/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h b/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h index 8b4c273c3820f8..23671a8719cfc7 100644 --- a/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h +++ b/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h @@ -22,6 +22,8 @@ #include "ToTLVCert.h" +#include + class IssueNOCChainCommand : public CHIPCommand { public: diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index f872692dc45235..0f47e48314b5a4 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -28,6 +28,8 @@ #include #include +#include + using namespace ::chip; using namespace ::chip::Controller; diff --git a/examples/chip-tool/commands/pairing/ToTLVCert.cpp b/examples/chip-tool/commands/pairing/ToTLVCert.cpp index 2c06b7f1629171..3a54d37d1a29e8 100644 --- a/examples/chip-tool/commands/pairing/ToTLVCert.cpp +++ b/examples/chip-tool/commands/pairing/ToTLVCert.cpp @@ -21,6 +21,8 @@ #include #include +#include + constexpr char kBase64Header[] = "base64:"; constexpr size_t kBase64HeaderLen = ArraySize(kBase64Header) - 1; diff --git a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp index c6afc4a4715be5..1a9a7e4e4ab8e4 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp @@ -24,6 +24,8 @@ #include #include +#include + using namespace ::chip; void SetupPayloadGenerateCommand::ConfigurePayload(SetupPayload & payload) diff --git a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp index 1bec63002776d4..7ab62c7da5101d 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.cpp @@ -22,6 +22,8 @@ #include #include +#include + using namespace ::chip; namespace { diff --git a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.h b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.h index 08474023a1ff9f..925df0a51f1f00 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadParseCommand.h +++ b/examples/chip-tool/commands/payload/SetupPayloadParseCommand.h @@ -21,6 +21,8 @@ #include "../common/Command.h" #include +#include + class SetupPayloadParseCommand : public Command { public: diff --git a/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.cpp b/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.cpp index 238e753708921c..d0dcc8ffaa8854 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.cpp @@ -21,6 +21,8 @@ #include #include +#include + using namespace ::chip; CHIP_ERROR SetupPayloadVerhoeffVerify::Run() diff --git a/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.h b/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.h index 0f531e3dd822bb..bf61ead3589b12 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.h +++ b/examples/chip-tool/commands/payload/SetupPayloadVerhoeff.h @@ -21,6 +21,8 @@ #include "../common/Command.h" #include +#include + class SetupPayloadVerhoeffVerify : public Command { public: diff --git a/examples/common/screen-framework/ScreenManager.cpp b/examples/common/screen-framework/ScreenManager.cpp index 0d3525956d3f35..6e2dfe141e03ec 100644 --- a/examples/common/screen-framework/ScreenManager.cpp +++ b/examples/common/screen-framework/ScreenManager.cpp @@ -30,6 +30,7 @@ #include #include +#include #include uint16_t ScreenFontHeight; diff --git a/examples/common/tracing/TraceDecoder.cpp b/examples/common/tracing/TraceDecoder.cpp index 1d6828b1dfe9b2..115c5d022712af 100644 --- a/examples/common/tracing/TraceDecoder.cpp +++ b/examples/common/tracing/TraceDecoder.cpp @@ -25,7 +25,9 @@ #include #include #include +#include #include +#include constexpr uint16_t kMaxLineLen = 4096; constexpr const char jsonPrefix[] = " json\t"; diff --git a/examples/common/tracing/TraceDecoder.h b/examples/common/tracing/TraceDecoder.h index 4630b556e329b7..9a99041578d94b 100644 --- a/examples/common/tracing/TraceDecoder.h +++ b/examples/common/tracing/TraceDecoder.h @@ -24,6 +24,8 @@ #include #include +#include + namespace chip { namespace trace { diff --git a/examples/common/websocket-server/WebSocketServer.cpp b/examples/common/websocket-server/WebSocketServer.cpp index 2dba035601ea0e..2f5fb9fd2bd0c9 100644 --- a/examples/common/websocket-server/WebSocketServer.cpp +++ b/examples/common/websocket-server/WebSocketServer.cpp @@ -23,6 +23,7 @@ #include #include +#include constexpr uint16_t kDefaultWebSocketServerPort = 9002; constexpr uint16_t kMaxMessageBufferLen = 8192; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 205b56d6a64e3d..bb232e3772135e 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -26,6 +26,9 @@ #include "MTRError_Utils.h" +#include +#include + static CHIPToolPersistentStorageDelegate * storage = nil; std::set CHIPCommandBridge::sDeferredCleanups; std::map CHIPCommandBridge::mControllers; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index abcde3f021cfcf..0cfcdb6ecd35df 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -22,6 +22,8 @@ #include #include +#include + #include constexpr char kInteractiveModePrompt[] = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> "; diff --git a/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp b/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp index b869ba5ae61fbb..2027bbf0883ef4 100644 --- a/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/lighting-app/esp32/main/DeviceWithDisplay.cpp @@ -25,6 +25,8 @@ #include #include +#include + using namespace ::chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; diff --git a/examples/lighting-app/esp32/main/QRCodeScreen.cpp b/examples/lighting-app/esp32/main/QRCodeScreen.cpp index d4113c4d0889b9..a75c29e9170d06 100644 --- a/examples/lighting-app/esp32/main/QRCodeScreen.cpp +++ b/examples/lighting-app/esp32/main/QRCodeScreen.cpp @@ -42,6 +42,8 @@ #include #include +#include + namespace { constexpr int kVersion = 4; diff --git a/examples/lighting-app/esp32/main/StatusScreen.cpp b/examples/lighting-app/esp32/main/StatusScreen.cpp index 698a12d835ce06..b97da9d671af7e 100644 --- a/examples/lighting-app/esp32/main/StatusScreen.cpp +++ b/examples/lighting-app/esp32/main/StatusScreen.cpp @@ -45,6 +45,8 @@ #include #include +#include + #define MAX_LENGTH_SMALL_FONT 30 using namespace chip; diff --git a/examples/lighting-app/esp32/main/include/QRCodeScreen.h b/examples/lighting-app/esp32/main/include/QRCodeScreen.h index 3479c7d0256103..e6eb45d6ca2251 100644 --- a/examples/lighting-app/esp32/main/include/QRCodeScreen.h +++ b/examples/lighting-app/esp32/main/include/QRCodeScreen.h @@ -25,6 +25,7 @@ #include "ScreenManager.h" #include +#include #include class QRCodeScreen : public Screen diff --git a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp index cce765f58fd680..cc5af976eb8b1a 100644 --- a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp +++ b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp @@ -27,6 +27,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 149898bf86360f..56cafc2e527509 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -26,6 +26,8 @@ #include #include +#include + #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED #include #include diff --git a/examples/lock-app/linux/src/LockAppCommandDelegate.cpp b/examples/lock-app/linux/src/LockAppCommandDelegate.cpp index 356888b992fde2..7f2a1c87ec6d9f 100644 --- a/examples/lock-app/linux/src/LockAppCommandDelegate.cpp +++ b/examples/lock-app/linux/src/LockAppCommandDelegate.cpp @@ -21,6 +21,7 @@ #include #include +#include #include using chip::to_underlying; diff --git a/examples/placeholder/linux/InteractiveServer.cpp b/examples/placeholder/linux/InteractiveServer.cpp index daebcb6dfc6cfa..e9ca422d016f42 100644 --- a/examples/placeholder/linux/InteractiveServer.cpp +++ b/examples/placeholder/linux/InteractiveServer.cpp @@ -23,6 +23,8 @@ #include #include +#include + using namespace chip::DeviceLayer; namespace { diff --git a/examples/platform/esp32/pw_sys_io/sys_io_esp32.cc b/examples/platform/esp32/pw_sys_io/sys_io_esp32.cc index c5591a1f129762..5991b9c6e27674 100644 --- a/examples/platform/esp32/pw_sys_io/sys_io_esp32.cc +++ b/examples/platform/esp32/pw_sys_io/sys_io_esp32.cc @@ -29,6 +29,7 @@ #include #include #include +#include #define ECHO_TEST_TXD (CONFIG_EXAMPLE_UART_TXD) #define ECHO_TEST_RXD (CONFIG_EXAMPLE_UART_RXD) diff --git a/examples/platform/linux/NamedPipeCommands.cpp b/examples/platform/linux/NamedPipeCommands.cpp index 9ec28b012188c3..c77165e9000cf8 100644 --- a/examples/platform/linux/NamedPipeCommands.cpp +++ b/examples/platform/linux/NamedPipeCommands.cpp @@ -26,6 +26,8 @@ #include #include +#include + static constexpr const size_t kChipEventCmdBufSize = 256; CHIP_ERROR NamedPipeCommands::Start(std::string & path, NamedPipeCommandDelegate * delegate) diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index 8bf5c0b7f4e4b4..083b8ddf8dd420 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "Options.h" diff --git a/examples/platform/linux/system_rpc_server.cc b/examples/platform/linux/system_rpc_server.cc index c4e45be56360a6..6323ad597d0cfe 100644 --- a/examples/platform/linux/system_rpc_server.cc +++ b/examples/platform/linux/system_rpc_server.cc @@ -32,6 +32,8 @@ #include "pw_rpc_system_server/rpc_server.h" #include "pw_stream/socket_stream.h" +#include + namespace pw::rpc::system_server { namespace { diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.cpp b/examples/platform/silabs/SilabsDeviceDataProvider.cpp index eb0f8fee82ff1c..c487c334819dd5 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.cpp +++ b/examples/platform/silabs/SilabsDeviceDataProvider.cpp @@ -30,6 +30,8 @@ #include #endif // SIWX917_USE_COMISSIONABLE_DATA +#include + namespace chip { namespace DeviceLayer { namespace Silabs { diff --git a/examples/platform/tizen/OptionsProxy.cpp b/examples/platform/tizen/OptionsProxy.cpp index c00ac172e6627d..1c2d41ca1308d1 100644 --- a/examples/platform/tizen/OptionsProxy.cpp +++ b/examples/platform/tizen/OptionsProxy.cpp @@ -25,6 +25,8 @@ #include #include +#include + namespace { struct Option diff --git a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp index 87eb1ee0f75e0b..58610e1b11d112 100644 --- a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp +++ b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp @@ -20,6 +20,7 @@ #include #include "rvc-device.h" +#include #include using namespace chip; diff --git a/examples/rvc-app/linux/RvcAppCommandDelegate.h b/examples/rvc-app/linux/RvcAppCommandDelegate.h index ad7c283bb85f59..366772bf0842ab 100644 --- a/examples/rvc-app/linux/RvcAppCommandDelegate.h +++ b/examples/rvc-app/linux/RvcAppCommandDelegate.h @@ -23,6 +23,8 @@ #include #include +#include + class RvcAppCommandHandler { public: diff --git a/examples/rvc-app/linux/main.cpp b/examples/rvc-app/linux/main.cpp index 4a332123345397..7c5c555b5eb664 100644 --- a/examples/rvc-app/linux/main.cpp +++ b/examples/rvc-app/linux/main.cpp @@ -19,6 +19,8 @@ #include "rvc-device.h" #include +#include + #define RVC_ENDPOINT 1 using namespace chip; diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h index f2db0a75a5a23e..f6a33a6199dd23 100644 --- a/examples/rvc-app/rvc-common/include/rvc-device.h +++ b/examples/rvc-app/rvc-common/include/rvc-device.h @@ -5,6 +5,8 @@ #include #include +#include + namespace chip { namespace app { namespace Clusters { diff --git a/examples/rvc-app/rvc-common/src/rvc-device.cpp b/examples/rvc-app/rvc-common/src/rvc-device.cpp index b4e79d673880be..63da53c0e0ee53 100644 --- a/examples/rvc-app/rvc-common/src/rvc-device.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-device.cpp @@ -1,5 +1,7 @@ #include "rvc-device.h" +#include + using namespace chip::app::Clusters; void RvcDevice::Init() diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp index 86eabb83f99066..671daab4b239c4 100644 --- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp +++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp @@ -21,6 +21,9 @@ #include #include +#include +#include + using namespace std; using namespace chip::app; using namespace chip::app::Clusters; diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h index f9e05a1f17a68b..47e6c9f913d2dc 100644 --- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h +++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h @@ -22,6 +22,9 @@ #include #include +#include +#include + using chip::CharSpan; using chip::EndpointId; using chip::app::AttributeValueEncoder; diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp index 087f1742c355a0..9f5c2e5d6691ce 100644 --- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp +++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp @@ -26,6 +26,8 @@ #include #include +#include + using namespace std; using namespace chip; using namespace chip::app; diff --git a/examples/tv-app/android/include/messages/MessagesManager.h b/examples/tv-app/android/include/messages/MessagesManager.h index d6759061800621..fbc48bf379df38 100644 --- a/examples/tv-app/android/include/messages/MessagesManager.h +++ b/examples/tv-app/android/include/messages/MessagesManager.h @@ -18,7 +18,9 @@ #pragma once #include + #include +#include class MessagesManager : public chip::app::Clusters::Messages::Delegate { diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp index d18c58d0bdb92d..fe7884227880df 100644 --- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.cpp @@ -20,6 +20,9 @@ #include #include +#include +#include + using namespace std; using namespace chip::app; using namespace chip::app::Clusters::TargetNavigator; diff --git a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h index 10db972704daa9..370f843a6af22a 100644 --- a/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h +++ b/examples/tv-app/android/include/target-navigator/TargetNavigatorManager.h @@ -20,6 +20,9 @@ #include "../../java/ContentAppAttributeDelegate.h" #include +#include +#include + using chip::CharSpan; using chip::EndpointId; using chip::app::AttributeValueEncoder; diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 59a64327967dee..f5dabe617054ee 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -45,6 +45,8 @@ #include #include +#include + using namespace chip; using namespace chip::app::Clusters; using namespace chip::AppPlatform; diff --git a/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp b/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp index 2b85aa15eda4ac..f15ef7bebae54c 100644 --- a/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp +++ b/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp @@ -25,6 +25,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index c7067132e46e9d..aa31043a3918d3 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -27,6 +27,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters::Channel; diff --git a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp index 00b4ca7a225b2c..651ce4562c94ef 100644 --- a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp @@ -31,6 +31,8 @@ #include #include +#include + namespace chip { namespace AppPlatform { diff --git a/examples/tv-app/android/java/ContentAppAttributeDelegate.h b/examples/tv-app/android/java/ContentAppAttributeDelegate.h index 25d6367762c58f..8a39b004f4f821 100644 --- a/examples/tv-app/android/java/ContentAppAttributeDelegate.h +++ b/examples/tv-app/android/java/ContentAppAttributeDelegate.h @@ -28,6 +28,8 @@ #include #include +#include + namespace chip { namespace AppPlatform { diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index 2e5dcbe0f3b5e1..a4a8d09396ae53 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -34,6 +34,8 @@ #include #include +#include + namespace chip { namespace AppPlatform { diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.h b/examples/tv-app/android/java/ContentAppCommandDelegate.h index 750aff6d34853c..f033b1afa79189 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.h +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.h @@ -30,6 +30,8 @@ #include #include +#include + namespace chip { namespace AppPlatform { diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 9aacc2d6e56b22..449f6d136f9e42 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -27,6 +27,8 @@ #include #include +#include + using namespace std; using namespace chip; using namespace chip::app::DataModel; diff --git a/examples/tv-app/android/java/MediaInputManager.cpp b/examples/tv-app/android/java/MediaInputManager.cpp index 0f1c922243c2be..0c5565cecc5cf7 100644 --- a/examples/tv-app/android/java/MediaInputManager.cpp +++ b/examples/tv-app/android/java/MediaInputManager.cpp @@ -23,6 +23,8 @@ #include #include +#include + using namespace chip; using namespace chip::app::Clusters::MediaInput; diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 99afaaa02c942b..90d2c76d34d6bc 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -28,6 +28,8 @@ #include "MediaPlaybackManager.h" +#include + using namespace chip; using namespace chip::app; using namespace chip::app::DataModel; diff --git a/examples/tv-app/android/java/MessagesManager.cpp b/examples/tv-app/android/java/MessagesManager.cpp index ad214e117d33d8..0be93b8c1d7761 100644 --- a/examples/tv-app/android/java/MessagesManager.cpp +++ b/examples/tv-app/android/java/MessagesManager.cpp @@ -27,6 +27,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters::Messages; diff --git a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp index 75bb07b5438dd1..23624f3c0ade66 100644 --- a/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp +++ b/examples/tv-app/tv-common/clusters/channel/ChannelManager.cpp @@ -19,6 +19,7 @@ #include #include +#include #include using namespace chip; diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp index b062c64b95efd6..f0519619c2052a 100644 --- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.cpp @@ -20,6 +20,9 @@ #include #include +#include +#include + using namespace std; using namespace chip::app; using namespace chip::app::Clusters; diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h index 2bc9e7006fc3ff..eb470068386e3e 100644 --- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include using chip::CharSpan; diff --git a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp index 456aba87b61b3a..0e79c6b2a3e9a3 100644 --- a/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/tv-common/clusters/media-playback/MediaPlaybackManager.cpp @@ -19,6 +19,8 @@ #include #include +#include + using namespace std; using namespace chip::app::DataModel; using namespace chip::app::Clusters::MediaPlayback; diff --git a/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp b/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp index 461e35524c0736..681cd56d6647fa 100644 --- a/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp +++ b/examples/tv-app/tv-common/clusters/messages/MessagesManager.cpp @@ -18,6 +18,7 @@ #include "MessagesManager.h" #include +#include #include using namespace std; diff --git a/examples/tv-app/tv-common/clusters/messages/MessagesManager.h b/examples/tv-app/tv-common/clusters/messages/MessagesManager.h index 777f202e28548a..1662731cca4c7b 100644 --- a/examples/tv-app/tv-common/clusters/messages/MessagesManager.h +++ b/examples/tv-app/tv-common/clusters/messages/MessagesManager.h @@ -21,6 +21,7 @@ #include #include +#include #include struct CachedMessageOption diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp index 51be2c99cc4b08..dced0371fb9f39 100644 --- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp +++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.cpp @@ -19,6 +19,8 @@ #include #include +#include + using namespace std; using namespace chip::app; using namespace chip::app::Clusters::TargetNavigator; diff --git a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h index d600f045ff4a4b..5194302415f9e3 100644 --- a/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h +++ b/examples/tv-app/tv-common/clusters/target-navigator/TargetNavigatorManager.h @@ -19,6 +19,9 @@ #include +#include +#include + using chip::CharSpan; using chip::app::AttributeValueEncoder; using chip::app::CommandResponseHelper; diff --git a/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp b/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp index 6b946766fae60a..ee85cf099ff380 100644 --- a/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp +++ b/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp @@ -33,6 +33,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include using namespace chip::AppPlatform; diff --git a/examples/tv-app/tv-common/src/AppTv.cpp b/examples/tv-app/tv-common/src/AppTv.cpp index 3a8cba6e56a9fa..a3f6db8f306e8b 100644 --- a/examples/tv-app/tv-common/src/AppTv.cpp +++ b/examples/tv-app/tv-common/src/AppTv.cpp @@ -40,6 +40,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE #include #include diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.cpp index f39dc4b04f2d30..ca62ba5f37ee22 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.cpp @@ -18,6 +18,8 @@ #include "MatterCallbackHandler-JNI.h" +#include + using namespace chip; CHIP_ERROR CallbackBaseJNI::SetUp(JNIEnv * env, jobject inHandler) diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp index e86942e39ac2b0..878ed250745e38 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp @@ -24,6 +24,8 @@ #include #include +#include + #if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED #include "TraceHandlers.h" #endif // CHIP_CONFIG_TRANSPORT_TRACE_ENABLED diff --git a/src/app/app-platform/ContentApp.cpp b/src/app/app-platform/ContentApp.cpp index 9a6b4ad6b5e317..fc65d62268e2fa 100644 --- a/src/app/app-platform/ContentApp.cpp +++ b/src/app/app-platform/ContentApp.cpp @@ -31,6 +31,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip; diff --git a/src/app/app-platform/ContentApp.h b/src/app/app-platform/ContentApp.h index 34b1dd5ef41893..4260263caaf921 100644 --- a/src/app/app-platform/ContentApp.h +++ b/src/app/app-platform/ContentApp.h @@ -36,6 +36,8 @@ #include #include +#include + namespace chip { namespace AppPlatform { diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 0d7c511d9a4919..5365cf17f30467 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -36,6 +36,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip; diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index d0c63b3112b1ff..20daa3aff23363 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -36,6 +36,7 @@ #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include +#include using namespace chip; using namespace chip::app::Clusters; diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 18a30bb1190659..2cc461a80c752b 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -36,6 +36,8 @@ #include #include +#include + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/src/app/tests/suites/credentials/TestHarnessDACProvider.cpp b/src/app/tests/suites/credentials/TestHarnessDACProvider.cpp index 5d9a98683a5c21..366dd5752c2fb1 100644 --- a/src/app/tests/suites/credentials/TestHarnessDACProvider.cpp +++ b/src/app/tests/suites/credentials/TestHarnessDACProvider.cpp @@ -29,6 +29,7 @@ #include #include +#include //-> format_version = 1 //-> vendor_id = 0xFFF1/0xFFF2/0xFFF3 diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 0d97462560d5af..45bfef4aed1408 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -17,7 +17,6 @@ #pragma once -// #include PLATFORM_HEADER #include #include #include diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 7726366becc67c..f6308222614821 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include using namespace chip::Inet; diff --git a/src/controller/ExamplePersistentStorage.cpp b/src/controller/ExamplePersistentStorage.cpp index 90c84421f7481a..054469900b39a9 100644 --- a/src/controller/ExamplePersistentStorage.cpp +++ b/src/controller/ExamplePersistentStorage.cpp @@ -21,7 +21,9 @@ #include #include +#include #include +#include using String = std::basic_string; using Section = std::map; diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index fc9fbe02f12292..8e0f5e9a684e67 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include namespace chip { diff --git a/src/controller/java/AndroidCommissioningWindowOpener.cpp b/src/controller/java/AndroidCommissioningWindowOpener.cpp index 581b81073769c8..ff0d73133ef20a 100644 --- a/src/controller/java/AndroidCommissioningWindowOpener.cpp +++ b/src/controller/java/AndroidCommissioningWindowOpener.cpp @@ -26,6 +26,8 @@ #include #include +#include + using namespace chip::app::Clusters; using namespace chip::System::Clock; diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index c50bf0a22a74af..0e1179317f7cc6 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/src/controller/java/AndroidInteractionClient.cpp b/src/controller/java/AndroidInteractionClient.cpp index ec809570bcb1c7..a62e0c82723f7b 100644 --- a/src/controller/java/AndroidInteractionClient.cpp +++ b/src/controller/java/AndroidInteractionClient.cpp @@ -28,6 +28,8 @@ #include +#include + using namespace chip; using namespace chip::Controller; diff --git a/src/controller/java/OTAProviderDelegateBridge.cpp b/src/controller/java/OTAProviderDelegateBridge.cpp index 10f9ae12801558..4565d42416c19a 100644 --- a/src/controller/java/OTAProviderDelegateBridge.cpp +++ b/src/controller/java/OTAProviderDelegateBridge.cpp @@ -23,6 +23,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 2400ba818c7cb9..8fdea2151d7825 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -28,6 +28,8 @@ #include #include +#include + namespace chip { jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 370e510894c121..d2d20fb9f03854 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -28,6 +28,8 @@ #include #include +#include + namespace chip { jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) diff --git a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp index 9908c53c7eeeae..c1df8125793d02 100644 --- a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp +++ b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp @@ -23,6 +23,8 @@ #include #include +#include + namespace chip { namespace Controller { diff --git a/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp b/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp index 1efbfbd46e208f..c3dd0fcdec0447 100644 --- a/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp +++ b/src/crypto/tests/TestPersistentStorageOpKeyStore.cpp @@ -28,6 +28,8 @@ #include #include +#include + using namespace chip; using namespace chip::Crypto; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 1e52592f94d9ce..55b3a863e3f2eb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -77,6 +77,7 @@ #include #include +#include #import diff --git a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.mm b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.mm index 3a0435de6dc99d..2f909fdc4b2e37 100644 --- a/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.mm +++ b/src/darwin/Framework/CHIP/MTRManualSetupPayloadParser.mm @@ -24,6 +24,8 @@ #import #import +#include + @implementation MTRManualSetupPayloadParser { NSString * _decimalStringRepresentation; chip::ManualSetupPayloadParser * _chipManualSetupPayloadParser; diff --git a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.mm b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.mm index bbb8042bb65e6e..53b8e733367a4f 100644 --- a/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.mm +++ b/src/darwin/Framework/CHIP/MTRQRCodeSetupPayloadParser.mm @@ -24,6 +24,8 @@ #import #import +#include + @implementation MTRQRCodeSetupPayloadParser { NSString * _base38Representation; chip::QRCodeSetupPayloadParser * _chipQRCodeSetupPayloadParser; diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 42bd7babdf3bc8..309494e3a01922 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -24,6 +24,8 @@ #import "setup_payload/QRCodeSetupPayloadGenerator.h" #import +#include + @implementation MTROptionalQRCodeInfo @end diff --git a/src/lib/support/jsontlv/TextFormat.cpp b/src/lib/support/jsontlv/TextFormat.cpp index c607df791be7cf..98ff012e45f25b 100644 --- a/src/lib/support/jsontlv/TextFormat.cpp +++ b/src/lib/support/jsontlv/TextFormat.cpp @@ -18,6 +18,7 @@ #include #include +#include namespace chip { std::string PrettyPrintJsonString(const std::string & jsonString) diff --git a/src/lib/support/jsontlv/TlvToJson.cpp b/src/lib/support/jsontlv/TlvToJson.cpp index 3169dbb79faa27..5e0650951668dc 100644 --- a/src/lib/support/jsontlv/TlvToJson.cpp +++ b/src/lib/support/jsontlv/TlvToJson.cpp @@ -24,6 +24,8 @@ #include #include +#include + namespace chip { namespace { diff --git a/src/lib/support/tests/TestIniEscaping.cpp b/src/lib/support/tests/TestIniEscaping.cpp index 784a8fffdcb156..734ddf85b31e7b 100644 --- a/src/lib/support/tests/TestIniEscaping.cpp +++ b/src/lib/support/tests/TestIniEscaping.cpp @@ -20,6 +20,8 @@ #include #include +#include + using namespace chip; using namespace chip::IniEscaping; diff --git a/src/lib/support/tests/TestJsonToTlv.cpp b/src/lib/support/tests/TestJsonToTlv.cpp index 3649764700a3ae..a53144712c2770 100644 --- a/src/lib/support/tests/TestJsonToTlv.cpp +++ b/src/lib/support/tests/TestJsonToTlv.cpp @@ -26,6 +26,8 @@ #include #include +#include + namespace { using namespace chip::Encoding; diff --git a/src/lib/support/tests/TestJsonToTlvToJson.cpp b/src/lib/support/tests/TestJsonToTlvToJson.cpp index b4f0a132f4c684..2ac64670d3d596 100644 --- a/src/lib/support/tests/TestJsonToTlvToJson.cpp +++ b/src/lib/support/tests/TestJsonToTlvToJson.cpp @@ -26,6 +26,8 @@ #include #include +#include + namespace { using namespace chip::Encoding; diff --git a/src/lib/support/tests/TestTlvToJson.cpp b/src/lib/support/tests/TestTlvToJson.cpp index be25ef1055d224..1467744ba0478e 100644 --- a/src/lib/support/tests/TestTlvToJson.cpp +++ b/src/lib/support/tests/TestTlvToJson.cpp @@ -25,6 +25,8 @@ #include #include +#include + namespace { using namespace chip::Encoding; diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index f1335641d67dbf..77666a129407b8 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -23,6 +23,8 @@ #include +#include + using namespace chip::Dnssd; using namespace chip::Dnssd::Internal; diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index 7e9e7af521686d..58c74ba0918593 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -26,6 +26,8 @@ #include #include +#include + using namespace chip::Dnssd; using namespace chip::Dnssd::Internal; diff --git a/src/platform/Darwin/DnssdType.cpp b/src/platform/Darwin/DnssdType.cpp index 4b810a67ae66e1..919a9b379ee77a 100644 --- a/src/platform/Darwin/DnssdType.cpp +++ b/src/platform/Darwin/DnssdType.cpp @@ -18,6 +18,7 @@ #include "DnssdType.h" #include +#include constexpr char kProtocolTcp[] = "._tcp"; constexpr char kProtocolUdp[] = "._udp"; diff --git a/src/platform/Darwin/DnssdType.h b/src/platform/Darwin/DnssdType.h index c5904beaf03ef4..50154cb1ffa98b 100644 --- a/src/platform/Darwin/DnssdType.h +++ b/src/platform/Darwin/DnssdType.h @@ -19,6 +19,7 @@ #include #include +#include namespace chip { namespace Dnssd { diff --git a/src/platform/Linux/CHIPLinuxStorage.h b/src/platform/Linux/CHIPLinuxStorage.h index e83a417359169a..448459d6962b5d 100644 --- a/src/platform/Linux/CHIPLinuxStorage.h +++ b/src/platform/Linux/CHIPLinuxStorage.h @@ -35,6 +35,7 @@ #include #include +#include #ifndef FATCONFDIR #define FATCONFDIR "/tmp" diff --git a/src/platform/Linux/CHIPLinuxStorageIni.h b/src/platform/Linux/CHIPLinuxStorageIni.h index 1c6e564c12bf35..8c308f116bbbc0 100644 --- a/src/platform/Linux/CHIPLinuxStorageIni.h +++ b/src/platform/Linux/CHIPLinuxStorageIni.h @@ -29,6 +29,9 @@ #include #include +#include +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index 2a1873072fbb9e..800064f52157de 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/src/platform/Linux/bluez/BluezObjectManager.cpp b/src/platform/Linux/bluez/BluezObjectManager.cpp index 1025dda92cf95f..91a2ffb2bcd929 100644 --- a/src/platform/Linux/bluez/BluezObjectManager.cpp +++ b/src/platform/Linux/bluez/BluezObjectManager.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/src/platform/mt793x/DnssdContexts.cpp b/src/platform/mt793x/DnssdContexts.cpp index f8af3b450e9d87..c554c01916fef4 100644 --- a/src/platform/mt793x/DnssdContexts.cpp +++ b/src/platform/mt793x/DnssdContexts.cpp @@ -26,6 +26,8 @@ #include #include +#include + using namespace chip::Dnssd; namespace { diff --git a/src/platform/mt793x/DnssdImpl.cpp b/src/platform/mt793x/DnssdImpl.cpp index f85007689f7652..1baf0262304002 100644 --- a/src/platform/mt793x/DnssdImpl.cpp +++ b/src/platform/mt793x/DnssdImpl.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "mDNSDebug.h" #include "task.h" diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp index 802fe2708e3e26..93f1b18ab7c18c 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.h b/src/platform/nxp/mw320/ConnectivityManagerImpl.h index 364590fc1936ff..e5e9ef2865fa48 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.h +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.h @@ -42,6 +42,8 @@ #include #include +#include + namespace chip { namespace DeviceLayer { diff --git a/src/platform/webos/BLEManagerImpl.cpp b/src/platform/webos/BLEManagerImpl.cpp index 0e81ff3eb8233a..670c86e8233237 100644 --- a/src/platform/webos/BLEManagerImpl.cpp +++ b/src/platform/webos/BLEManagerImpl.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/src/platform/webos/BLEManagerImpl.h b/src/platform/webos/BLEManagerImpl.h index 4780bbe661227a..cc3f7c3d84ae2a 100644 --- a/src/platform/webos/BLEManagerImpl.h +++ b/src/platform/webos/BLEManagerImpl.h @@ -31,6 +31,8 @@ #include "ChipDeviceScanner.h" #include +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/webos/CHIPWebOSStorage.h b/src/platform/webos/CHIPWebOSStorage.h index 5afd70d033302a..6b896738ba98b3 100644 --- a/src/platform/webos/CHIPWebOSStorage.h +++ b/src/platform/webos/CHIPWebOSStorage.h @@ -35,6 +35,7 @@ #include #include +#include #ifndef FATCONFDIR #define FATCONFDIR "/tmp" diff --git a/src/platform/webos/CHIPWebOSStorageIni.h b/src/platform/webos/CHIPWebOSStorageIni.h index a0ef5846058e1d..eeb7ada47eebe5 100644 --- a/src/platform/webos/CHIPWebOSStorageIni.h +++ b/src/platform/webos/CHIPWebOSStorageIni.h @@ -29,6 +29,8 @@ #include #include +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/webos/ChipDeviceScanner.cpp b/src/platform/webos/ChipDeviceScanner.cpp index c79112b820bec3..5a312281d6d8b9 100644 --- a/src/platform/webos/ChipDeviceScanner.cpp +++ b/src/platform/webos/ChipDeviceScanner.cpp @@ -27,6 +27,8 @@ #include +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/webos/ChipDeviceScanner.h b/src/platform/webos/ChipDeviceScanner.h index aab6e5db8d8ecc..ac23c7bd4b68aa 100644 --- a/src/platform/webos/ChipDeviceScanner.h +++ b/src/platform/webos/ChipDeviceScanner.h @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/src/platform/webos/DnssdImpl.cpp b/src/platform/webos/DnssdImpl.cpp index bf1af98c67a2a1..618e522dbb52e4 100644 --- a/src/platform/webos/DnssdImpl.cpp +++ b/src/platform/webos/DnssdImpl.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/src/qrcodetool/setup_payload_commands.cpp b/src/qrcodetool/setup_payload_commands.cpp index a4010580af2b2e..f2c96eb03e3e4e 100644 --- a/src/qrcodetool/setup_payload_commands.cpp +++ b/src/qrcodetool/setup_payload_commands.cpp @@ -22,6 +22,8 @@ #include #include +#include + using namespace chip; enum class SetupPayloadCodeType diff --git a/src/setup_payload/AdditionalDataPayloadParser.cpp b/src/setup_payload/AdditionalDataPayloadParser.cpp index eb6b48f1b0fcc1..3fa307d93f0369 100644 --- a/src/setup_payload/AdditionalDataPayloadParser.cpp +++ b/src/setup_payload/AdditionalDataPayloadParser.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/src/setup_payload/Base38Decode.cpp b/src/setup_payload/Base38Decode.cpp index 3556182829e362..398d8371f8c177 100644 --- a/src/setup_payload/Base38Decode.cpp +++ b/src/setup_payload/Base38Decode.cpp @@ -23,6 +23,8 @@ #include "Base38Decode.h" +#include + namespace { static inline CHIP_ERROR decodeChar(char c, uint8_t & value) diff --git a/src/setup_payload/ManualSetupPayloadGenerator.cpp b/src/setup_payload/ManualSetupPayloadGenerator.cpp index b565907d43296a..079f2ddfdbcc32 100644 --- a/src/setup_payload/ManualSetupPayloadGenerator.cpp +++ b/src/setup_payload/ManualSetupPayloadGenerator.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp index 42a5374787d2d9..6ffa2319dadb35 100644 --- a/src/setup_payload/QRCodeSetupPayloadGenerator.cpp +++ b/src/setup_payload/QRCodeSetupPayloadGenerator.cpp @@ -37,6 +37,7 @@ #include #include +#include namespace chip { diff --git a/src/setup_payload/QRCodeSetupPayloadGenerator.h b/src/setup_payload/QRCodeSetupPayloadGenerator.h index d4a151a8c5717e..aefa1ee0caa1e6 100644 --- a/src/setup_payload/QRCodeSetupPayloadGenerator.h +++ b/src/setup_payload/QRCodeSetupPayloadGenerator.h @@ -31,6 +31,8 @@ #include +#include + #pragma once namespace chip { diff --git a/src/setup_payload/QRCodeSetupPayloadParser.cpp b/src/setup_payload/QRCodeSetupPayloadParser.cpp index 93e560aff27215..368722b22a1792 100644 --- a/src/setup_payload/QRCodeSetupPayloadParser.cpp +++ b/src/setup_payload/QRCodeSetupPayloadParser.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index 3b427f3b312473..b4d4c39ac7508f 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include namespace chip { diff --git a/src/setup_payload/SetupPayloadHelper.cpp b/src/setup_payload/SetupPayloadHelper.cpp index 36fed5a425e46a..bc3a23cc616077 100644 --- a/src/setup_payload/SetupPayloadHelper.cpp +++ b/src/setup_payload/SetupPayloadHelper.cpp @@ -20,6 +20,7 @@ #include "QRCodeSetupPayloadGenerator.h" #include "SetupPayload.h" #include +#include #include #include diff --git a/src/setup_payload/tests/TestHelpers.h b/src/setup_payload/tests/TestHelpers.h index 17017387f5fa48..99b66dea895a11 100644 --- a/src/setup_payload/tests/TestHelpers.h +++ b/src/setup_payload/tests/TestHelpers.h @@ -25,6 +25,8 @@ #include #include +#include + namespace chip { const uint16_t kSmallBufferSizeInBytes = 1; diff --git a/src/tracing/json/json_tracing.h b/src/tracing/json/json_tracing.h index 14f3d163a04c46..ddbb46a9d61ace 100644 --- a/src/tracing/json/json_tracing.h +++ b/src/tracing/json/json_tracing.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include #include From a535544f25c0474fe7f3561679ee4abac5d74bb0 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:00:15 -0400 Subject: [PATCH 28/45] Fix checkincludes --- scripts/tools/check_includes_config.py | 16 +++++++++++----- src/app/app-platform/ContentApp.cpp | 2 -- src/lib/support/jsontlv/TextFormat.cpp | 3 ++- src/lib/support/jsontlv/TlvToJson.cpp | 2 -- src/setup_payload/Base38Decode.cpp | 2 -- .../ManualSetupPayloadGenerator.cpp | 2 -- src/setup_payload/ManualSetupPayloadParser.cpp | 3 --- src/setup_payload/QRCodeSetupPayloadParser.cpp | 2 -- src/setup_payload/SetupPayload.cpp | 1 - src/setup_payload/SetupPayloadHelper.cpp | 1 - 10 files changed, 13 insertions(+), 21 deletions(-) diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index b69c6f488e5484..227d65a99877c6 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -121,8 +121,10 @@ 'src/platform/mbed/MbedEventTimeout.h': {'chrono'}, 'src/app/app-platform/ContentApp.h': {'list', 'string'}, + 'src/app/app-platform/ContentAppPlatform.cpp': {'string'}, 'src/app/clusters/application-basic-server/application-basic-delegate.h': {'list', 'string'}, - 'src/app/clusters/application-basic-server/application-basic-server.cpp': {'list'}, + 'src/app/clusters/application-basic-server/application-basic-server.cpp': {'list', 'string'}, + 'src/app/clusters/application-launcher-server/application-launcher-server.cpp': {'string'}, 'src/app/clusters/application-launcher-server/application-launcher-delegate.h': {'list'}, 'src/app/clusters/audio-output-server/audio-output-delegate.h': {'list'}, 'src/app/clusters/channel-server/channel-delegate.h': {'list'}, @@ -136,13 +138,15 @@ 'src/credentials/attestation_verifier/FileAttestationTrustStore.cpp': {'string'}, 'src/setup_payload/AdditionalDataPayload.h': {'string'}, - 'src/setup_payload/AdditionalDataPayloadParser.cpp': {'vector'}, + 'src/setup_payload/AdditionalDataPayloadParser.cpp': {'vector', 'string'}, 'src/setup_payload/Base38Decode.h': {'string', 'vector'}, 'src/setup_payload/ManualSetupPayloadGenerator.h': {'string'}, 'src/setup_payload/ManualSetupPayloadParser.cpp': {'string', 'vector'}, 'src/setup_payload/ManualSetupPayloadParser.h': {'string'}, 'src/setup_payload/QRCodeSetupPayloadParser.cpp': {'vector'}, 'src/setup_payload/QRCodeSetupPayloadParser.h': {'string'}, + 'src/setup_payload/QRCodeSetupPayloadGenerator.cpp': {'string'}, + 'src/setup_payload/QRCodeSetupPayloadGenerator.h': {'string'}, 'src/setup_payload/SetupPayloadHelper.cpp': {'fstream'}, 'src/setup_payload/SetupPayloadHelper.h': {'string'}, 'src/setup_payload/SetupPayload.h': {'map', 'string', 'vector'}, @@ -154,11 +158,11 @@ # of a list of discovered things. 'src/controller/SetUpCodePairer.h': {'deque'}, - 'src/controller/ExamplePersistentStorage.cpp': {'fstream'}, + 'src/controller/ExamplePersistentStorage.cpp': {'fstream', 'string', 'map'}, # Library meant for non-embedded 'src/tracing/json/json_tracing.cpp': {'string', 'sstream'}, - 'src/tracing/json/json_tracing.h': {'fstream', 'unordered_map'}, + 'src/tracing/json/json_tracing.h': {'fstream', 'unordered_map', 'string'}, # esp32 tracing 'src/tracing/esp32_trace/esp32_tracing.h': {'unordered_map'}, @@ -175,5 +179,7 @@ 'src/lib/support/jsontlv/TextFormat.h': {'string'}, 'src/app/icd/client/DefaultICDClientStorage.cpp': {'vector'}, 'src/app/icd/client/DefaultICDClientStorage.h': {'vector'}, - 'src/app/icd/client/DefaultICDStorageKey.h': {'vector'} + 'src/app/icd/client/DefaultICDStorageKey.h': {'vector'}, + 'src/controller/CHIPDeviceController.cpp': {'string'}, + 'src/qrcodetool/setup_payload_commands.cpp': {'string'}, } diff --git a/src/app/app-platform/ContentApp.cpp b/src/app/app-platform/ContentApp.cpp index fc65d62268e2fa..9a6b4ad6b5e317 100644 --- a/src/app/app-platform/ContentApp.cpp +++ b/src/app/app-platform/ContentApp.cpp @@ -31,8 +31,6 @@ #include #include -#include - #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED using namespace chip; diff --git a/src/lib/support/jsontlv/TextFormat.cpp b/src/lib/support/jsontlv/TextFormat.cpp index 98ff012e45f25b..0485563fa45b37 100644 --- a/src/lib/support/jsontlv/TextFormat.cpp +++ b/src/lib/support/jsontlv/TextFormat.cpp @@ -16,9 +16,10 @@ * limitations under the License. */ +#include "TextFormat.h" + #include #include -#include namespace chip { std::string PrettyPrintJsonString(const std::string & jsonString) diff --git a/src/lib/support/jsontlv/TlvToJson.cpp b/src/lib/support/jsontlv/TlvToJson.cpp index 5e0650951668dc..3169dbb79faa27 100644 --- a/src/lib/support/jsontlv/TlvToJson.cpp +++ b/src/lib/support/jsontlv/TlvToJson.cpp @@ -24,8 +24,6 @@ #include #include -#include - namespace chip { namespace { diff --git a/src/setup_payload/Base38Decode.cpp b/src/setup_payload/Base38Decode.cpp index 398d8371f8c177..3556182829e362 100644 --- a/src/setup_payload/Base38Decode.cpp +++ b/src/setup_payload/Base38Decode.cpp @@ -23,8 +23,6 @@ #include "Base38Decode.h" -#include - namespace { static inline CHIP_ERROR decodeChar(char c, uint8_t & value) diff --git a/src/setup_payload/ManualSetupPayloadGenerator.cpp b/src/setup_payload/ManualSetupPayloadGenerator.cpp index 079f2ddfdbcc32..72063c5c3d72a9 100644 --- a/src/setup_payload/ManualSetupPayloadGenerator.cpp +++ b/src/setup_payload/ManualSetupPayloadGenerator.cpp @@ -24,8 +24,6 @@ #include "ManualSetupPayloadGenerator.h" #include -#include -#include #include #include diff --git a/src/setup_payload/ManualSetupPayloadParser.cpp b/src/setup_payload/ManualSetupPayloadParser.cpp index 3b20e2429ce770..2673e42fbd7817 100644 --- a/src/setup_payload/ManualSetupPayloadParser.cpp +++ b/src/setup_payload/ManualSetupPayloadParser.cpp @@ -27,9 +27,6 @@ #include #include -#include -#include - namespace chip { CHIP_ERROR ManualSetupPayloadParser::CheckDecimalStringValidity(std::string decimalString, diff --git a/src/setup_payload/QRCodeSetupPayloadParser.cpp b/src/setup_payload/QRCodeSetupPayloadParser.cpp index 368722b22a1792..99bf0e4983040b 100644 --- a/src/setup_payload/QRCodeSetupPayloadParser.cpp +++ b/src/setup_payload/QRCodeSetupPayloadParser.cpp @@ -24,9 +24,7 @@ #include "QRCodeSetupPayloadParser.h" #include "Base38Decode.h" -#include #include -#include #include #include diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index b4d4c39ac7508f..3b427f3b312473 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include namespace chip { diff --git a/src/setup_payload/SetupPayloadHelper.cpp b/src/setup_payload/SetupPayloadHelper.cpp index bc3a23cc616077..36fed5a425e46a 100644 --- a/src/setup_payload/SetupPayloadHelper.cpp +++ b/src/setup_payload/SetupPayloadHelper.cpp @@ -20,7 +20,6 @@ #include "QRCodeSetupPayloadGenerator.h" #include "SetupPayload.h" #include -#include #include #include From fb699b62a1dad592b5f3a9d3d69c9d94e00e4a86 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:01:13 -0400 Subject: [PATCH 29/45] Fix one more build --- .../tv-app/tv-common/clusters/media-input/MediaInputManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp index 26ec52d1cf3c8c..bd5582efcf0c27 100644 --- a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp +++ b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.cpp @@ -17,6 +17,8 @@ #include "MediaInputManager.h" +#include + using namespace std; using namespace chip; using namespace chip::app::Clusters::MediaInput; From aeea5aaf2528e3141e6ee543fbef8051a3bd5cef Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:14:17 -0400 Subject: [PATCH 30/45] Zap regen ... some string adds were in generated code --- .../java/zap-generated/CHIPAttributeTLVValueDecoder.cpp | 2 -- src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 8fdea2151d7825..2400ba818c7cb9 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -28,8 +28,6 @@ #include #include -#include - namespace chip { jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index d2d20fb9f03854..370e510894c121 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -28,8 +28,6 @@ #include #include -#include - namespace chip { jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & aReader, CHIP_ERROR * aError) From b000c8653ca4184465008d91fcbfe851843c1755 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:37:59 -0400 Subject: [PATCH 31/45] make android compile: fix dynamic server dependencies on attribute-storage.h --- src/app/BUILD.gn | 11 ++++++++- src/app/dynamic_server/BUILD.gn | 24 +++++++++++++++++++ .../zap-generated/endpoint_config.h | 23 ++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 src/app/dynamic_server/BUILD.gn create mode 100644 src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 4cf96b3a1a84c8..b685e681cfa0e0 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -237,8 +237,8 @@ static_library("interaction-model") { if (chip_build_controller_dynamic_server) { sources += [ "clusters/ota-provider/ota-provider.cpp", - "dynamic_server/AccessControl.cpp", "dynamic_server/AccessControl.h", + "dynamic_server/AccessControl.cpp", "dynamic_server/DynamicDispatcher.cpp", "util/privilege-storage.cpp", "util/privilege-storage.h", @@ -250,6 +250,15 @@ static_library("interaction-model") { ] public_configs += [ ":config-controller-dynamic-server" ] + + # TODO: ota-provided.cpp uses attribute-storage.h-defined functions, specifically + # it wants to know MATTER_DM_OTA_SOFTWARE_UPDAT_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT as well + # as use emberAfGetClusterServerEndpointIndex. + # + # DynamicDispatcher.cpp overrides these, however due to attribute-storage.h being a + # codegen-dependent file, we need additional include paths during compilation + + public_configs += [ "${chip_root}/src/app/dynamic_server:mock-codegen-includes" ] } } diff --git a/src/app/dynamic_server/BUILD.gn b/src/app/dynamic_server/BUILD.gn new file mode 100644 index 00000000000000..67dd6769449036 --- /dev/null +++ b/src/app/dynamic_server/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2020 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. + +import("//build_overrides/chip.gni") + +# This config is to allow ota-provider or similar to include `attribute-storage.h` for overriden +# function access that are overriden by DynamicDispatcher +# +# This feels awkward and should be cleaned up once we manage to isolate generated code more. +config("mock-codegen-includes") { + include_dirs = [ "mock_includes" ] +} + diff --git a/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h b/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h new file mode 100644 index 00000000000000..baaaf2beded00e --- /dev/null +++ b/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2024 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. + */ +#pragma once + +#include +#include + +// Some overrides to see that this is not used as a real "endpoint_config" that contains data +#define GENERATED_DEFAULTS #error "Not a real codegen. This is a temporary include for dynamic-overrides only" +#define GENERATED_CLUSTERS #error "Not a real codegen. This is a temporary include for dynamic-overrides only" From 16a3e34fc1ac823bb5792b6da4981d7406480bbf Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:46:43 -0400 Subject: [PATCH 32/45] Refactor a bit to make gn linter happy --- src/app/BUILD.gn | 10 +--------- src/app/dynamic_server/BUILD.gn | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index b685e681cfa0e0..b6665492012156 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -247,18 +247,10 @@ static_library("interaction-model") { public_deps += [ ":global-attributes", "${chip_root}/src/access", + "${chip_root}/src/app/dynamic_server:mock-codegen-includes", ] public_configs += [ ":config-controller-dynamic-server" ] - - # TODO: ota-provided.cpp uses attribute-storage.h-defined functions, specifically - # it wants to know MATTER_DM_OTA_SOFTWARE_UPDAT_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT as well - # as use emberAfGetClusterServerEndpointIndex. - # - # DynamicDispatcher.cpp overrides these, however due to attribute-storage.h being a - # codegen-dependent file, we need additional include paths during compilation - - public_configs += [ "${chip_root}/src/app/dynamic_server:mock-codegen-includes" ] } } diff --git a/src/app/dynamic_server/BUILD.gn b/src/app/dynamic_server/BUILD.gn index 67dd6769449036..de952c734834f7 100644 --- a/src/app/dynamic_server/BUILD.gn +++ b/src/app/dynamic_server/BUILD.gn @@ -14,11 +14,21 @@ import("//build_overrides/chip.gni") -# This config is to allow ota-provider or similar to include `attribute-storage.h` for overriden -# function access that are overriden by DynamicDispatcher +# This config is to allow ota-provider or similar to include `_attribute-storage.h` (underscore +# no make linter not recognize this as a reference) for overriden function access that are +# overriden by DynamicDispatcher # # This feels awkward and should be cleaned up once we manage to isolate generated code more. -config("mock-codegen-includes") { +config("mock-codegen-config") { include_dirs = [ "mock_includes" ] } +source_set("mock-codegen-includes") { + sources = [ + "mock_includes/zap-generated/endpoint_config.h", + ] + + public_configs = [":mock-codegen-config"] +} + + From f07cfed4ef92cc15df4ac6ac3e246742c7703e04 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 28 Mar 2024 15:47:22 -0400 Subject: [PATCH 33/45] Restyle --- src/app/BUILD.gn | 2 +- src/app/dynamic_server/BUILD.gn | 10 +++------- .../mock_includes/zap-generated/endpoint_config.h | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index b6665492012156..251c443ec53a04 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -237,8 +237,8 @@ static_library("interaction-model") { if (chip_build_controller_dynamic_server) { sources += [ "clusters/ota-provider/ota-provider.cpp", - "dynamic_server/AccessControl.h", "dynamic_server/AccessControl.cpp", + "dynamic_server/AccessControl.h", "dynamic_server/DynamicDispatcher.cpp", "util/privilege-storage.cpp", "util/privilege-storage.h", diff --git a/src/app/dynamic_server/BUILD.gn b/src/app/dynamic_server/BUILD.gn index de952c734834f7..17f2a046c3665b 100644 --- a/src/app/dynamic_server/BUILD.gn +++ b/src/app/dynamic_server/BUILD.gn @@ -15,7 +15,7 @@ import("//build_overrides/chip.gni") # This config is to allow ota-provider or similar to include `_attribute-storage.h` (underscore -# no make linter not recognize this as a reference) for overriden function access that are +# no make linter not recognize this as a reference) for overriden function access that are # overriden by DynamicDispatcher # # This feels awkward and should be cleaned up once we manage to isolate generated code more. @@ -24,11 +24,7 @@ config("mock-codegen-config") { } source_set("mock-codegen-includes") { - sources = [ - "mock_includes/zap-generated/endpoint_config.h", - ] + sources = [ "mock_includes/zap-generated/endpoint_config.h" ] - public_configs = [":mock-codegen-config"] + public_configs = [ ":mock-codegen-config" ] } - - diff --git a/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h b/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h index baaaf2beded00e..80fa88048d1782 100644 --- a/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h +++ b/src/app/dynamic_server/mock_includes/zap-generated/endpoint_config.h @@ -15,8 +15,8 @@ */ #pragma once -#include #include +#include // Some overrides to see that this is not used as a real "endpoint_config" that contains data #define GENERATED_DEFAULTS #error "Not a real codegen. This is a temporary include for dynamic-overrides only" From a4e497df9ad0eaa74ac88ff97dc6b40e1b52ed38 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 12:46:53 -0400 Subject: [PATCH 34/45] Split out attribute-storage/table into a -detail and non-detail header --- .github/workflows/lint.yml | 2 + .../android/java/ColorControlManager.cpp | 1 + .../android/java/DoorLockManager.cpp | 1 + .../android/java/PowerSourceManager.cpp | 1 + .../boolean-state-configuration-server.cpp | 1 + src/app/clusters/descriptor/descriptor.cpp | 1 + .../dishwasher-alarm-server.cpp | 1 + .../door-lock-server/door-lock-server.cpp | 1 + .../electrical-energy-measurement-server.cpp | 1 + .../fan-control-server/fan-control-server.cpp | 1 + .../sample-mei-server/sample-mei-server.cpp | 1 + .../clusters/scenes-server/SceneHandlerImpl.h | 1 + .../clusters/scenes-server/scenes-server.cpp | 1 + .../clusters/scenes-server/scenes-server.h | 1 + src/app/util/attribute-storage-detail.h | 151 ++++++++ src/app/util/attribute-storage.cpp | 8 + src/app/util/attribute-storage.h | 324 ++++++------------ src/app/util/attribute-table-detail.h | 66 ++++ src/app/util/attribute-table.cpp | 3 + src/app/util/attribute-table.h | 43 --- .../util/ember-compatibility-functions.cpp | 2 + src/app/util/endpoint-config-api.h | 2 +- src/app/util/util.cpp | 1 + 23 files changed, 348 insertions(+), 267 deletions(-) create mode 100644 src/app/util/attribute-storage-detail.h create mode 100644 src/app/util/attribute-table-detail.h diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 351737860c42c7..eb918d1972bf65 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -102,10 +102,12 @@ jobs: --known-failure app/TestEventTriggerDelegate.h \ --known-failure app/util/attribute-storage.cpp \ --known-failure app/util/attribute-storage.h \ + --known-failure app/util/attribute-storage-detail.h \ --known-failure app/util/attribute-table.cpp \ --known-failure app/util/attribute-table.h \ --known-failure app/util/binding-table.cpp \ --known-failure app/util/binding-table.h \ + --known-failure app/util/binding-table-detail.h \ --known-failure app/util/config.h \ --known-failure app/util/DataModelHandler.cpp \ --known-failure app/util/DataModelHandler.h \ diff --git a/examples/virtual-device-app/android/java/ColorControlManager.cpp b/examples/virtual-device-app/android/java/ColorControlManager.cpp index 34712afe4350d6..ed9ba0774d7a13 100644 --- a/examples/virtual-device-app/android/java/ColorControlManager.cpp +++ b/examples/virtual-device-app/android/java/ColorControlManager.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/virtual-device-app/android/java/DoorLockManager.cpp b/examples/virtual-device-app/android/java/DoorLockManager.cpp index 3a2ed97b07901c..712156c19d67cc 100644 --- a/examples/virtual-device-app/android/java/DoorLockManager.cpp +++ b/examples/virtual-device-app/android/java/DoorLockManager.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/virtual-device-app/android/java/PowerSourceManager.cpp b/examples/virtual-device-app/android/java/PowerSourceManager.cpp index 0adfd8d932d3fd..3a8d78e9b43476 100644 --- a/examples/virtual-device-app/android/java/PowerSourceManager.cpp +++ b/examples/virtual-device-app/android/java/PowerSourceManager.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp index b302f468aa38e4..bd9a2554094272 100644 --- a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp +++ b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 2336d7cd96d5aa..d3badfb36ac5db 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp index 40321f8c53297c..ca0fc231d6cc94 100644 --- a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include using namespace chip; diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index d5cef9597e1d25..66676a2f72e4b8 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp index 7e9bc3d72c7d27..e8ee2387c7ab60 100644 --- a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp +++ b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include using chip::Protocols::InteractionModel::Status; diff --git a/src/app/clusters/fan-control-server/fan-control-server.cpp b/src/app/clusters/fan-control-server/fan-control-server.cpp index b297acdd1e80cf..d8e80b8f86f429 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.cpp +++ b/src/app/clusters/fan-control-server/fan-control-server.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.cpp b/src/app/clusters/sample-mei-server/sample-mei-server.cpp index ce0da17319d23b..56d026e48a1efa 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.cpp +++ b/src/app/clusters/sample-mei-server/sample-mei-server.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/scenes-server/SceneHandlerImpl.h b/src/app/clusters/scenes-server/SceneHandlerImpl.h index 91935d2816f0e4..554ba2d7ad4893 100644 --- a/src/app/clusters/scenes-server/SceneHandlerImpl.h +++ b/src/app/clusters/scenes-server/SceneHandlerImpl.h @@ -17,6 +17,7 @@ #include #include +#include #include namespace chip { diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index d05d7da84f9a53..a57f00392dded8 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/scenes-server/scenes-server.h b/src/app/clusters/scenes-server/scenes-server.h index 320a9dae4488e0..81c7d41f65000c 100644 --- a/src/app/clusters/scenes-server/scenes-server.h +++ b/src/app/clusters/scenes-server/scenes-server.h @@ -25,6 +25,7 @@ #include #include #include +#include #include namespace chip { diff --git a/src/app/util/attribute-storage-detail.h b/src/app/util/attribute-storage-detail.h new file mode 100644 index 00000000000000..a575d0e3f3c6bd --- /dev/null +++ b/src/app/util/attribute-storage-detail.h @@ -0,0 +1,151 @@ +/** + * + * Copyright (c) 2020 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. + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +// If we have fixed number of endpoints, then max is the same. +#ifdef FIXED_ENDPOINT_COUNT +#define MAX_ENDPOINT_COUNT (FIXED_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#endif + +#include + +#define DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList) \ + EmberAfEndpointType endpointName = { clusterList, ArraySize(clusterList), 0 } + +#define DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName) EmberAfCluster clusterListName[] = { + +// The role argument should be used to determine whether cluster works as a server or a client. +// It can be assigned with the ZAP_CLUSTER_MASK(SERVER) or ZAP_CLUSTER_MASK(CLUSTER) values. +#define DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands) \ + { \ + clusterId, clusterAttrs, ArraySize(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands \ + } + +#define DECLARE_DYNAMIC_CLUSTER_LIST_END } + +#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName) EmberAfAttributeMetadata attrListName[] = { + +#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_END() \ + { \ + ZAP_EMPTY_DEFAULT(), 0xFFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ + } /* cluster revision */ \ + } + +#define DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask) \ + { \ + ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ + } + +extern uint8_t attributeData[]; // main storage bucket for all attributes + +void emAfCallInits(); + +chip::Protocols::InteractionModel::Status emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, + const EmberAfAttributeMetadata ** metadata, uint8_t * buffer, + uint16_t readLength, bool write); + +// +// Given a cluster ID, endpoint ID and a cluster mask, finds a matching cluster within that endpoint +// with a matching mask. If one is found, the relative index of that cluster within the list of clusters on that +// endpoint is returned. Otherwise, 0xFF is returned. +// +uint8_t emberAfClusterIndex(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); + +// Returns the clusterId of Nth server or client cluster, +// depending on server toggle. +// Returns Optional::Missing if cluster does not exist. +chip::Optional emberAfGetNthClusterId(chip::EndpointId endpoint, uint8_t n, bool server); + +// Returns cluster within the endpoint; Does not ignore disabled endpoints +const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(chip::EndpointId endpoint, chip::ClusterId clusterId, + EmberAfClusterMask mask); + +// Function mask must contain one of the CLUSTER_MASK function macros, +// then this method either returns the function pointer or null if +// function doesn't exist. Before you call the function, you must +// cast it. +EmberAfGenericClusterFunction emberAfFindClusterFunction(const EmberAfCluster * cluster, EmberAfClusterMask functionMask); + +// After the RAM value has changed, code should call this function. If this +// attribute has been tagged as non-volatile, its value will be stored. +void emAfSaveAttributeToStorageIfNeeded(uint8_t * data, chip::EndpointId endpoint, chip::ClusterId clusterId, + const EmberAfAttributeMetadata * metadata); + +// Calls the attribute changed callback +void emAfClusterAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +// Calls the attribute changed callback for a specific cluster. +chip::Protocols::InteractionModel::Status +emAfClusterPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, + uint16_t size, uint8_t * value); + +// Register a dynamic endpoint. This involves registering descriptors that describe +// the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing +// storage for data versions. +// +// dataVersionStorage.size() needs to be at least as large as the number of +// server clusters on this endpoint. If it's not, the endpoint will not be able +// to store data versions, which may break consumers. +// +// The memory backing dataVersionStorage needs to remain allocated until this dynamic +// endpoint is cleared. +// +// An optional device type list can be passed in as well. If provided, the memory +// backing the list needs to remain allocated until this dynamic endpoint is cleared. +// +// An optional parent endpoint id should be passed for child endpoints of composed device. +// +// Returns CHIP_NO_ERROR No error. +// CHIP_ERROR_NO_MEMORY MAX_ENDPOINT_COUNT is reached or when no storage is left for clusters +// CHIP_ERROR_INVALID_ARGUMENT The EndpointId value passed is kInvalidEndpointId +// CHIP_ERROR_ENDPOINT_EXISTS If the EndpointId value passed already exists +// +CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, chip::EndpointId id, const EmberAfEndpointType * ep, + const chip::Span & dataVersionStorage, + chip::Span deviceTypeList = {}, + chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); +chip::EndpointId emberAfClearDynamicEndpoint(uint16_t index); +uint16_t emberAfGetDynamicIndexFromEndpoint(chip::EndpointId id); + +// Get the number of attributes of the specific cluster under the endpoint. +// Returns 0 if the cluster does not exist. +uint16_t emberAfGetServerAttributeCount(chip::EndpointId endpoint, chip::ClusterId cluster); + +// Get the index of the given attribute of the specific cluster under the endpoint. +// Returns UINT16_MAX if the attribute does not exist. +uint16_t emberAfGetServerAttributeIndexByAttributeId(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeId); + +// Get the attribute id at the attributeIndex of the cluster under the endpoint. This function is useful for iterating over the +// attributes. +// Returns Optional::Missing() if the attribute does not exist. +chip::Optional emberAfGetServerAttributeIdByIndex(chip::EndpointId endpoint, chip::ClusterId cluster, + uint16_t attributeIndex); + diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 36bf9e9bc96733..6db450a8aa7fb7 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -17,6 +17,8 @@ #include +#include + #include #include #include @@ -818,8 +820,14 @@ namespace app { EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : mClusterId(clusterId) { + mEndpointCount = emberAfEndpointCount(); EnsureMatchingEndpoint(); } + +EndpointId EnabledEndpointsWithServerCluster::operator*() const { + return emberAfEndpointFromIndex(mEndpointIndex); +} + EnabledEndpointsWithServerCluster & EnabledEndpointsWithServerCluster::operator++() { ++mEndpointIndex; diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 45bfef4aed1408..faef0425db6131 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -18,232 +18,15 @@ #pragma once #include -#include -#include -#include +#include #include - #include -#include -#include - -#include - -static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; - -// If we have fixed number of endpoints, then max is the same. -#ifdef FIXED_ENDPOINT_COUNT -#define MAX_ENDPOINT_COUNT (FIXED_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) -#endif - -#include - -#define DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList) \ - EmberAfEndpointType endpointName = { clusterList, ArraySize(clusterList), 0 } - -#define DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName) EmberAfCluster clusterListName[] = { - -// The role argument should be used to determine whether cluster works as a server or a client. -// It can be assigned with the ZAP_CLUSTER_MASK(SERVER) or ZAP_CLUSTER_MASK(CLUSTER) values. -#define DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands) \ - { \ - clusterId, clusterAttrs, ArraySize(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands \ - } - -#define DECLARE_DYNAMIC_CLUSTER_LIST_END } - -#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName) EmberAfAttributeMetadata attrListName[] = { - -#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_END() \ - { \ - ZAP_EMPTY_DEFAULT(), 0xFFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ - } /* cluster revision */ \ - } - -#define DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask) \ - { \ - ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ - } - -extern uint8_t attributeData[]; // main storage bucket for all attributes - -void emAfCallInits(void); - -// Initial configuration -void emberAfEndpointConfigure(void); - -chip::Protocols::InteractionModel::Status emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, - const EmberAfAttributeMetadata ** metadata, uint8_t * buffer, - uint16_t readLength, bool write); - -// Check if a cluster is implemented or not. If yes, the cluster is returned. -// -// mask = 0 -> find either client or server -// mask = CLUSTER_MASK_CLIENT -> find client -// mask = CLUSTER_MASK_SERVER -> find server -// -// If a pointer to an index is provided, it will be updated to point to the relative index of the cluster -// within the set of clusters that match the mask criteria. -// -const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endpointType, chip::ClusterId clusterId, - EmberAfClusterMask mask, uint8_t * index = nullptr); - -// -// Given a cluster ID, endpoint ID and a cluster mask, finds a matching cluster within that endpoint -// with a matching mask. If one is found, the relative index of that cluster within the list of clusters on that -// endpoint is returned. Otherwise, 0xFF is returned. -// -uint8_t emberAfClusterIndex(chip::EndpointId endpoint, chip::ClusterId clusterId, EmberAfClusterMask mask); - -// If server == true, returns the number of server clusters, -// otherwise number of client clusters on this endpoint -uint8_t emberAfClusterCount(chip::EndpointId endpoint, bool server); - -// Returns the cluster of Nth server or client cluster, -// depending on server toggle. -const EmberAfCluster * emberAfGetNthCluster(chip::EndpointId endpoint, uint8_t n, bool server); - -// Returns the clusterId of Nth server or client cluster, -// depending on server toggle. -// Returns Optional::Missing if cluster does not exist. -chip::Optional emberAfGetNthClusterId(chip::EndpointId endpoint, uint8_t n, bool server); - -// Returns number of clusters put into the passed cluster list -// for the given endpoint and client/server polarity -uint8_t emberAfGetClustersFromEndpoint(chip::EndpointId endpoint, chip::ClusterId * clusterList, uint8_t listLen, bool server); - -// Returns cluster within the endpoint; Does not ignore disabled endpoints -const EmberAfCluster * emberAfFindClusterIncludingDisabledEndpoints(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfClusterMask mask); - -// Function mask must contain one of the CLUSTER_MASK function macros, -// then this method either returns the function pointer or null if -// function doesn't exist. Before you call the function, you must -// cast it. -EmberAfGenericClusterFunction emberAfFindClusterFunction(const EmberAfCluster * cluster, EmberAfClusterMask functionMask); - -/** - * @brief Loads attribute defaults and any non-volatile attributes stored - * - * @param endpoint EnpointId. Use chip::kInvalidEndpointId to initialize all endpoints - */ -void emberAfInitializeAttributes(chip::EndpointId endpoint); - -// After the RAM value has changed, code should call this function. If this -// attribute has been tagged as non-volatile, its value will be stored. -void emAfSaveAttributeToStorageIfNeeded(uint8_t * data, chip::EndpointId endpoint, chip::ClusterId clusterId, - const EmberAfAttributeMetadata * metadata); - -// Calls the attribute changed callback -void emAfClusterAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); - -// Calls the attribute changed callback for a specific cluster. -chip::Protocols::InteractionModel::Status -emAfClusterPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, - uint16_t size, uint8_t * value); - -// Note the difference in for server filtering. -// This method will return the cluster count for BOTH client and server -// and those do NOT work with NthCluster/NthClusterId -// - Use emberAfGetClustersFromEndpoint() with emberAfGetNthCluster() emberAfGetNthClusterId() -// -uint8_t emberAfGetClusterCountForEndpoint(chip::EndpointId endpoint); +#include -// -// Retrieve the device type list associated with a specific endpoint. -// -chip::Span emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err); +#include -/** - * Get the semantic tags of the endpoint. - * Fills in the provided SemanticTagStruct with tag at index `index` if there is one, - * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of tag, - * or returns CHIP_ERROR_NOT_FOUND if the endpoint is invalid. - * @param endpoint The target endpoint. - * @param index The index of the tag, with 0 representing the first tag. - * @param tag The SemanticTagStruct is filled. - */ -CHIP_ERROR GetSemanticTagForEndpointAtIndex(chip::EndpointId endpoint, size_t index, - chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & tag); - -// -// Override the device type list current associated with an endpoint with a user-provided list. The buffers backing -// that list have to live as long as the endpoint is enabled. -// -// NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. -// -CHIP_ERROR emberAfSetDeviceTypeList(chip::EndpointId endpoint, chip::Span deviceTypeList); - -// -// Override the tag list current associated with an endpoint with a user-provided list. The buffers backing -// that list have to live as long as the endpoint is enabled. -// -// NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. -// -CHIP_ERROR SetTagList(chip::EndpointId endpoint, - chip::Span tagList); - -// Register a dynamic endpoint. This involves registering descriptors that describe -// the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing -// storage for data versions. -// -// dataVersionStorage.size() needs to be at least as large as the number of -// server clusters on this endpoint. If it's not, the endpoint will not be able -// to store data versions, which may break consumers. -// -// The memory backing dataVersionStorage needs to remain allocated until this dynamic -// endpoint is cleared. -// -// An optional device type list can be passed in as well. If provided, the memory -// backing the list needs to remain allocated until this dynamic endpoint is cleared. -// -// An optional parent endpoint id should be passed for child endpoints of composed device. -// -// Returns CHIP_NO_ERROR No error. -// CHIP_ERROR_NO_MEMORY MAX_ENDPOINT_COUNT is reached or when no storage is left for clusters -// CHIP_ERROR_INVALID_ARGUMENT The EndpointId value passed is kInvalidEndpointId -// CHIP_ERROR_ENDPOINT_EXISTS If the EndpointId value passed already exists -// -CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, chip::EndpointId id, const EmberAfEndpointType * ep, - const chip::Span & dataVersionStorage, - chip::Span deviceTypeList = {}, - chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); -chip::EndpointId emberAfClearDynamicEndpoint(uint16_t index); -uint16_t emberAfGetDynamicIndexFromEndpoint(chip::EndpointId id); - -// Get the number of attributes of the specific cluster under the endpoint. -// Returns 0 if the cluster does not exist. -uint16_t emberAfGetServerAttributeCount(chip::EndpointId endpoint, chip::ClusterId cluster); - -// Get the index of the given attribute of the specific cluster under the endpoint. -// Returns UINT16_MAX if the attribute does not exist. -uint16_t emberAfGetServerAttributeIndexByAttributeId(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeId); - -// Get the attribute id at the attributeIndex of the cluster under the endpoint. This function is useful for iterating over the -// attributes. -// Returns Optional::Missing() if the attribute does not exist. -chip::Optional emberAfGetServerAttributeIdByIndex(chip::EndpointId endpoint, chip::ClusterId cluster, - uint16_t attributeIndex); - -/** - * Register an attribute access override. It will remain registered until the - * endpoint it's registered for is disabled (or until shutdown if it's - * registered for all endpoints) or until it is explicitly unregistered. - * Registration will fail if there is an already-registered override for the - * same set of attributes. - * - * @return false if there is an existing override that the new one would - * conflict with. In this case the override is not registered. - * @return true if registration was successful. - */ -bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); -/** - * Unregister an attribute access override (for example if the object - * implementing AttributeAccessInterface is being destroyed). - */ -void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); +static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; /** * @brief locate attribute metadata @@ -362,6 +145,101 @@ chip::DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPa */ uint16_t emberAfFixedEndpointCount(); +/** + * Register an attribute access override. It will remain registered until the + * endpoint it's registered for is disabled (or until shutdown if it's + * registered for all endpoints) or until it is explicitly unregistered. + * Registration will fail if there is an already-registered override for the + * same set of attributes. + * + * @return false if there is an existing override that the new one would + * conflict with. In this case the override is not registered. + * @return true if registration was successful. + */ +bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Unregister an attribute access override (for example if the object + * implementing AttributeAccessInterface is being destroyed). + */ +void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Get the semantic tags of the endpoint. + * Fills in the provided SemanticTagStruct with tag at index `index` if there is one, + * or returns CHIP_ERROR_NOT_FOUND if the index is out of range for the list of tag, + * or returns CHIP_ERROR_NOT_FOUND if the endpoint is invalid. + * @param endpoint The target endpoint. + * @param index The index of the tag, with 0 representing the first tag. + * @param tag The SemanticTagStruct is filled. + */ +CHIP_ERROR GetSemanticTagForEndpointAtIndex(chip::EndpointId endpoint, size_t index, + chip::app::Clusters::Descriptor::Structs::SemanticTagStruct::Type & tag); + +// +// Override the tag list current associated with an endpoint with a user-provided list. The buffers backing +// that list have to live as long as the endpoint is enabled. +// +// NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. +// +CHIP_ERROR SetTagList(chip::EndpointId endpoint, + chip::Span tagList); + +// Returns number of clusters put into the passed cluster list +// for the given endpoint and client/server polarity +uint8_t emberAfGetClustersFromEndpoint(chip::EndpointId endpoint, chip::ClusterId * clusterList, uint8_t listLen, bool server); + +// Note the difference in for server filtering. +// This method will return the cluster count for BOTH client and server +// and those do NOT work with NthCluster/NthClusterId +// - Use emberAfGetClustersFromEndpoint() with emberAfGetNthCluster() emberAfGetNthClusterId() +// +uint8_t emberAfGetClusterCountForEndpoint(chip::EndpointId endpoint); + +// Check if a cluster is implemented or not. If yes, the cluster is returned. +// +// mask = 0 -> find either client or server +// mask = CLUSTER_MASK_CLIENT -> find client +// mask = CLUSTER_MASK_SERVER -> find server +// +// If a pointer to an index is provided, it will be updated to point to the relative index of the cluster +// within the set of clusters that match the mask criteria. +// +const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endpointType, chip::ClusterId clusterId, + EmberAfClusterMask mask, uint8_t * index = nullptr); + +// Initial configuration +void emberAfEndpointConfigure(); + +/** + * @brief Loads attribute defaults and any non-volatile attributes stored + * + * @param endpoint EnpointId. Use chip::kInvalidEndpointId to initialize all endpoints + */ +void emberAfInitializeAttributes(chip::EndpointId endpoint); + +// If server == true, returns the number of server clusters, +// otherwise number of client clusters on this endpoint +uint8_t emberAfClusterCount(chip::EndpointId endpoint, bool server); + +// Returns the cluster of Nth server or client cluster, +// depending on server toggle. +const EmberAfCluster * emberAfGetNthCluster(chip::EndpointId endpoint, uint8_t n, bool server); + +// +// Retrieve the device type list associated with a specific endpoint. +// +chip::Span emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err); + +// +// Override the device type list current associated with an endpoint with a user-provided list. The buffers backing +// that list have to live as long as the endpoint is enabled. +// +// NOTE: It is the application's responsibility to free the existing list that is being replaced if needed. +// +CHIP_ERROR emberAfSetDeviceTypeList(chip::EndpointId endpoint, chip::Span deviceTypeList); + + namespace chip { namespace app { @@ -385,13 +263,13 @@ class EnabledEndpointsWithServerCluster EnabledEndpointsWithServerCluster & operator++(); - EndpointId operator*() const { return emberAfEndpointFromIndex(mEndpointIndex); } + EndpointId operator*() const; private: void EnsureMatchingEndpoint(); uint16_t mEndpointIndex = 0; - uint16_t mEndpointCount = emberAfEndpointCount(); + uint16_t mEndpointCount = 0; ClusterId mClusterId; }; diff --git a/src/app/util/attribute-table-detail.h b/src/app/util/attribute-table-detail.h new file mode 100644 index 00000000000000..4fa0d67c641166 --- /dev/null +++ b/src/app/util/attribute-table-detail.h @@ -0,0 +1,66 @@ +/** + * + * Copyright (c) 2020 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. + */ + +#pragma once + +#include +#include +#include + +/** + * Write an attribute for a request arriving from external sources. + * + * This will check attribute writeability and that + * the provided data type matches the expected data type. + */ +chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeID, uint8_t * dataPtr, + EmberAfAttributeType dataType); + +/** + * @brief write an attribute, performing all the checks. + * + * This function will attempt to write the attribute value from + * the provided pointer. This function will only check that the + * attribute exists. If it does it will write the value into + * the attribute table for the given attribute. + * + * This function will not check to see if the attribute is + * writable since the read only / writable characteristic + * of an attribute only pertains to external devices writing + * over the air. Because this function is being called locally + * it assumes that the device knows what it is doing and has permission + * to perform the given operation. + * + * if true is passed in for overrideReadOnlyAndDataType then the data type is + * not checked and the read-only flag is ignored. This mode is meant for + * testing or setting the initial value of the attribute on the device. + * + * this returns: + * - Status::UnsupportedEndpoint: if endpoint isn't supported by the device. + * - Status::UnsupportedCluster: if cluster isn't supported on the endpoint. + * - Status::UnsupportedAttribute: if attribute isn't supported in the cluster. + * - Status::InvalidDataType: if the data type passed in doesnt match the type + * stored in the attribute table + * - Status::UnsupportedWrite: if the attribute isnt writable + * - Status::ConstraintError: if the value is set out of the allowable range for + * the attribute + * - Status::Success: if the attribute was found and successfully written + */ +chip::Protocols::InteractionModel::Status emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeID, uint8_t * data, + EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType); diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 0b0f2143ecbc1c..97fe3e4748f04a 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -16,7 +16,10 @@ */ #include +#include + #include +#include #include #include #include diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 0257720f727309..69c4865a4b959e 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -21,49 +21,6 @@ #include #include -/** - * Write an attribute for a request arriving from external sources. - * - * This will check attribute writeability and that - * the provided data type matches the expected data type. - */ -chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType); - -/** - * @brief write an attribute, performing all the checks. - * - * This function will attempt to write the attribute value from - * the provided pointer. This function will only check that the - * attribute exists. If it does it will write the value into - * the attribute table for the given attribute. - * - * This function will not check to see if the attribute is - * writable since the read only / writable characteristic - * of an attribute only pertains to external devices writing - * over the air. Because this function is being called locally - * it assumes that the device knows what it is doing and has permission - * to perform the given operation. - * - * if true is passed in for overrideReadOnlyAndDataType then the data type is - * not checked and the read-only flag is ignored. This mode is meant for - * testing or setting the initial value of the attribute on the device. - * - * this returns: - * - Status::UnsupportedEndpoint: if endpoint isn't supported by the device. - * - Status::UnsupportedCluster: if cluster isn't supported on the endpoint. - * - Status::UnsupportedAttribute: if attribute isn't supported in the cluster. - * - Status::InvalidDataType: if the data type passed in doesnt match the type - * stored in the attribute table - * - Status::UnsupportedWrite: if the attribute isnt writable - * - Status::ConstraintError: if the value is set out of the allowable range for - * the attribute - * - Status::Success: if the attribute was found and successfully written - */ -chip::Protocols::InteractionModel::Status emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * data, - EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType); /** * @brief write an attribute, performing all the checks. * diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 6365e124e8f908..ea1dc57d08cb95 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -28,7 +28,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/src/app/util/endpoint-config-api.h b/src/app/util/endpoint-config-api.h index 2028c9f06d7f07..182e4a652a3740 100644 --- a/src/app/util/endpoint-config-api.h +++ b/src/app/util/endpoint-config-api.h @@ -30,7 +30,7 @@ * * Typically only used for endpoint index iteration. */ -uint16_t emberAfEndpointCount(void); +uint16_t emberAfEndpointCount(); /** * @brief Enable/disable endpoints diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 29a320786b7fbb..5da790c92feab0 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include From fc42d8ec95d6e1a95e02b01eac0e7c68f90acf7d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 12:50:23 -0400 Subject: [PATCH 35/45] Restyle --- src/app/util/attribute-storage-detail.h | 1 - src/app/util/attribute-storage.cpp | 5 +++-- src/app/util/attribute-storage.h | 6 ++---- src/app/util/attribute-table.cpp | 2 +- src/app/util/ember-compatibility-functions.cpp | 4 ++-- src/app/util/util.cpp | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/app/util/attribute-storage-detail.h b/src/app/util/attribute-storage-detail.h index a575d0e3f3c6bd..609a8711aa421d 100644 --- a/src/app/util/attribute-storage-detail.h +++ b/src/app/util/attribute-storage-detail.h @@ -148,4 +148,3 @@ uint16_t emberAfGetServerAttributeIndexByAttributeId(chip::EndpointId endpoint, // Returns Optional::Missing() if the attribute does not exist. chip::Optional emberAfGetServerAttributeIdByIndex(chip::EndpointId endpoint, chip::ClusterId cluster, uint16_t attributeIndex); - diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 6db450a8aa7fb7..4a1c23b5d36c92 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -824,8 +824,9 @@ EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId c EnsureMatchingEndpoint(); } -EndpointId EnabledEndpointsWithServerCluster::operator*() const { - return emberAfEndpointFromIndex(mEndpointIndex); +EndpointId EnabledEndpointsWithServerCluster::operator*() const +{ + return emberAfEndpointFromIndex(mEndpointIndex); } EnabledEndpointsWithServerCluster & EnabledEndpointsWithServerCluster::operator++() diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index faef0425db6131..0f183e81ab9114 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -18,14 +18,13 @@ #pragma once #include +#include +#include #include #include -#include -#include #include - static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; /** @@ -239,7 +238,6 @@ chip::Span emberAfDeviceTypeListFromEndpoint(chip::Endp // CHIP_ERROR emberAfSetDeviceTypeList(chip::EndpointId endpoint, chip::Span deviceTypeList); - namespace chip { namespace app { diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 97fe3e4748f04a..0f5b33c476679b 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -18,8 +18,8 @@ #include -#include #include +#include #include #include #include diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index ea1dc57d08cb95..16db0badc38030 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -26,11 +26,11 @@ #include #include #include +#include #include #include -#include -#include #include +#include #include #include #include diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 5da790c92feab0..b485e7c5dfb4cb 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -20,8 +20,8 @@ #include #include #include -#include #include +#include #include #include #include From 8ec72565e5f4622b093f3f9468987cef383ab5ef Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 12:56:09 -0400 Subject: [PATCH 36/45] Fix lint typo --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eb918d1972bf65..9aa099a7755e8c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -105,9 +105,9 @@ jobs: --known-failure app/util/attribute-storage-detail.h \ --known-failure app/util/attribute-table.cpp \ --known-failure app/util/attribute-table.h \ + --known-failure app/util/attribute-table-detail.h \ --known-failure app/util/binding-table.cpp \ --known-failure app/util/binding-table.h \ - --known-failure app/util/binding-table-detail.h \ --known-failure app/util/config.h \ --known-failure app/util/DataModelHandler.cpp \ --known-failure app/util/DataModelHandler.h \ From d79224334d472209eaa7b5977b9c04f10832433c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:06:25 -0400 Subject: [PATCH 37/45] Make tv app compile: need dynamic endpoints defines accessible --- src/app/util/attribute-storage-detail.h | 55 --------------------- src/app/util/attribute-storage.h | 63 +++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 55 deletions(-) diff --git a/src/app/util/attribute-storage-detail.h b/src/app/util/attribute-storage-detail.h index 609a8711aa421d..4b5aec2413db81 100644 --- a/src/app/util/attribute-storage-detail.h +++ b/src/app/util/attribute-storage-detail.h @@ -36,33 +36,6 @@ #include -#define DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList) \ - EmberAfEndpointType endpointName = { clusterList, ArraySize(clusterList), 0 } - -#define DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName) EmberAfCluster clusterListName[] = { - -// The role argument should be used to determine whether cluster works as a server or a client. -// It can be assigned with the ZAP_CLUSTER_MASK(SERVER) or ZAP_CLUSTER_MASK(CLUSTER) values. -#define DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands) \ - { \ - clusterId, clusterAttrs, ArraySize(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands \ - } - -#define DECLARE_DYNAMIC_CLUSTER_LIST_END } - -#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName) EmberAfAttributeMetadata attrListName[] = { - -#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_END() \ - { \ - ZAP_EMPTY_DEFAULT(), 0xFFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ - } /* cluster revision */ \ - } - -#define DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask) \ - { \ - ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ - } - extern uint8_t attributeData[]; // main storage bucket for all attributes void emAfCallInits(); @@ -106,34 +79,6 @@ chip::Protocols::InteractionModel::Status emAfClusterPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -// Register a dynamic endpoint. This involves registering descriptors that describe -// the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing -// storage for data versions. -// -// dataVersionStorage.size() needs to be at least as large as the number of -// server clusters on this endpoint. If it's not, the endpoint will not be able -// to store data versions, which may break consumers. -// -// The memory backing dataVersionStorage needs to remain allocated until this dynamic -// endpoint is cleared. -// -// An optional device type list can be passed in as well. If provided, the memory -// backing the list needs to remain allocated until this dynamic endpoint is cleared. -// -// An optional parent endpoint id should be passed for child endpoints of composed device. -// -// Returns CHIP_NO_ERROR No error. -// CHIP_ERROR_NO_MEMORY MAX_ENDPOINT_COUNT is reached or when no storage is left for clusters -// CHIP_ERROR_INVALID_ARGUMENT The EndpointId value passed is kInvalidEndpointId -// CHIP_ERROR_ENDPOINT_EXISTS If the EndpointId value passed already exists -// -CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, chip::EndpointId id, const EmberAfEndpointType * ep, - const chip::Span & dataVersionStorage, - chip::Span deviceTypeList = {}, - chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); -chip::EndpointId emberAfClearDynamicEndpoint(uint16_t index); -uint16_t emberAfGetDynamicIndexFromEndpoint(chip::EndpointId id); - // Get the number of attributes of the specific cluster under the endpoint. // Returns 0 if the cluster does not exist. uint16_t emberAfGetServerAttributeCount(chip::EndpointId endpoint, chip::ClusterId cluster); diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 0f183e81ab9114..b21fc11fdee7f1 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -21,12 +21,47 @@ #include #include #include +#include #include #include +#include static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; +// If we have fixed number of endpoints, then max is the same. +#ifdef FIXED_ENDPOINT_COUNT +#define MAX_ENDPOINT_COUNT (FIXED_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#endif + +#define DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList) \ + EmberAfEndpointType endpointName = { clusterList, ArraySize(clusterList), 0 } + +#define DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName) EmberAfCluster clusterListName[] = { + +// The role argument should be used to determine whether cluster works as a server or a client. +// It can be assigned with the ZAP_CLUSTER_MASK(SERVER) or ZAP_CLUSTER_MASK(CLUSTER) values. +#define DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands) \ + { \ + clusterId, clusterAttrs, ArraySize(clusterAttrs), 0, role, NULL, incomingCommands, outgoingCommands \ + } + +#define DECLARE_DYNAMIC_CLUSTER_LIST_END } + +#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName) EmberAfAttributeMetadata attrListName[] = { + +#define DECLARE_DYNAMIC_ATTRIBUTE_LIST_END() \ + { \ + ZAP_EMPTY_DEFAULT(), 0xFFFD, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ + } /* cluster revision */ \ + } + +#define DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask) \ + { \ + ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ + } + + /** * @brief locate attribute metadata * @@ -210,6 +245,34 @@ const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endp // Initial configuration void emberAfEndpointConfigure(); + +// Register a dynamic endpoint. This involves registering descriptors that describe +// the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing +// storage for data versions. +// +// dataVersionStorage.size() needs to be at least as large as the number of +// server clusters on this endpoint. If it's not, the endpoint will not be able +// to store data versions, which may break consumers. +// +// The memory backing dataVersionStorage needs to remain allocated until this dynamic +// endpoint is cleared. +// +// An optional device type list can be passed in as well. If provided, the memory +// backing the list needs to remain allocated until this dynamic endpoint is cleared. +// +// An optional parent endpoint id should be passed for child endpoints of composed device. +// +// Returns CHIP_NO_ERROR No error. +// CHIP_ERROR_NO_MEMORY MAX_ENDPOINT_COUNT is reached or when no storage is left for clusters +// CHIP_ERROR_INVALID_ARGUMENT The EndpointId value passed is kInvalidEndpointId +// CHIP_ERROR_ENDPOINT_EXISTS If the EndpointId value passed already exists +// +CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, chip::EndpointId id, const EmberAfEndpointType * ep, + const chip::Span & dataVersionStorage, + chip::Span deviceTypeList = {}, + chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); +chip::EndpointId emberAfClearDynamicEndpoint(uint16_t index); +uint16_t emberAfGetDynamicIndexFromEndpoint(chip::EndpointId id); /** * @brief Loads attribute defaults and any non-volatile attributes stored * From c0da2d75ac2ea338aabdbd3b422d9ca74e1c87d4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:07:00 -0400 Subject: [PATCH 38/45] Restyle --- src/app/util/attribute-storage.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index b21fc11fdee7f1..1c8ebb28caf984 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -24,8 +24,8 @@ #include #include -#include #include +#include static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; @@ -61,7 +61,6 @@ static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; ZAP_EMPTY_DEFAULT(), attId, attSizeBytes, ZAP_TYPE(attType), attrMask | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) \ } - /** * @brief locate attribute metadata * @@ -245,7 +244,6 @@ const EmberAfCluster * emberAfFindClusterInType(const EmberAfEndpointType * endp // Initial configuration void emberAfEndpointConfigure(); - // Register a dynamic endpoint. This involves registering descriptors that describe // the composition of the endpoint (encapsulated in the 'ep' argument) as well as providing // storage for data versions. From a7c63c0730f83d69eb71c3b10129278d1c1b445b Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:08:57 -0400 Subject: [PATCH 39/45] Remove code from storage-detail --- src/app/util/attribute-storage-detail.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/app/util/attribute-storage-detail.h b/src/app/util/attribute-storage-detail.h index 4b5aec2413db81..efe257d1126fb7 100644 --- a/src/app/util/attribute-storage-detail.h +++ b/src/app/util/attribute-storage-detail.h @@ -29,13 +29,6 @@ #include -// If we have fixed number of endpoints, then max is the same. -#ifdef FIXED_ENDPOINT_COUNT -#define MAX_ENDPOINT_COUNT (FIXED_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) -#endif - -#include - extern uint8_t attributeData[]; // main storage bucket for all attributes void emAfCallInits(); From 87dff5fd6377fb7edd33d2af7144c3fd76f2184d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:11:08 -0400 Subject: [PATCH 40/45] Fix code again: FIXED_ENDPOINT_COUNT must be defined, so config has to be included --- src/app/util/attribute-storage.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 1c8ebb28caf984..0c3fa96127c9c6 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include From 4b65704dbb227f301c903bfcbd89d2b027889f31 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:33:54 -0400 Subject: [PATCH 41/45] More includes to make compile work. At least now boufallolab compiles --- examples/common/pigweed/rpc_services/Descriptor.h | 1 + examples/shell/shell_common/cmd_server.cpp | 1 + src/app/AttributePathExpandIterator.cpp | 1 + src/app/util/mock/attribute-storage.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/examples/common/pigweed/rpc_services/Descriptor.h b/examples/common/pigweed/rpc_services/Descriptor.h index 48038831d62301..a6760cdcf61ce3 100644 --- a/examples/common/pigweed/rpc_services/Descriptor.h +++ b/examples/common/pigweed/rpc_services/Descriptor.h @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace chip { diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index 05015eda8db4a3..6c79aae789b541 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 00a69552263f29..9be7ab495a4267 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index db9ffd523d907e..f70665be4704b5 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include From 6c070cc6a5cb109153e12bff6aa551c9f61ab6ea Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 13:46:18 -0400 Subject: [PATCH 42/45] Fix linux builds ... apparently mock attribute storage is a copy & paste ... this is probably not good... --- src/app/util/mock/attribute-storage.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index f70665be4704b5..1c7b1c20824870 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -266,10 +266,17 @@ AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, Cl return nullptr; } +EndpointId EnabledEndpointsWithServerCluster::operator*() const +{ + return emberAfEndpointFromIndex(mEndpointIndex); +} + EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : mClusterId(clusterId) { + mEndpointCount = emberAfEndpointCount(); EnsureMatchingEndpoint(); } + EnabledEndpointsWithServerCluster & EnabledEndpointsWithServerCluster::operator++() { ++mEndpointIndex; From 6ed465f3c85854be9961f3457a8b6d8c1a6587bf Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 2 Apr 2024 14:41:11 -0400 Subject: [PATCH 43/45] Direct include of endpoint_config in attribute-storage.h --- src/app/util/attribute-storage.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 0c3fa96127c9c6..e87e783e96fbb6 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -28,6 +28,10 @@ #include #include +// NOTE: direct include here even though app/util/config.h is the public header, +// because MAX_ENDPOINT_COUNT needs FIXED_ENDPOINT_COUNT definitions. +#include + static constexpr uint16_t kEmberInvalidEndpointIndex = 0xFFFF; // If we have fixed number of endpoints, then max is the same. From bbad9f3bc907f739c7840ce568022a1511247f3c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 3 Apr 2024 08:53:50 -0400 Subject: [PATCH 44/45] Minor comment update: alignment and fix typo --- src/app/dynamic_server/BUILD.gn | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/dynamic_server/BUILD.gn b/src/app/dynamic_server/BUILD.gn index 17f2a046c3665b..5955512da74188 100644 --- a/src/app/dynamic_server/BUILD.gn +++ b/src/app/dynamic_server/BUILD.gn @@ -14,11 +14,13 @@ import("//build_overrides/chip.gni") -# This config is to allow ota-provider or similar to include `_attribute-storage.h` (underscore -# no make linter not recognize this as a reference) for overriden function access that are -# overriden by DynamicDispatcher +# This config is to allow ota-provider or similar to include +# `_attribute-storage.h` (underscore to make linter not recognize this as a +# reference) for overriden function access that are overriden by +# DynamicDispatcher # -# This feels awkward and should be cleaned up once we manage to isolate generated code more. +# This feels awkward and should be cleaned up once we manage to isolate +# generated code more. config("mock-codegen-config") { include_dirs = [ "mock_includes" ] } From 0b401969bcdbba464bbbda5c0f2627b680db31ba Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 4 Apr 2024 16:33:32 -0400 Subject: [PATCH 45/45] Some code review comments --- src/app/util/attribute-storage-detail.h | 2 +- src/app/util/attribute-storage.cpp | 4 ++-- src/app/util/attribute-storage.h | 2 +- src/app/util/attribute-table-detail.h | 2 +- src/app/util/attribute-table.h | 2 +- src/app/util/mock/attribute-storage.cpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/util/attribute-storage-detail.h b/src/app/util/attribute-storage-detail.h index efe257d1126fb7..922605f3f91da7 100644 --- a/src/app/util/attribute-storage-detail.h +++ b/src/app/util/attribute-storage-detail.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 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. diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 4a1c23b5d36c92..8848c63d07a427 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -818,9 +818,9 @@ bool emberAfContainsServerFromIndex(uint16_t index, ClusterId clusterId) namespace chip { namespace app { -EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : mClusterId(clusterId) +EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : + mEndpointCount(emberAfEndpointCount()), mClusterId(clusterId) { - mEndpointCount = emberAfEndpointCount(); EnsureMatchingEndpoint(); } diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index e87e783e96fbb6..013be43f20334b 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 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. diff --git a/src/app/util/attribute-table-detail.h b/src/app/util/attribute-table-detail.h index 4fa0d67c641166..d60c2821a105de 100644 --- a/src/app/util/attribute-table-detail.h +++ b/src/app/util/attribute-table-detail.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 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. diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 69c4865a4b959e..16825dd04b84cf 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -1,6 +1,6 @@ /** * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 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. diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 1c7b1c20824870..d308316dd8fee5 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -271,9 +271,9 @@ EndpointId EnabledEndpointsWithServerCluster::operator*() const return emberAfEndpointFromIndex(mEndpointIndex); } -EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : mClusterId(clusterId) +EnabledEndpointsWithServerCluster::EnabledEndpointsWithServerCluster(ClusterId clusterId) : + mEndpointCount(emberAfEndpointCount()), mClusterId(clusterId) { - mEndpointCount = emberAfEndpointCount(); EnsureMatchingEndpoint(); }