Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split out Attribute Persistance between safe (can be at libCHIP level) and ember-specific (placed in codegen level) #36658

Merged
merged 29 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bbf55cb
Separate out logic between Safe and Ember storage persistence.
andy31415 Nov 27, 2024
418ceda
Some manual updates
andy31415 Nov 27, 2024
9318ccc
Scripted update
andy31415 Nov 27, 2024
a382dd3
Restyle
andy31415 Nov 27, 2024
d95a8d5
Some manual updates again
andy31415 Nov 27, 2024
28f4bfc
More manual updates. Only tests remain (and these are odd now ....)
andy31415 Nov 27, 2024
4ff5295
Update tests and support for nullptr, manual fix for one compilation
andy31415 Nov 27, 2024
1373f28
Remove ember dependency from server
andy31415 Nov 27, 2024
842c19f
Fix more typos for compilation
andy31415 Nov 27, 2024
c249574
Restyle
andy31415 Nov 27, 2024
660f606
Add a note about cadmin 1_19 being slow
andy31415 Nov 27, 2024
3ce0b91
Fix up link to PR for persistence
andy31415 Nov 27, 2024
8087096
Restyled by prettier-markdown
restyled-commits Nov 27, 2024
8900c1b
Mark one more slow test
andy31415 Nov 27, 2024
fb1bed8
Add a few more dependencies to make esp32 link
andy31415 Nov 27, 2024
f8f1018
fix data model paths
andy31415 Nov 27, 2024
240f04c
Fix qpg and nrf compile
andy31415 Nov 28, 2024
c49c192
Merge branch 'master' into update_attribute_persistence
andy31415 Nov 28, 2024
9287eac
Fix a few more tests
andy31415 Nov 28, 2024
300fb85
Restyled by clang-format
restyled-commits Nov 28, 2024
067968a
Fix another typo for NRF compile
andy31415 Nov 28, 2024
c970312
Add persistence cpp files to darwin project
andy31415 Nov 28, 2024
4f95762
Fix typo
andy31415 Nov 28, 2024
071d232
Merge branch 'master' into update_attribute_persistence
andy31415 Nov 29, 2024
d5dd1ef
Drop timeouts for java tests: it is not reasonable to wait 360 minute…
andy31415 Nov 29, 2024
d4f8e4b
Add back deleted line from before
andy31415 Nov 29, 2024
3a409df
Restyled by clang-format
restyled-commits Nov 29, 2024
f6fbf6f
Update src/app/DefaultSafeAttributePersistenceProvider.h
andy31415 Dec 4, 2024
0665c32
Merge branch 'master' into update_attribute_persistence
andy31415 Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/java-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:
build \
"
- name: Run Discover Commissionables Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -115,6 +117,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing Onnetwork Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -126,6 +130,8 @@ jobs:
--factoryreset \
'
- name: Run IM Invoke Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -137,6 +143,8 @@ jobs:
--factoryreset \
'
- name: Run IM Extendable Invoke Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -148,6 +156,8 @@ jobs:
--factoryreset \
'
- name: Run IM Read Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -159,6 +169,8 @@ jobs:
--factoryreset \
'
- name: Run IM Write Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -170,6 +182,8 @@ jobs:
--factoryreset \
'
- name: Run IM Subscribe Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -181,6 +195,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing AlreadyDiscovered Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -205,6 +221,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing SetupQRCode Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -216,6 +234,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing ManualCode Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -227,6 +247,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing ICD Onnetwork Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_java_test.py \
Expand All @@ -252,6 +274,8 @@ jobs:
--factoryreset \
'
- name: Run Pairing Onnetwork Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
Expand All @@ -263,6 +287,8 @@ jobs:
--factoryreset \
'
- name: Run Kotlin IM Invoke Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
Expand All @@ -274,6 +300,8 @@ jobs:
--factoryreset \
'
- name: Run Kotlin IM Read Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
Expand All @@ -285,6 +313,8 @@ jobs:
--factoryreset \
'
- name: Run Kotlin IM Write Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
Expand All @@ -296,6 +326,8 @@ jobs:
--factoryreset \
'
- name: Run Kotlin IM Subscribe Test
# Generally completes in seconds
timeout-minutes: 2
run: |
scripts/run_in_python_env.sh out/venv \
'./scripts/tests/run_kotlin_test.py \
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,8 @@ To preserve `codegen/zap` generated logic, use
`CodegenDataModelProviderInstance` (see changes in
[36558](https://github.com/project-chip/connectedhomeip/pull/36558) and
[36613](https://github.com/project-chip/connectedhomeip/pull/36613) ).

To use default attribute persistence, you need to pass in a
`PersistentStorageDelegate` to `CodegenDataModelProviderInstance`. See example
changes in [36658](https://github.com/project-chip/connectedhomeip/pull/36658)
).
2 changes: 1 addition & 1 deletion examples/air-purifier-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +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();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
static chip::AmebaPersistentStorageOperationalKeystore sAmebaPersistentStorageOpKeystore;
Expand Down
2 changes: 1 addition & 1 deletion examples/air-purifier-app/cc32xx/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int AppTask::Init()
PLAT_LOG("Initialize Server");
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
chip::Server::GetInstance().Init(initParams);

// Initialize device attestation config
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void InitServer(intptr_t context)
initParams.appDelegate = &sAmebaObserver;

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

#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/asr/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ asr_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/lib",
"${chip_root}/src/platform/logging:default",
"${chip_root}/src/setup_payload",
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/infineon/psoc6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ psoc6_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/lib",
"${chip_root}/src/platform/logging:default",
"${chip_root}/src/setup_payload",
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/infineon/psoc6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
chip::Server::GetInstance().Init(initParams);

// We only have network commissioning on endpoint 0.
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ source_set("chip-all-clusters-common") {
deps = [
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/app/tests/suites/credentials:dac_provider",
"${chip_root}/src/lib",
"${chip_root}/third_party/jsoncpp",
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/linux/fuzzing-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +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();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
VerifyOrDie(Server::GetInstance().Init(initParams) == CHIP_NO_ERROR);

ApplicationInit();
Expand Down
2 changes: 1 addition & 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,7 @@ int AppTask::Init()
// Init ZCL Data Model and start server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
error = Server::GetInstance().Init(initParams);
if (error != CHIP_NO_ERROR)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ CHIP_ERROR AppTask::Init()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
AppFabricTableDelegate::Init();
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/nxp/mw320/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ mw320_executable("shell_mw320") {
]

deps = [
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/platform:syscalls_stub",
"${chip_root}/src/platform/logging:default",
]
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/nxp/mw320/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ static void run_chip_srv(System::Layer * aSystemLayer, void * aAppState)

static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
chip::Server::GetInstance().Init(initParams);
PRINTF("Done to call chip::Server() \r\n");
}
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ source_set("chip-all-clusters-common") {
deps = [
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/platform/tizen:app-main",
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/lib/shell:shell_core",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);

static AmebaObserver sAmebaObserver;
initParams.appDelegate = &sAmebaObserver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
chip::Server::GetInstance().Init(initParams);

// We only have network commissioning on endpoint 0.
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-minimal-app/linux/fuzzing-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +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();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
VerifyOrDie(Server::GetInstance().Init(initParams) == CHIP_NO_ERROR);

ApplicationInit();
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-minimal-app/mbed/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int AppTask::Init()
// Init ZCL Data Model and start server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
error = Server::GetInstance().Init(initParams);
if (error != CHIP_NO_ERROR)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ CHIP_ERROR AppTask::Init()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams));
AppFabricTableDelegate::Init();

Expand Down
2 changes: 1 addition & 1 deletion examples/chef/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static void InitServer(intptr_t context)
// Init ZCL Data Model and CHIP App Server
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);

static AmebaObserver sAmebaObserver;
initParams.appDelegate = &sAmebaObserver;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void InitServer(intptr_t)
// Start IM server
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
chip::Server::GetInstance().Init(initParams);

// Device Attestation & Onboarding codes
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/nrfconnect/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int main()
initParams.operationalKeystore = &sPSAOperationalKeystore;
#endif
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance();
initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
err = chip::Server::GetInstance().Init(initParams);
if (err != CHIP_NO_ERROR)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
factoryInitParams.opCertStore = &mOpCertStore;
factoryInitParams.enableServerInteractions = NeedsOperationalAdvertising();
factoryInitParams.sessionKeystore = &sSessionKeystore;
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance();
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(&mDefaultStorage);

// Init group data provider that will be used for all group keys and IPKs for the
// chip-tool-configured fabrics. This is OK to do once since the fabric tables
Expand Down
2 changes: 1 addition & 1 deletion examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void AppTask::InitServer(intptr_t arg)
{
static chip::CommonCaseDeviceServerInitParams initParams;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);

auto & infoProvider = chip::DeviceLayer::DeviceInfoProviderImpl::GetDefaultInstance();
infoProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
Expand Down
1 change: 1 addition & 0 deletions examples/energy-management-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ executable("chip-energy-management-app") {
deps = [
"${chip_root}/examples/energy-management-app/energy-management-common",
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app:attribute-persistence",
"${chip_root}/src/lib",
]

Expand Down
1 change: 1 addition & 0 deletions examples/energy-management-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ silabs_executable("energy-management-app") {

deps = [
":sdk",
"${chip_root}/src/app:attribute-persistence",
app_data_model,
]

Expand Down
2 changes: 1 addition & 1 deletion examples/fabric-admin/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
factoryInitParams.opCertStore = &mOpCertStore;
factoryInitParams.enableServerInteractions = NeedsOperationalAdvertising();
factoryInitParams.sessionKeystore = &sSessionKeystore;
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance();
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(&mDefaultStorage);

// Init group data provider that will be used for all group keys and IPKs for the
// fabric-admin-configured fabrics. This is OK to do once since the fabric tables
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/ameba/main/chipinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +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();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);
#if CONFIG_ENABLE_AMEBA_CRYPTO
ChipLogProgress(DeviceLayer, "platform crypto enabled!");
static chip::AmebaPersistentStorageOperationalKeystore sAmebaPersistentStorageOpKeystore;
Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/cc13x4_26x4/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ int AppTask::Init()
static DefaultTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) };
initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate;
(void) initParams.InitializeStaticResourcesBeforeServerInit();
initParams.dataModelProvider = CodegenDataModelProviderInstance();
initParams.dataModelProvider = CodegenDataModelProviderInstance(initParams.persistentStorageDelegate);

// Initialize info provider
sExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate);
Expand Down
Loading
Loading