From faa8fe4525b5db128c62f68041980e8df49bb94a Mon Sep 17 00:00:00 2001 From: shana-apple <61782012+shana-apple@users.noreply.github.com> Date: Tue, 8 Sep 2020 21:00:34 +0200 Subject: [PATCH] Uncomment basic cluster (#2505) --- examples/lighting-app/nrf5/main/gen/callback.h | 12 ++++++++++++ examples/lock-app/nrf5/main/gen/callback.h | 12 ++++++++++++ examples/lock-app/nrfconnect/main/gen/callback.h | 12 ++++++++++++ examples/wifi-echo/server/esp32/main/component.mk | 2 +- .../wifi-echo/server/esp32/main/gen/callback-stub.c | 12 ++++++++++++ examples/wifi-echo/server/esp32/main/gen/callback.h | 12 ++++++++++++ .../server/esp32/main/gen/clusters-callback-stubs.c | 10 ---------- src/app/clusters/basic/basic.c | 2 +- 8 files changed, 62 insertions(+), 12 deletions(-) diff --git a/examples/lighting-app/nrf5/main/gen/callback.h b/examples/lighting-app/nrf5/main/gen/callback.h index 97a07d0e7dd08a..667d2dbdd048a9 100644 --- a/examples/lighting-app/nrf5/main/gen/callback.h +++ b/examples/lighting-app/nrf5/main/gen/callback.h @@ -3283,6 +3283,18 @@ EmberAfStatus emberAfOnOffClusterSetValueCallback(uint8_t endpoint, uint8_t comm */ void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint); +/** @brief Basic Cluster Reset To Factory Defaults + * + * This function is called by the Basic server plugin when a request to + * reset to factory defaults is received. The plugin will reset attributes + * managed by the framework to their default values. + * The application should perform any other necessary reset-related operations + * in this callback, including resetting any externally-stored attributes. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginBasicResetToFactoryDefaultsCallback(uint8_t endpoint); + /** @} END On/off Cluster Callbacks */ /** @name On/off Switch Configuration Cluster Callbacks */ diff --git a/examples/lock-app/nrf5/main/gen/callback.h b/examples/lock-app/nrf5/main/gen/callback.h index 97a07d0e7dd08a..667d2dbdd048a9 100644 --- a/examples/lock-app/nrf5/main/gen/callback.h +++ b/examples/lock-app/nrf5/main/gen/callback.h @@ -3283,6 +3283,18 @@ EmberAfStatus emberAfOnOffClusterSetValueCallback(uint8_t endpoint, uint8_t comm */ void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint); +/** @brief Basic Cluster Reset To Factory Defaults + * + * This function is called by the Basic server plugin when a request to + * reset to factory defaults is received. The plugin will reset attributes + * managed by the framework to their default values. + * The application should perform any other necessary reset-related operations + * in this callback, including resetting any externally-stored attributes. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginBasicResetToFactoryDefaultsCallback(uint8_t endpoint); + /** @} END On/off Cluster Callbacks */ /** @name On/off Switch Configuration Cluster Callbacks */ diff --git a/examples/lock-app/nrfconnect/main/gen/callback.h b/examples/lock-app/nrfconnect/main/gen/callback.h index 97a07d0e7dd08a..667d2dbdd048a9 100644 --- a/examples/lock-app/nrfconnect/main/gen/callback.h +++ b/examples/lock-app/nrfconnect/main/gen/callback.h @@ -3283,6 +3283,18 @@ EmberAfStatus emberAfOnOffClusterSetValueCallback(uint8_t endpoint, uint8_t comm */ void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint); +/** @brief Basic Cluster Reset To Factory Defaults + * + * This function is called by the Basic server plugin when a request to + * reset to factory defaults is received. The plugin will reset attributes + * managed by the framework to their default values. + * The application should perform any other necessary reset-related operations + * in this callback, including resetting any externally-stored attributes. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginBasicResetToFactoryDefaultsCallback(uint8_t endpoint); + /** @} END On/off Cluster Callbacks */ /** @name On/off Switch Configuration Cluster Callbacks */ diff --git a/examples/wifi-echo/server/esp32/main/component.mk b/examples/wifi-echo/server/esp32/main/component.mk index c2c933b3f91b9a..260f99d982e77c 100644 --- a/examples/wifi-echo/server/esp32/main/component.mk +++ b/examples/wifi-echo/server/esp32/main/component.mk @@ -33,7 +33,7 @@ COMPONENT_SRCDIRS := \ ../third_party/connectedhomeip/src/app/clusters/groups-server \ ../third_party/connectedhomeip/src/app/clusters/color-control-server \ ../third_party/connectedhomeip/src/app/clusters/scenes \ -# ../third_party/connectedhomeip/src/app/clusters/basic \ + ../third_party/connectedhomeip/src/app/clusters/basic \ # ../third_party/connectedhomeip/src/app/clusters/door-lock-server \ # ../third_party/connectedhomeip/src/app/clusters/groups-client \ # ../third_party/connectedhomeip/src/app/clusters/ias-zone-client \ diff --git a/examples/wifi-echo/server/esp32/main/gen/callback-stub.c b/examples/wifi-echo/server/esp32/main/gen/callback-stub.c index 4aeb007502b8ee..a1d16190148829 100644 --- a/examples/wifi-echo/server/esp32/main/gen/callback-stub.c +++ b/examples/wifi-echo/server/esp32/main/gen/callback-stub.c @@ -98,6 +98,18 @@ bool emberAfPluginGroupsServerGroupNamesSupportedCallback(uint8_t endpoint) */ void emberAfPluginGroupsServerSetGroupNameCallback(uint8_t endpoint, uint16_t groupId, uint8_t * groupName) {} +/** @brief Basic Cluster Reset To Factory Defaults + * + * This function is called by the Basic server plugin when a request to + * reset to factory defaults is received. The plugin will reset attributes + * managed by the framework to their default values. + * The application should perform any other necessary reset-related operations + * in this callback, including resetting any externally-stored attributes. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginBasicResetToFactoryDefaultsCallback(uint8_t endpoint) {} + /** @brief Add To Current App Tasks * * This function is only useful to sleepy end devices. This function will note diff --git a/examples/wifi-echo/server/esp32/main/gen/callback.h b/examples/wifi-echo/server/esp32/main/gen/callback.h index 0d93ec3ca25d7c..007a618313d2a4 100644 --- a/examples/wifi-echo/server/esp32/main/gen/callback.h +++ b/examples/wifi-echo/server/esp32/main/gen/callback.h @@ -3322,6 +3322,18 @@ EmberAfStatus emberAfOnOffClusterSetValueCallback(uint8_t endpoint, uint8_t comm */ void emberAfPluginOnOffClusterServerPostInitCallback(uint8_t endpoint); +/** @brief Basic Cluster Reset To Factory Defaults + * + * This function is called by the Basic server plugin when a request to + * reset to factory defaults is received. The plugin will reset attributes + * managed by the framework to their default values. + * The application should perform any other necessary reset-related operations + * in this callback, including resetting any externally-stored attributes. + * + * @param endpoint Endpoint that is being initialized Ver.: always + */ +void emberAfPluginBasicResetToFactoryDefaultsCallback(uint8_t endpoint); + /** @} END On/off Cluster Callbacks */ /** @name On/off Switch Configuration Cluster Callbacks */ diff --git a/examples/wifi-echo/server/esp32/main/gen/clusters-callback-stubs.c b/examples/wifi-echo/server/esp32/main/gen/clusters-callback-stubs.c index 0f48f604c5fcad..a1cb1b0b0bdb09 100644 --- a/examples/wifi-echo/server/esp32/main/gen/clusters-callback-stubs.c +++ b/examples/wifi-echo/server/esp32/main/gen/clusters-callback-stubs.c @@ -56,16 +56,6 @@ bool emberAfPluginIdentifyStopFeedbackCallback(uint8_t endpoint) return false; } -/** @brief Basic Cluster Reset To Factory Defaults - * - * - * - */ -bool emberAfBasicClusterResetToFactoryDefaultsCallback(void) -{ - return false; -} - /** @brief Door Lock Cluster Clear All Pins * * diff --git a/src/app/clusters/basic/basic.c b/src/app/clusters/basic/basic.c index 904ac2cd97d4da..6caa0354da666f 100644 --- a/src/app/clusters/basic/basic.c +++ b/src/app/clusters/basic/basic.c @@ -38,7 +38,7 @@ ******************************************************************************* ******************************************************************************/ -#include "../../include/af.h" +#include "af.h" void emberAfResetAttributes(uint8_t endpoint);