|
89 | 89 | #include "OTARequestorInitiator.h" |
90 | 90 | #endif |
91 | 91 |
|
92 | | -#if CONFIG_CHIP_TEST_EVENT && CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR |
93 | | -#include <app/clusters/ota-requestor/OTATestEventTriggerDelegate.h> |
| 92 | +#if defined(CONFIG_CHIP_REGISTER_SIMPLE_TEST_EVENT_TRIGGER_DELEGATE) && CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR |
| 93 | +#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h> |
94 | 94 | #endif |
95 | 95 |
|
96 | 96 | #ifdef ENABLE_CHIP_SHELL |
97 | 97 | #include <lib/shell/commands/WiFi.h> |
98 | 98 | #endif |
99 | 99 |
|
100 | | -#ifdef SMOKE_CO_ALARM |
101 | | -#include <app/TestEventTriggerDelegate.h> |
102 | | -#include <app/clusters/smoke-co-alarm-server/SmokeCOTestEventTriggerHandler.h> |
103 | | -#endif |
104 | | - |
105 | | -#if CHIP_CONFIG_ENABLE_ICD_SERVER |
| 100 | +#ifdef CONFIG_CHIP_REGISTER_SIMPLE_TEST_EVENT_TRIGGER_DELEGATE |
106 | 101 | #include <app/TestEventTriggerDelegate.h> |
107 | 102 | #endif |
108 | 103 |
|
@@ -147,13 +142,7 @@ app::Clusters::NetworkCommissioning::Instance |
147 | 142 | extern char baseServiceInstanceName[]; |
148 | 143 | #endif |
149 | 144 |
|
150 | | -#if CHIP_CONFIG_ENABLE_ICD_SERVER || (CONFIG_CHIP_TEST_EVENT && CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) |
151 | | -static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, |
152 | | - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, |
153 | | - 0xcc, 0xdd, 0xee, 0xff }; |
154 | | -#endif |
155 | | - |
156 | | -#ifdef SMOKE_CO_ALARM |
| 145 | +#ifdef CONFIG_CHIP_REGISTER_SIMPLE_TEST_EVENT_TRIGGER_DELEGATE |
157 | 146 | static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, |
158 | 147 | 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, |
159 | 148 | 0xcc, 0xdd, 0xee, 0xff }; |
@@ -184,23 +173,16 @@ void chip::NXP::App::AppTaskBase::InitServer(intptr_t arg) |
184 | 173 | initParams.reportScheduler = &sReportScheduler; |
185 | 174 | #endif |
186 | 175 |
|
187 | | -#if CONFIG_CHIP_TEST_EVENT && CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR |
188 | | - static OTATestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; |
189 | | - initParams.testEventTriggerDelegate = &testEventTriggerDelegate; |
190 | | -#endif |
191 | | - |
192 | | -#ifdef SMOKE_CO_ALARM |
| 176 | +#ifdef CONFIG_CHIP_REGISTER_SIMPLE_TEST_EVENT_TRIGGER_DELEGATE |
193 | 177 | static SimpleTestEventTriggerDelegate sTestEventTriggerDelegate{}; |
194 | | - static SmokeCOTestEventTriggerHandler sSmokeCOTestEventTriggerHandler{}; |
195 | 178 | VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR); |
196 | | - VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sSmokeCOTestEventTriggerHandler) == CHIP_NO_ERROR); |
197 | 179 | initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; |
| 180 | + |
| 181 | +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR |
| 182 | + static OTATestEventTriggerHandler sOtaTestEventTriggerHandler{}; |
| 183 | + VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sOtaTestEventTriggerHandler) == CHIP_NO_ERROR); |
198 | 184 | #endif |
199 | 185 |
|
200 | | -#if CHIP_CONFIG_ENABLE_ICD_SERVER |
201 | | - static SimpleTestEventTriggerDelegate sTestEventTriggerDelegate{}; |
202 | | - VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR); |
203 | | - initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; |
204 | 186 | #endif |
205 | 187 |
|
206 | 188 | #if CONFIG_OPERATIONAL_KEYSTORE |
|
0 commit comments