Skip to content

Commit

Permalink
[Infineon] Label Cluster support for infineon P6 example apps (#21726)
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenCY authored Aug 9, 2022
1 parent a92ff68 commit 5801963
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/all-clusters-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ p6_executable("clusters_app") {
":all_clusters_app_sdk_sources",
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]
Expand Down
5 changes: 5 additions & 0 deletions examples/all-clusters-app/p6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include <setup_payload/SetupPayload.h>

#include <DeviceInfoProviderImpl.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <platform/P6/NetworkCommissioningDriver.h>

Expand Down Expand Up @@ -104,6 +105,7 @@ using namespace ::chip::DeviceLayer;
using namespace ::chip::System;

AppTask AppTask::sAppTask;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

namespace {
app::Clusters::NetworkCommissioning::Instance
Expand All @@ -128,6 +130,9 @@ static void InitServer(intptr_t context)
// We only have network commissioning on endpoint 0.
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);

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

// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-minimal-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ p6_executable("clusters_minimal_app") {
":all_clusters_app_sdk_sources",
"${chip_root}/examples/all-clusters-minimal-app/all-clusters-common",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]
Expand Down
5 changes: 5 additions & 0 deletions examples/all-clusters-minimal-app/p6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include <setup_payload/SetupPayload.h>

#include <DeviceInfoProviderImpl.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <platform/P6/NetworkCommissioningDriver.h>

Expand Down Expand Up @@ -104,6 +105,7 @@ using namespace ::chip::DeviceLayer;
using namespace ::chip::System;

AppTask AppTask::sAppTask;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

namespace {
app::Clusters::NetworkCommissioning::Instance
Expand All @@ -128,6 +130,9 @@ static void InitServer(intptr_t context)
// We only have network commissioning on endpoint 0.
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);

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

// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ p6_executable("lighting_app") {
":lighting_app_sdk_sources",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/lighting-app/lighting-common",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]
Expand Down
5 changes: 5 additions & 0 deletions examples/lighting-app/p6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include <setup_payload/SetupPayload.h>

#include <DeviceInfoProviderImpl.h>
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <platform/P6/NetworkCommissioningDriver.h>

Expand Down Expand Up @@ -108,6 +109,7 @@ using namespace ::chip::Credentials;
using namespace ::chip::DeviceLayer;

AppTask AppTask::sAppTask;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

namespace {
app::Clusters::NetworkCommissioning::Instance
Expand All @@ -126,6 +128,9 @@ static void InitServer(intptr_t context)
(void) initParams.InitializeStaticResourcesBeforeServerInit();
chip::Server::GetInstance().Init(initParams);

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

// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/p6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ p6_executable("lock_app") {
":lock_app_sdk_sources",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/lock-app/lock-common",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]
Expand Down
5 changes: 5 additions & 0 deletions examples/lock-app/p6/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <platform/P6/NetworkCommissioningDriver.h>

#include <DeviceInfoProviderImpl.h>
#include <app/clusters/door-lock-server/door-lock-server.h>
#include <app/clusters/identify-server/identify-server.h>

Expand Down Expand Up @@ -120,6 +121,7 @@ using namespace ::chip::System;
using namespace P6DoorLock::LockInitParams;

AppTask AppTask::sAppTask;
static chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;

namespace {
app::Clusters::NetworkCommissioning::Instance
Expand All @@ -138,6 +140,9 @@ static void InitServer(intptr_t context)
(void) initParams.InitializeStaticResourcesBeforeServerInit();
chip::Server::GetInstance().Init(initParams);

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

// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
Expand Down

0 comments on commit 5801963

Please sign in to comment.