Skip to content

Commit

Permalink
Have DataModel::Provider be an argument to Server Init parameters (p…
Browse files Browse the repository at this point in the history
…roject-chip#36558)

* Set a provider in server init

* Restyle

* Fix some include dependencies

* Add back missing include

* Undo change for nrf

* Add import for android

* Undo qpg change

* Update examples/all-clusters-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/light-switch-app/qpg/src/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lock-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lit-icd-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/controller/python/chip/server/ServerInit.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Help users update

* Added comment

* Restyled by prettier-markdown

* Update examples/lock-app/qpg/src/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/platform/infineon/cyw30739/matter_config.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/platform/telink/common/src/AppTaskCommon.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/pump-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/platform/openiotsdk/app/openiotsdk_platform.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Fix includes

* Removed an include

* Update examples/pump-controller-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/shell/shell_common/cmd_server.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/window-app/nrfconnect/main/AppTask.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Remove extra include

* More comments updated

* Remove unneeded dependency

* Fix log

* Update src/app/server/Server.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Remove double init

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
4 people authored Nov 20, 2024
1 parent 007f4d7 commit 60dd784
Show file tree
Hide file tree
Showing 77 changed files with 186 additions and 6 deletions.
9 changes: 9 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,12 @@ Replacements for methods are:
`chip::app::AttributeAccessInterfaceRegistry::Instance().UnregisterAllForEndpoint`
- `chip::app::GetAttributeAccessOverride` replaced by
`chip::app::AttributeAccessInterfaceRegistry::Instance().Get`

### `ServerInitParams::dataModelProvider` in `Server::Init`

Server initialization requires a set data model provider to work rather than
auto-initializing ember-compatible code-generated data models.

To preserve `codegen/zap` generated logic, use
`CodegenDataModelProviderInstance` (see changes in
<https://github.com/project-chip/connectedhomeip/pull/36558>).
2 changes: 2 additions & 0 deletions examples/air-purifier-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <air-purifier-manager.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/util/endpoint-config-api.h>
#include <lib/core/ErrorStr.h>
Expand Down Expand Up @@ -134,6 +135,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
static chip::AmebaPersistentStorageOperationalKeystore sAmebaPersistentStorageOpKeystore;
Expand Down
2 changes: 2 additions & 0 deletions examples/air-purifier-app/cc32xx/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <lib/support/CHIPPlatformMemory.h>
#include <platform/CHIPDeviceLayer.h>

#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>

Expand Down Expand Up @@ -164,6 +165,7 @@ int AppTask::Init()
PLAT_LOG("Initialize Server");
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);

// Initialize device attestation config
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/endpoint-config-api.h>
Expand Down Expand Up @@ -149,6 +150,7 @@ static void InitServer(intptr_t context)
initParams.appDelegate = &sAmebaObserver;

initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();

#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "LEDWidget.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -129,6 +130,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);

// We only have network commissioning on endpoint 0.
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/fuzzing-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "AppMain.h"
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Server.h>

#include <CommissionableInit.h>
Expand Down Expand Up @@ -56,6 +57,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * aData, size_t aSize)
// ChipLinuxAppMainLoop blocks, and we don't want that here.
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
VerifyOrDie(Server::GetInstance().Init(initParams) == CHIP_NO_ERROR);

ApplicationInit();
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/mbed/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ int AppTask::Init()
// Init ZCL Data Model and start server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
error = Server::GetInstance().Init(initParams);
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
error = Server::GetInstance().Init(initParams);
if (error != CHIP_NO_ERROR)
{
ChipLogError(NotSpecified, "Server initialization failed: %s", error.AsString());
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <app/TestEventTriggerDelegate.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>

Expand Down Expand Up @@ -226,6 +227,7 @@ CHIP_ERROR AppTask::Init()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
AppFabricTableDelegate::Init();
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/nxp/mw320/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <app/util/af-types.h>
Expand Down Expand Up @@ -1068,6 +1069,7 @@ static void run_chip_srv(System::Layer * aSystemLayer, void * aAppState)

static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);
PRINTF("Done to call chip::Server() \r\n");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/endpoint-config-api.h>
Expand Down Expand Up @@ -158,8 +159,11 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();

static AmebaObserver sAmebaObserver;
initParams.appDelegate = &sAmebaObserver;

chip::Server::GetInstance().Init(initParams);

// Initialize device attestation config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "LEDWidget.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -127,6 +128,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);

// We only have network commissioning on endpoint 0.
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-minimal-app/linux/fuzzing-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "AppMain.h"
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Server.h>

