Skip to content

Commit e75d6da

Browse files
authored
Add some additional dataModelProvider settings on server init (project-chip#36639)
* Add some missed registrations of dataModelProvider in server init * Fix commissioner main dependencies (make nrf tests compile) * Move around dependencies - apparently the commissioner main should be public * Fix one more odd dependency
1 parent dee82ef commit e75d6da

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

examples/common/tracing/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ source_set("trace_handlers") {
7979
source_set("trace_handlers_decoder") {
8080
sources = [
8181
"TraceDecoder.cpp",
82-
"TraceHandlers.cpp",
8382
"decoder/TraceDecoderProtocols.cpp",
8483
"decoder/bdx/Decoder.cpp",
8584
"decoder/echo/Decoder.cpp",
@@ -94,6 +93,7 @@ source_set("trace_handlers_decoder") {
9493
public_configs = [ ":default_config" ]
9594

9695
deps = [
96+
":trace_handlers",
9797
"${chip_root}/src/lib",
9898
"${chip_root}/src/lib/core:types",
9999
]

examples/lighting-app/nrfconnect/main/AppTask.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <app/TestEventTriggerDelegate.h>
3030
#include <app/clusters/identify-server/identify-server.h>
3131
#include <app/clusters/ota-requestor/OTATestEventTriggerHandler.h>
32+
#include <app/codegen-data-model-provider/Instance.h>
3233
#include <app/server/Dnssd.h>
3334
#include <app/server/OnboardingCodesUtil.h>
3435
#include <app/server/Server.h>
@@ -262,6 +263,7 @@ CHIP_ERROR AppTask::Init()
262263
initParams.operationalKeystore = &sPSAOperationalKeystore;
263264
#endif
264265
(void) initParams.InitializeStaticResourcesBeforeServerInit();
266+
initParams.dataModelProvider = CodegenDataModelProviderInstance();
265267
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
266268
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
267269
AppFabricTableDelegate::Init();

examples/lighting-app/qpg/src/AppTask.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
3838
#include <app/clusters/identify-server/identify-server.h>
3939
#include <app/clusters/on-off-server/on-off-server.h>
40+
#include <app/codegen-data-model-provider/Instance.h>
4041

4142
#include <app/server/Dnssd.h>
4243
#include <app/server/Server.h>
@@ -273,6 +274,7 @@ void AppTask::InitServer(intptr_t arg)
273274
VerifyOrDie(sTestEventTriggerDelegate.Init(ByteSpan(sTestEventTriggerEnableKey)) == CHIP_NO_ERROR);
274275
VerifyOrDie(sTestEventTriggerDelegate.AddHandler(&sFaultTestEventTriggerHandler) == CHIP_NO_ERROR);
275276
(void) initParams.InitializeStaticResourcesBeforeServerInit();
277+
initParams.dataModelProvider = CodegenDataModelProviderInstance();
276278
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
277279

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

examples/ota-requestor-app/ameba/main/chipinterface.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <DeviceInfoProviderImpl.h>
2525

2626
#include <app/clusters/network-commissioning/network-commissioning.h>
27+
#include <app/codegen-data-model-provider/Instance.h>
2728
#include <app/server/Server.h>
2829
#include <app/util/endpoint-config-api.h>
2930

@@ -78,7 +79,8 @@ static void InitServer(intptr_t context)
7879
static chip::CommonCaseDeviceServerInitParams initParams;
7980
(void) initParams.InitializeStaticResourcesBeforeServerInit();
8081
static AmebaObserver sAmebaObserver;
81-
initParams.appDelegate = &sAmebaObserver;
82+
initParams.dataModelProvider = CodegenDataModelProviderInstance();
83+
initParams.appDelegate = &sAmebaObserver;
8284
chip::Server::GetInstance().Init(initParams);
8385
gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
8486
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);

examples/platform/linux/BUILD.gn

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ source_set("app-main") {
7474
"AppMain.h",
7575
"CommissionableInit.cpp",
7676
"CommissionableInit.h",
77-
"CommissionerMain.cpp",
78-
"CommissionerMain.h",
7977
"LinuxCommissionableDataProvider.cpp",
8078
"LinuxCommissionableDataProvider.h",
8179
"NamedPipeCommands.cpp",
@@ -90,6 +88,7 @@ source_set("app-main") {
9088

9189
public_deps = [
9290
":boolean-state-configuration-test-event-trigger",
91+
":commissioner-main",
9392
":device-energy-management-test-event-trigger",
9493
":energy-evse-test-event-trigger",
9594
":energy-reporting-test-event-trigger",

0 commit comments

Comments
 (0)