From 3987633192b510b0b7cbbc166b9ecfcc1372e8fa Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 17 Feb 2023 09:44:13 -0500 Subject: [PATCH] Do not include endpoint config in types_stub.h (#25128) * Remove endpoint config from types. Add it to binding tables as they are directly referenced there * Mass addition of gen_config header whenever endpoint count was being fetched * Undo all changes except type_stubs. This is to create a tool that auto-adds headers * Added app/util/config.h whenever gen_config or endpoint_config bits seemed to be used * Restyle * Remove duplicate include based on code review --- .../include/static-supported-modes-manager.h | 1 + .../src/static-supported-modes-manager.cpp | 1 + examples/chef/common/stubs.cpp | 1 + examples/chef/efr32/src/AppTask.cpp | 1 + .../linux/DynamicDevice.cpp | 1 + .../linux/include/data-model/Attribute.h | 1 + .../include/static-supported-modes-manager.h | 1 + .../linux/static-supported-modes-manager.cpp | 1 + .../AppContentLauncherManager.cpp | 1 + .../AppMediaPlaybackManager.cpp | 1 + .../tv-app/android/java/ChannelManager.cpp | 1 + .../java/ContentAppAttributeDelegate.cpp | 1 + .../java/ContentAppCommandDelegate.cpp | 1 + .../android/java/KeypadInputManager.cpp | 1 + examples/tv-app/android/java/LevelManager.cpp | 1 + .../android/java/MediaPlaybackManager.cpp | 1 + examples/tv-app/android/java/OnOffManager.cpp | 1 + .../linux/include/channel/ChannelManager.cpp | 2 + .../ContentLauncherManager.cpp | 1 + .../keypad-input/KeypadInputManager.cpp | 1 + .../media-playback/MediaPlaybackManager.cpp | 1 + src/app/app-platform/ContentAppPlatform.cpp | 1 + .../account-login-server.cpp | 1 + .../application-basic-server.cpp | 1 + .../application-launcher-server.cpp | 1 + .../audio-output-server.cpp | 1 + .../barrier-control-server.cpp | 1 + .../bindings/PendingNotificationMap.cpp | 1 + .../bindings/PendingNotificationMap.h | 1 + src/app/clusters/bindings/bindings.cpp | 1 + .../channel-server/channel-server.cpp | 1 + .../color-control-server.cpp | 1 + .../color-control-server.h | 1 + .../content-launch-server.cpp | 1 + .../clusters/groups-server/groups-server.cpp | 1 + .../keypad-input-server.cpp | 1 + .../clusters/level-control/level-control.cpp | 1 + .../clusters/level-control/level-control.h | 1 + .../low-power-server/low-power-server.cpp | 1 + .../media-input-server/media-input-server.cpp | 1 + .../media-playback-server.cpp | 1 + .../mode-select-server/mode-select-server.cpp | 1 + .../clusters/on-off-server/on-off-server.cpp | 1 + .../clusters/on-off-server/on-off-server.h | 1 + .../clusters/ota-provider/ota-provider.cpp | 1 + .../pump-configuration-and-control-server.cpp | 1 + src/app/clusters/scenes/scenes-tokens.h | 2 + src/app/clusters/scenes/scenes.cpp | 1 + src/app/clusters/scenes/scenes.h | 66 +++++++ .../target-navigator-server.cpp | 1 + .../wake-on-lan-server/wake-on-lan-server.cpp | 1 + .../window-covering-server.cpp | 1 + src/app/tests/TestBindingTable.cpp | 1 + src/app/tests/TestPendingNotificationMap.cpp | 1 + src/app/util/af-event.cpp | 1 + src/app/util/af-types.h | 169 ------------------ src/app/util/attribute-storage.cpp | 1 + src/app/util/attribute-storage.h | 1 + src/app/util/attribute-table.cpp | 1 + src/app/util/binding-table.cpp | 1 + src/app/util/binding-table.h | 1 + .../util/ember-compatibility-functions.cpp | 1 + src/app/util/types_stub.h | 3 - src/app/util/util.cpp | 1 + 64 files changed, 129 insertions(+), 172 deletions(-) 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 a8ef29863e9f0f..192bb6718bfb0f 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 @@ -20,6 +20,7 @@ #include #include +#include #include namespace chip { diff --git a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp index 416915582d48ee..cab8f9730a8514 100644 --- a/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp @@ -1,3 +1,4 @@ +#include #include using namespace std; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 5d7c2802d857f0..d43c46ae9317b1 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -1,5 +1,6 @@ #include #include +#include // Include door lock callbacks only when the server is enabled #ifdef EMBER_AF_PLUGIN_DOOR_LOCK_SERVER diff --git a/examples/chef/efr32/src/AppTask.cpp b/examples/chef/efr32/src/AppTask.cpp index 240f2116cf0ef9..111340eeb66e5a 100644 --- a/examples/chef/efr32/src/AppTask.cpp +++ b/examples/chef/efr32/src/AppTask.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER #include diff --git a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp index c52f2eefc1f11e..9842715547b19d 100644 --- a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp +++ b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp @@ -19,6 +19,7 @@ #include #include +#include #include "DynamicDevice.h" diff --git a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h b/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h index 8a75f811c4b3bc..aad7f9f65a68b0 100644 --- a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h +++ b/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "DataModel.h" diff --git a/examples/placeholder/linux/include/static-supported-modes-manager.h b/examples/placeholder/linux/include/static-supported-modes-manager.h index a8ef29863e9f0f..192bb6718bfb0f 100644 --- a/examples/placeholder/linux/include/static-supported-modes-manager.h +++ b/examples/placeholder/linux/include/static-supported-modes-manager.h @@ -20,6 +20,7 @@ #include #include +#include #include namespace chip { diff --git a/examples/placeholder/linux/static-supported-modes-manager.cpp b/examples/placeholder/linux/static-supported-modes-manager.cpp index 416915582d48ee..cab8f9730a8514 100644 --- a/examples/placeholder/linux/static-supported-modes-manager.cpp +++ b/examples/placeholder/linux/static-supported-modes-manager.cpp @@ -1,3 +1,4 @@ +#include #include using namespace std; diff --git a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp index ac7bd3fb8285a2..930d61e1d6492a 100644 --- a/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp +++ b/examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp @@ -18,6 +18,7 @@ #include "AppContentLauncherManager.h" #include "../../java/ContentAppAttributeDelegate.h" +#include #include using namespace std; diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp index 402efef2e993c5..564779a62affd8 100644 --- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp +++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp @@ -18,6 +18,7 @@ #include "AppMediaPlaybackManager.h" #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/ChannelManager.cpp b/examples/tv-app/android/java/ChannelManager.cpp index 1305aad809972f..84b13eea5a55be 100644 --- a/examples/tv-app/android/java/ChannelManager.cpp +++ b/examples/tv-app/android/java/ChannelManager.cpp @@ -19,6 +19,7 @@ #include "TvApp-JNI.h" #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp index 62ee49451de3bd..0565d364e2719f 100644 --- a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp @@ -23,6 +23,7 @@ #include "ContentAppAttributeDelegate.h" #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index 05763b6e09883e..4708700874304a 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/KeypadInputManager.cpp b/examples/tv-app/android/java/KeypadInputManager.cpp index f2e5a07979225c..ceea8305b585c6 100644 --- a/examples/tv-app/android/java/KeypadInputManager.cpp +++ b/examples/tv-app/android/java/KeypadInputManager.cpp @@ -20,6 +20,7 @@ #include "TvApp-JNI.h" #include #include +#include #include #include diff --git a/examples/tv-app/android/java/LevelManager.cpp b/examples/tv-app/android/java/LevelManager.cpp index bf5316d92c0bf0..1be456903901b5 100644 --- a/examples/tv-app/android/java/LevelManager.cpp +++ b/examples/tv-app/android/java/LevelManager.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp index 9783d1ffdc4f48..c1e92fe51b9aa3 100644 --- a/examples/tv-app/android/java/MediaPlaybackManager.cpp +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -19,6 +19,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 338a5c8bd8409e..34cc33266717d2 100644 --- a/examples/tv-app/android/java/OnOffManager.cpp +++ b/examples/tv-app/android/java/OnOffManager.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/tv-app/linux/include/channel/ChannelManager.cpp b/examples/tv-app/linux/include/channel/ChannelManager.cpp index d80267fb72b211..bc517928e80e4a 100644 --- a/examples/tv-app/linux/include/channel/ChannelManager.cpp +++ b/examples/tv-app/linux/include/channel/ChannelManager.cpp @@ -17,6 +17,8 @@ #include "ChannelManager.h" #include +#include + #include using namespace chip; diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 07e905cc60519a..79ae11b8a57d37 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -18,6 +18,7 @@ #include "ContentLauncherManager.h" #include +#include using namespace std; using namespace chip::app; diff --git a/examples/tv-app/linux/include/keypad-input/KeypadInputManager.cpp b/examples/tv-app/linux/include/keypad-input/KeypadInputManager.cpp index 22b62db9496f91..5548174821a45d 100644 --- a/examples/tv-app/linux/include/keypad-input/KeypadInputManager.cpp +++ b/examples/tv-app/linux/include/keypad-input/KeypadInputManager.cpp @@ -18,6 +18,7 @@ #include "KeypadInputManager.h" #include +#include using namespace chip; using namespace chip::app::Clusters::KeypadInput; diff --git a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp index 605345621eb000..4fffd610ddde6f 100644 --- a/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp +++ b/examples/tv-app/linux/include/media-playback/MediaPlaybackManager.cpp @@ -17,6 +17,7 @@ #include "MediaPlaybackManager.h" #include +#include using namespace std; using namespace chip::app::DataModel; diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 0b03dc22f8e262..1a611500ef5db4 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/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index 39e05d54e41909..da1cafacbd51ad 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED 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 e98a28c04dea6a..c71282933e3646 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -31,6 +31,7 @@ #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include +#include #include #include 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 ed3f01102bfe1e..24ac02589babd9 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED diff --git a/src/app/clusters/audio-output-server/audio-output-server.cpp b/src/app/clusters/audio-output-server/audio-output-server.cpp index c28c3811a4c997..4e3b329289df86 100644 --- a/src/app/clusters/audio-output-server/audio-output-server.cpp +++ b/src/app/clusters/audio-output-server/audio-output-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include using 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 9e9f1ae47148ec..9dfa3d3440de0e 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include diff --git a/src/app/clusters/bindings/PendingNotificationMap.cpp b/src/app/clusters/bindings/PendingNotificationMap.cpp index 7e279b2449c7fb..3499bddc090046 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.cpp +++ b/src/app/clusters/bindings/PendingNotificationMap.cpp @@ -19,6 +19,7 @@ #include #include +#include namespace chip { diff --git a/src/app/clusters/bindings/PendingNotificationMap.h b/src/app/clusters/bindings/PendingNotificationMap.h index 99dd3e8eb73cd3..d0697b0dac32ff 100644 --- a/src/app/clusters/bindings/PendingNotificationMap.h +++ b/src/app/clusters/bindings/PendingNotificationMap.h @@ -16,6 +16,7 @@ */ #include +#include #include #include diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index 65d2c90a8d65c7..9aece569756e52 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include using namespace chip; using namespace chip::app; diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index 909daad853dd56..a5c5a9f28995e0 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include using 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 1c07603ed2747a..c1c9ec877cfdf1 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -22,6 +22,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app::Clusters; 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 cae5d9829df301..147454ce97a8c1 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 /********************************************************** 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 e1cbd1af2c888c..25d6987cd1ed02 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -28,6 +28,7 @@ #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 8e27d9783615f4..7e9ba35dc35587 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include 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 bb90d940ba5223..25e8dad47c674e 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include using namespace chip; diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index a2b66e84a1881f..51a8f5c919e95f 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/level-control/level-control.h b/src/app/clusters/level-control/level-control.h index 0ae5105d93a841..b1c5f2e51d0cd2 100644 --- a/src/app/clusters/level-control/level-control.h +++ b/src/app/clusters/level-control/level-control.h @@ -28,6 +28,7 @@ #include #include +#include /** @brief Level Control Cluster Server Post Init * 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 f7233651943365..66b618c6b50636 100644 --- a/src/app/clusters/low-power-server/low-power-server.cpp +++ b/src/app/clusters/low-power-server/low-power-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 6910d710ce3f38..53d368b62fb29f 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include using namespace chip; diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index bc6c3d91575850..979bf49116b34b 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -34,6 +34,7 @@ #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include +#include #include using 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 42cb2fa5814243..fdb19152f1473f 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #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 705fd2d2a8c774..31d37bda1c1a34 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/src/app/clusters/on-off-server/on-off-server.h b/src/app/clusters/on-off-server/on-off-server.h index 3eaae1de1a9be5..49157e99d31430 100644 --- a/src/app/clusters/on-off-server/on-off-server.h +++ b/src/app/clusters/on-off-server/on-off-server.h @@ -22,6 +22,7 @@ #include #include #include +#include using chip::app::Clusters::OnOff::OnOffFeature; diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index c55641b7b4cbd8..18490ede5d71d2 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #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 b06d5105aa6bd6..2ef01bebcdaf76 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 @@ -26,6 +26,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; diff --git a/src/app/clusters/scenes/scenes-tokens.h b/src/app/clusters/scenes/scenes-tokens.h index 7d07023c2be0df..a644efcb317d25 100644 --- a/src/app/clusters/scenes/scenes-tokens.h +++ b/src/app/clusters/scenes/scenes-tokens.h @@ -17,6 +17,8 @@ #pragma once +#include + #ifdef EMBER_AF_PLUGIN_SCENES_USE_TOKENS #define CREATOR_SCENES_NUM_ENTRIES (0x8723) diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index 9786121ea367ed..c2a60b3f30b49f 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #ifdef EMBER_AF_PLUGIN_GROUPS_SERVER diff --git a/src/app/clusters/scenes/scenes.h b/src/app/clusters/scenes/scenes.h index 44a87ef4b3a8f4..524c63eae0ae4a 100644 --- a/src/app/clusters/scenes/scenes.h +++ b/src/app/clusters/scenes/scenes.h @@ -21,9 +21,75 @@ #include #include #include +#include #include #include +/** + * @brief A structure used to store scene table entries in RAM or in storage, + * depending on a plugin setting. If endpoint field is + * ::EMBER_AF_SCENE_TABLE_UNUSED_ENDPOINT_ID, the entry is unused. + */ +typedef struct +{ + chip::EndpointId endpoint; // 0x00 when this record is not in use + chip::GroupId groupId; // 0x0000 if not associated with a group + uint8_t sceneId; +#if defined(MATTER_CLUSTER_SCENE_NAME_SUPPORT) && MATTER_CLUSTER_SCENE_NAME_SUPPORT + uint8_t name[ZCL_SCENES_CLUSTER_MAXIMUM_NAME_LENGTH + 1]; +#endif + uint16_t transitionTime; // in seconds + uint8_t transitionTime100ms; // in tenths of a seconds +#ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER + bool hasOnOffValue; + bool onOffValue; +#endif +#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER + bool hasCurrentLevelValue; + chip::app::DataModel::Nullable currentLevelValue; +#endif +#ifdef ZCL_USING_THERMOSTAT_CLUSTER_SERVER + bool hasOccupiedCoolingSetpointValue; + int16_t occupiedCoolingSetpointValue; + bool hasOccupiedHeatingSetpointValue; + int16_t occupiedHeatingSetpointValue; + bool hasSystemModeValue; + uint8_t systemModeValue; +#endif +#ifdef ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER + bool hasCurrentXValue; + uint16_t currentXValue; + bool hasCurrentYValue; + uint16_t currentYValue; + bool hasEnhancedCurrentHueValue; + uint16_t enhancedCurrentHueValue; + bool hasCurrentSaturationValue; + uint8_t currentSaturationValue; + bool hasColorLoopActiveValue; + uint8_t colorLoopActiveValue; + bool hasColorLoopDirectionValue; + uint8_t colorLoopDirectionValue; + bool hasColorLoopTimeValue; + uint16_t colorLoopTimeValue; + bool hasColorTemperatureMiredsValue; + uint16_t colorTemperatureMiredsValue; +#endif // ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER +#ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER + bool hasLockStateValue; + chip::app::DataModel::Nullable lockStateValue; +#endif +#ifdef ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER + bool hasCurrentPositionLiftPercentageValue; + chip::app::DataModel::Nullable currentPositionLiftPercentageValue; + bool hasCurrentPositionTiltPercentageValue; + chip::app::DataModel::Nullable currentPositionTiltPercentageValue; + bool hasTargetPositionLiftPercent100thsValue; + chip::app::DataModel::Nullable targetPositionLiftPercent100thsValue; + bool hasTargetPositionTiltPercent100thsValue; + chip::app::DataModel::Nullable targetPositionTiltPercent100thsValue; +#endif +} EmberAfSceneTableEntry; + EmberAfStatus emberAfScenesSetSceneCountAttribute(chip::EndpointId endpoint, uint8_t newCount); EmberAfStatus emberAfScenesMakeValid(chip::EndpointId endpoint, uint8_t sceneId, chip::GroupId groupId); diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index 7d39a8c46c6d94..0d71e6665006d3 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -33,6 +33,7 @@ #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #include #include +#include #include using namespace chip; diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index 4b3bfa6bd1b345..78878d0baf7af8 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include using namespace chip; 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 edb6f3940878ff..f3d8fe2afc2af2 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/tests/TestBindingTable.cpp b/src/app/tests/TestBindingTable.cpp index d9e4c84d68dd43..2bd5ed865502c0 100644 --- a/src/app/tests/TestBindingTable.cpp +++ b/src/app/tests/TestBindingTable.cpp @@ -16,6 +16,7 @@ */ #include +#include #include #include #include diff --git a/src/app/tests/TestPendingNotificationMap.cpp b/src/app/tests/TestPendingNotificationMap.cpp index 990bc0c8fa55d4..b635f3a654cc9b 100644 --- a/src/app/tests/TestPendingNotificationMap.cpp +++ b/src/app/tests/TestPendingNotificationMap.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/util/af-event.cpp b/src/app/util/af-event.cpp index cdc780b8e5a5d3..43fa366eba0d92 100644 --- a/src/app/util/af-event.cpp +++ b/src/app/util/af-event.cpp @@ -19,6 +19,7 @@ #include #include +#include #include diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 157aef07275a9a..ef2252a267fa45 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -391,62 +391,6 @@ struct EmberAfDefinedEndpoint // Cluster specific types -/** - * @brief Bitmask data type for storing one bit of information for each ESI in - * the ESI table. - */ -#if (EMBER_AF_PLUGIN_ESI_MANAGEMENT_ESI_TABLE_SIZE <= 8) -typedef uint8_t EmberAfPluginEsiManagementBitmask; -#elif (EMBER_AF_PLUGIN_ESI_MANAGEMENT_ESI_TABLE_SIZE <= 16) -typedef uint16_t EmberAfPluginEsiManagementBitmask; -#elif (EMBER_AF_PLUGIN_ESI_MANAGEMENT_ESI_TABLE_SIZE <= 32) -typedef uint32_t EmberAfPluginEsiManagementBitmask; -#else -#error "EMBER_AF_PLUGIN_ESI_MANAGEMENT_ESI_TABLE_SIZE cannot exceed 32" -#endif - -/** - * @brief Struct that describes a load control event. - * - * This is used in the load control event callback and - * within the demand response load control cluster code. - */ -typedef struct -{ - uint32_t eventId; -#ifdef EMBER_AF_PLUGIN_DRLC_SERVER - EmberEUI64 source; - chip::EndpointId sourceEndpoint; -#endif // EMBER_AF_PLUGIN_DRLC_SERVER - -#ifdef EMBER_AF_PLUGIN_DRLC - EmberAfPluginEsiManagementBitmask esiBitmask; -#endif // EMBER_AF_PLUGIN_DRLC - - chip::EndpointId destinationEndpoint; - uint16_t deviceClass; - uint8_t utilityEnrollmentGroup; - /** - * Start time in seconds - */ - uint32_t startTime; - /** - * Duration in minutes - */ - uint16_t duration; - uint8_t criticalityLevel; - uint8_t coolingTempOffset; - uint8_t heatingTempOffset; - int16_t coolingTempSetPoint; - int16_t heatingTempSetPoint; - int8_t avgLoadPercentage; - uint8_t dutyCycle; - uint8_t eventControl; - uint32_t startRand; - uint32_t durationRand; - uint8_t optionControl; -} EmberAfLoadControlEvent; - /** * @brief This is an enum used to indicate the result of the * service discovery. Unicast discoveries are completed @@ -711,119 +655,6 @@ typedef void (*EmberAfEndpointEventHandler)(chip::EndpointId endpoint); * @brief The scene identifier for the global scene. */ #define ZCL_SCENES_GLOBAL_SCENE_SCENE_ID 0x00 -/** - * @brief A structure used to store scene table entries in RAM or in storage, - * depending on a plugin setting. If endpoint field is - * ::EMBER_AF_SCENE_TABLE_UNUSED_ENDPOINT_ID, the entry is unused. - */ -typedef struct -{ - chip::EndpointId endpoint; // 0x00 when this record is not in use - chip::GroupId groupId; // 0x0000 if not associated with a group - uint8_t sceneId; -#if defined(MATTER_CLUSTER_SCENE_NAME_SUPPORT) && MATTER_CLUSTER_SCENE_NAME_SUPPORT - uint8_t name[ZCL_SCENES_CLUSTER_MAXIMUM_NAME_LENGTH + 1]; -#endif - uint16_t transitionTime; // in seconds - uint8_t transitionTime100ms; // in tenths of a seconds -#ifdef ZCL_USING_ON_OFF_CLUSTER_SERVER - bool hasOnOffValue; - bool onOffValue; -#endif -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER - bool hasCurrentLevelValue; - chip::app::DataModel::Nullable currentLevelValue; -#endif -#ifdef ZCL_USING_THERMOSTAT_CLUSTER_SERVER - bool hasOccupiedCoolingSetpointValue; - int16_t occupiedCoolingSetpointValue; - bool hasOccupiedHeatingSetpointValue; - int16_t occupiedHeatingSetpointValue; - bool hasSystemModeValue; - uint8_t systemModeValue; -#endif -#ifdef ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER - bool hasCurrentXValue; - uint16_t currentXValue; - bool hasCurrentYValue; - uint16_t currentYValue; - bool hasEnhancedCurrentHueValue; - uint16_t enhancedCurrentHueValue; - bool hasCurrentSaturationValue; - uint8_t currentSaturationValue; - bool hasColorLoopActiveValue; - uint8_t colorLoopActiveValue; - bool hasColorLoopDirectionValue; - uint8_t colorLoopDirectionValue; - bool hasColorLoopTimeValue; - uint16_t colorLoopTimeValue; - bool hasColorTemperatureMiredsValue; - uint16_t colorTemperatureMiredsValue; -#endif // ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER -#ifdef ZCL_USING_DOOR_LOCK_CLUSTER_SERVER - bool hasLockStateValue; - chip::app::DataModel::Nullable lockStateValue; -#endif -#ifdef ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER - bool hasCurrentPositionLiftPercentageValue; - chip::app::DataModel::Nullable currentPositionLiftPercentageValue; - bool hasCurrentPositionTiltPercentageValue; - chip::app::DataModel::Nullable currentPositionTiltPercentageValue; - bool hasTargetPositionLiftPercent100thsValue; - chip::app::DataModel::Nullable targetPositionLiftPercent100thsValue; - bool hasTargetPositionTiltPercent100thsValue; - chip::app::DataModel::Nullable targetPositionTiltPercent100thsValue; -#endif -} EmberAfSceneTableEntry; - -#if !defined(EMBER_AF_PLUGIN_MESSAGING_CLIENT) -// In order to be able to forward declare callbacks regardless of whether the plugin -// is enabled, we need to define all data structures. In order to be able to define -// the messaging client data struct, we need to declare this variable. -#define EMBER_AF_PLUGIN_MESSAGING_CLIENT_MESSAGE_SIZE 0 -#endif - -typedef struct -{ - bool valid; - bool active; - EmberAfPluginEsiManagementBitmask esiBitmask; - chip::EndpointId clientEndpoint; - uint32_t messageId; - uint8_t messageControl; - uint32_t startTime; - uint32_t endTime; - uint16_t durationInMinutes; - uint8_t message[EMBER_AF_PLUGIN_MESSAGING_CLIENT_MESSAGE_SIZE + 1]; -} EmberAfPluginMessagingClientMessage; - -#define ZCL_PRICE_CLUSTER_MAXIMUM_RATE_LABEL_LENGTH 11 -typedef struct -{ - bool valid; - bool active; - chip::EndpointId clientEndpoint; - uint32_t providerId; - uint8_t rateLabel[ZCL_PRICE_CLUSTER_MAXIMUM_RATE_LABEL_LENGTH + 1]; - uint32_t issuerEventId; - uint32_t currentTime; - uint8_t unitOfMeasure; - uint16_t currency; - uint8_t priceTrailingDigitAndPriceTier; - uint8_t numberOfPriceTiersAndRegisterTier; - uint32_t startTime; - uint32_t endTime; - uint16_t durationInMinutes; - uint32_t price; - uint8_t priceRatio; - uint32_t generationPrice; - uint8_t generationPriceRatio; - uint32_t alternateCostDelivered; - uint8_t alternateCostUnit; - uint8_t alternateCostTrailingDigit; - uint8_t numberOfBlockThresholds; - uint8_t priceControl; -} EmberAfPluginPriceClientPrice; /** * @brief Specifies CPP Authorization values diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 1b5f9659ae96e4..eb7619cc8f7ea9 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 6e1efb4aeb78f7..7e96265b72d188 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #if !defined(EMBER_SCRIPTED_TEST) diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 8cbb47e5b70d77..da60ecd8f34d45 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -21,6 +21,7 @@ // for pulling in defines dealing with EITHER server or client #include "app/util/common.h" +#include #include #include #include diff --git a/src/app/util/binding-table.cpp b/src/app/util/binding-table.cpp index 4ee03fe4951e3a..87655bdf956c38 100644 --- a/src/app/util/binding-table.cpp +++ b/src/app/util/binding-table.cpp @@ -20,6 +20,7 @@ */ #include +#include namespace chip { diff --git a/src/app/util/binding-table.h b/src/app/util/binding-table.h index 20258ecdb2be88..9e39313091cd35 100644 --- a/src/app/util/binding-table.h +++ b/src/app/util/binding-table.h @@ -22,6 +22,7 @@ #pragma once #include +#include #include #include #include diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index dc0f0703eb47e5..5e935d927e5f71 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h index eda4276fa02ce3..d66c8b04a1d66a 100644 --- a/src/app/util/types_stub.h +++ b/src/app/util/types_stub.h @@ -27,9 +27,6 @@ #include static_assert(sizeof(chip::NodeId) == sizeof(uint64_t), "Unexpected node if size"); -#include -#include - /** * @brief Defines binding types. */ diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index a7f2ed2178b149..3ed20d3ddfc744 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include