using namespace chip;
Expand Down Expand Up @@ -43,6 +44,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * aData, size_t aSize)
// ChipLinuxAppMainLoop blocks, and we don't want that here.
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
VerifyOrDie(Server::GetInstance().Init(initParams) == CHIP_NO_ERROR);

ApplicationInit();
Expand Down
6 changes: 4 additions & 2 deletions examples/all-clusters-minimal-app/mbed/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#include "AppTask.h"
#include "LEDWidget.h"
#include <DFUManager.h>
#include <app/server/OnboardingCodesUtil.h>

#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
Expand Down Expand Up @@ -67,7 +68,8 @@ int AppTask::Init()
// Init ZCL Data Model and start server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
error = Server::GetInstance().Init(initParams);
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
error = Server::GetInstance().Init(initParams);
if (error != CHIP_NO_ERROR)
{
ChipLogError(NotSpecified, "Server initialization failed: %s", error.AsString());
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "LEDUtil.h"
#include "binding-handler.h"

#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>

Expand Down Expand Up @@ -173,6 +174,7 @@ CHIP_ERROR AppTask::Init()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
AppFabricTableDelegate::Init();

Expand Down
5 changes: 5 additions & 0 deletions examples/chef/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/endpoint-config-api.h>
Expand Down Expand Up @@ -105,9 +106,13 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();

static AmebaObserver sAmebaObserver;
initParams.appDelegate = &sAmebaObserver;

chip::Server::GetInstance().Init(initParams);

gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);

Expand Down
2 changes: 2 additions & 0 deletions examples/chef/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <platform/CHIPDeviceLayer.h>

#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>

Expand Down Expand Up @@ -159,6 +160,7 @@ void InitServer(intptr_t)
// Start IM server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);

// Device Attestation & Onboarding codes
Expand Down
4 changes: 3 additions & 1 deletion examples/chef/nrfconnect/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <lib/support/CHIPMem.h>
#include <platform/CHIPDeviceLayer.h>

#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>

Expand Down Expand Up @@ -125,7 +126,8 @@ int main()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
err = chip::Server::GetInstance().Init(initParams);
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
err = chip::Server::GetInstance().Init(initParams);
if (err != CHIP_NO_ERROR)
{
return 1;
Expand Down
2 changes: 2 additions & 0 deletions examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include "AppTask.h"
#include "AppEvent.h"
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <lib/core/ErrorStr.h>
Expand Down Expand Up @@ -298,6 +299,7 @@ void AppTask::InitServer(intptr_t arg)
{
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();

auto & infoProvider = chip::DeviceLayer::DeviceInfoProviderImpl::GetDefaultInstance();
infoProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
Expand Down
2 changes: 2 additions & 0 deletions examples/light-switch-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/endpoint-config-api.h>
Expand Down Expand Up @@ -104,6 +105,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
static chip::AmebaPersistentStorageOperationalKeystore sAmebaPersistentStorageOpKeystore;
Expand Down
2 changes: 2 additions & 0 deletions examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "FreeRTOS.h"

#include <app/codegen-data-model-provider/Instance.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.h>
Expand Down Expand Up @@ -324,6 +325,7 @@ int AppTask::Init()
static DefaultTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) };
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();

// Initialize info provider
sExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
Expand Down
2 changes: 2 additions & 0 deletions examples/light-switch-app/genio/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
Expand Down Expand Up @@ -124,6 +125,7 @@ CHIP_ERROR AppTask::Init()
// Init ZCL Data Model and start server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance();
chip::Server::GetInstance().Init(initParams);

// Initialize device attestation config
Expand Down
2 changes: 2 additions & 0 deletions examples/light-switch-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <app/TestEventTriggerDelegate.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <credentials/DeviceAttestationCredsProvider.h>
Expand Down Expand Up @@ -235,6 +236,7 @@ CHIP_ERROR AppTask::Init()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance();
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
AppFabricTableDelegate::Init();
Expand Down
3 changes: 2 additions & 1 deletion examples/light-switch-app/qpg/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ using namespace ::chip;
#include <app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.h>
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
Expand Down Expand Up @@ -203,7 +204,6 @@ CHIP_ERROR AppTask::StartAppTask()
void AppTask::InitServer(intptr_t arg)
{
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();

gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);
Expand All @@ -220,6 +220,7 @@ void AppTask::InitServer(intptr_t arg)
VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR);
VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sFaultTestEventTriggerHandler) == CHIP_NO_ERROR);
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;

chip::Server::GetInstance().Init(initParams);
Expand Down
Loading

0 comments on commit 60dd784

Please sign in to comment.