From 279710707726c99c4cb00e9d35f19094eb2ecd76 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:04:09 -0400 Subject: [PATCH] [ICD] Added a way of activating the report on active mode from icd.gni (#29234) * Added a way of activating the report on active mode from icd manager with build flags * Restyled by shfmt * Moved the ICD_REPORT_ON_ENTER_ACTIVE_MODE in the report scheduler implementation * Moved the report on active define to the app BUILD.gn and removed un-necessary #ifdef * Removed preset * Added include AppBuildConfig --------- Co-authored-by: Restyled.io --- scripts/examples/gn_silabs_example.sh | 2 +- src/app/BUILD.gn | 1 + src/app/icd/ICDManager.cpp | 5 ----- src/app/icd/icd.gni | 3 +++ src/app/reporting/ReportSchedulerImpl.cpp | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index fbf89284e09686..484788eb4baf28 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -323,7 +323,7 @@ else source "$CHIP_ROOT/scripts/activate.sh" fi - ninja -v -C "$BUILD_DIR"/ + ninja -C "$BUILD_DIR"/ #print stats arm-none-eabi-size -A "$BUILD_DIR"/*.out diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 5f3c1b5a320710..1e73ea3c8201ee 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", + "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_report_on_active_mode}", ] } diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index a36401653e98e8..c02ef5aedd92ca 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -33,11 +33,6 @@ #define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 #endif -#ifndef ICD_REPORT_ON_ENTER_ACTIVE_MODE -// Enabling this makes the device emit subscription reports when transitioning from idle to active mode. -#define ICD_REPORT_ON_ENTER_ACTIVE_MODE 0 -#endif - namespace chip { namespace app { diff --git a/src/app/icd/icd.gni b/src/app/icd/icd.gni index 4d1dfac7eeb2f3..a576c8303c4fd6 100644 --- a/src/app/icd/icd.gni +++ b/src/app/icd/icd.gni @@ -20,4 +20,7 @@ declare_args() { # Matter SDK Configuration flag to enable ICD client functionality # TODO - Add Specifics when the design is refined chip_enable_icd_client = false + + # Matter SDK Configuration flag to make the ICD manager emit a report on entering active mode + chip_report_on_active_mode = false } diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index 7e9b1838641a96..5c061d1336bc84 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include