Skip to content

Commit

Permalink
Add some additional dataModelProvider settings on server init (proj…
Browse files Browse the repository at this point in the history
…ect-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
  • Loading branch information
andy31415 authored Nov 26, 2024
1 parent dee82ef commit e75d6da
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/common/tracing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ source_set("trace_handlers") {
source_set("trace_handlers_decoder") {
sources = [
"TraceDecoder.cpp",
"TraceHandlers.cpp",
"decoder/TraceDecoderProtocols.cpp",
"decoder/bdx/Decoder.cpp",
"decoder/echo/Decoder.cpp",
Expand All @@ -94,6 +93,7 @@ source_set("trace_handlers_decoder") {
public_configs = [ ":default_config" ]

deps = [
":trace_handlers",
"${chip_root}/src/lib",
"${chip_root}/src/lib/core:types",
]
Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -262,6 +263,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/lighting-app/qpg/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/on-off-server/on-off-server.h>
#include <app/codegen-data-model-provider/Instance.h>

#include <app/server/Dnssd.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -273,6 +274,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
4 changes: 3 additions & 1 deletion examples/ota-requestor-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <DeviceInfoProviderImpl.h>

#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/codegen-data-model-provider/Instance.h>
#include <app/server/Server.h>
#include <app/util/endpoint-config-api.h>

Expand Down Expand Up @@ -78,7 +79,8 @@ static void InitServer(intptr_t context)
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
static AmebaObserver sAmebaObserver;
initParams.appDelegate = &sAmebaObserver;
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.appDelegate = &sAmebaObserver;
chip::Server::GetInstance().Init(initParams);
gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);
Expand Down
3 changes: 1 addition & 2 deletions examples/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ source_set("app-main") {
"AppMain.h",
"CommissionableInit.cpp",
"CommissionableInit.h",
"CommissionerMain.cpp",
"CommissionerMain.h",
"LinuxCommissionableDataProvider.cpp",
"LinuxCommissionableDataProvider.h",
"NamedPipeCommands.cpp",
Expand All @@ -90,6 +88,7 @@ source_set("app-main") {

public_deps = [
":boolean-state-configuration-test-event-trigger",
":commissioner-main",
":device-energy-management-test-event-trigger",
":energy-evse-test-event-trigger",
":energy-reporting-test-event-trigger",
Expand Down

0 comments on commit e75d6da

Please sign in to comment.