Skip to content

Commit 6f0a70c

Browse files
[nxp][examples][common][lock-app] Add DiagnosticLog and Update zap file (project-chip#36120)
* [nxp][examples][common] Update zap files to support Aliro Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com> * [nxp][examples][common][lock-app] Add DiagnosticLog and Update zap file * Add DiagnosticLogs in lock-app ZclCallbacks.cpp * Update zap file: enable door-lock attributes Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com> Signed-off-by: Ethan Tan <ethan.tan@nxp.com> --------- Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com> Signed-off-by: Ethan Tan <ethan.tan@nxp.com>
1 parent 605e3f5 commit 6f0a70c

File tree

3 files changed

+863
-52
lines changed

3 files changed

+863
-52
lines changed

examples/lock-app/nxp/common/main/ZclCallbacks.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,20 @@
3535
#include "UserInterfaceFeedback.h"
3636
#endif
3737

38+
#if CONFIG_DIAG_LOGS_DEMO
39+
#include <DiagnosticLogsProviderDelegateImpl.h>
40+
#include <app/clusters/diagnostic-logs-server/diagnostic-logs-server.h>
41+
#endif
42+
3843
using namespace ::chip;
3944
using namespace chip::app::Clusters;
4045
using namespace chip::app::Clusters::DoorLock;
4146
using chip::app::DataModel::Nullable;
4247

48+
#if CONFIG_DIAG_LOGS_DEMO
49+
using namespace ::chip::app::Clusters::DiagnosticLogs;
50+
#endif
51+
4352
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value)
4453
{
4554
chip::DeviceManager::CHIPDeviceManagerCallbacks * cb =
@@ -158,3 +167,11 @@ void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId)
158167
DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kAuto, NullNullable, NullNullable,
159168
NullNullable, NullNullable);
160169
}
170+
171+
#if CONFIG_DIAG_LOGS_DEMO
172+
void emberAfDiagnosticLogsClusterInitCallback(chip::EndpointId endpoint)
173+
{
174+
auto & logProvider = LogProvider::GetInstance();
175+
DiagnosticLogsServer::Instance().SetDiagnosticLogsProviderDelegate(endpoint, &logProvider);
176+
}
177+
#endif

examples/lock-app/nxp/zap/lock-app.matter

+61-3
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,10 @@ endpoint 0 {
23842384
callback attribute serverList;
23852385
callback attribute clientList;
23862386
callback attribute partsList;
2387+
callback attribute generatedCommandList;
2388+
callback attribute acceptedCommandList;
2389+
callback attribute eventList;
2390+
callback attribute attributeList;
23872391
callback attribute featureMap;
23882392
callback attribute clusterRevision;
23892393
}
@@ -2400,7 +2404,7 @@ endpoint 0 {
24002404
callback attribute acceptedCommandList;
24012405
callback attribute eventList;
24022406
callback attribute attributeList;
2403-
ram attribute featureMap default = 0;
2407+
ram attribute featureMap default = 1;
24042408
callback attribute clusterRevision;
24052409
}
24062410

@@ -2439,6 +2443,10 @@ endpoint 0 {
24392443
ram attribute updatePossible default = 1;
24402444
ram attribute updateState default = 0;
24412445
ram attribute updateStateProgress default = 0;
2446+
callback attribute generatedCommandList;
2447+
callback attribute acceptedCommandList;
2448+
callback attribute eventList;
2449+
callback attribute attributeList;
24422450
ram attribute featureMap default = 0;
24432451
ram attribute clusterRevision default = 1;
24442452

@@ -2622,6 +2630,10 @@ endpoint 0 {
26222630
callback attribute windowStatus;
26232631
callback attribute adminFabricIndex;
26242632
callback attribute adminVendorId;
2633+
callback attribute generatedCommandList;
2634+
callback attribute acceptedCommandList;
2635+
callback attribute eventList;
2636+
callback attribute attributeList;
26252637
ram attribute featureMap default = 0;
26262638
ram attribute clusterRevision default = 1;
26272639

@@ -2636,6 +2648,10 @@ endpoint 0 {
26362648
callback attribute commissionedFabrics;
26372649
callback attribute trustedRootCertificates;
26382650
callback attribute currentFabricIndex;
2651+
callback attribute generatedCommandList;
2652+
callback attribute acceptedCommandList;
2653+
callback attribute eventList;
2654+
callback attribute attributeList;
26392655
ram attribute featureMap default = 0;
26402656
ram attribute clusterRevision default = 1;
26412657

@@ -2658,6 +2674,10 @@ endpoint 0 {
26582674
callback attribute groupTable;
26592675
callback attribute maxGroupsPerFabric;
26602676
callback attribute maxGroupKeysPerFabric;
2677+
callback attribute generatedCommandList;
2678+
callback attribute acceptedCommandList;
2679+
callback attribute eventList;
2680+
callback attribute attributeList;
26612681
callback attribute featureMap;
26622682
callback attribute clusterRevision;
26632683

@@ -2725,30 +2745,68 @@ endpoint 1 {
27252745
ram attribute numberOfTotalUsersSupported default = 10;
27262746
ram attribute numberOfPINUsersSupported default = 10;
27272747
ram attribute numberOfRFIDUsersSupported default = 10;
2748+
ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10;
2749+
ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10;
2750+
ram attribute numberOfHolidaySchedulesSupported default = 10;
27282751
ram attribute maxPINCodeLength default = 8;
27292752
ram attribute minPINCodeLength default = 6;
27302753
ram attribute maxRFIDCodeLength default = 20;
27312754
ram attribute minRFIDCodeLength default = 10;
27322755
ram attribute credentialRulesSupport default = 1;
27332756
ram attribute numberOfCredentialsSupportedPerUser default = 5;
2734-
ram attribute autoRelockTime;
2757+
ram attribute language default = "en";
2758+
ram attribute autoRelockTime default = 60;
2759+
ram attribute soundVolume default = 0;
27352760
ram attribute operatingMode default = 0x00;
27362761
ram attribute supportedOperatingModes default = 0xFFF6;
27372762
ram attribute enableOneTouchLocking default = 0x00;
27382763
ram attribute enablePrivacyModeButton default = 0x00;
27392764
ram attribute wrongCodeEntryLimit default = 3;
27402765
ram attribute userCodeTemporaryDisableTime default = 10;
27412766
ram attribute requirePINforRemoteOperation default = 0;
2767+
callback attribute aliroReaderVerificationKey;
2768+
callback attribute aliroReaderGroupIdentifier;
2769+
callback attribute aliroReaderGroupSubIdentifier;
2770+
callback attribute aliroExpeditedTransactionSupportedProtocolVersions;
2771+
callback attribute aliroGroupResolvingKey;
2772+
callback attribute aliroSupportedBLEUWBProtocolVersions;
2773+
callback attribute aliroBLEAdvertisingVersion;
2774+
callback attribute numberOfAliroCredentialIssuerKeysSupported;
2775+
callback attribute numberOfAliroEndpointKeysSupported;
27422776
callback attribute generatedCommandList;
27432777
callback attribute acceptedCommandList;
27442778
callback attribute eventList;
27452779
callback attribute attributeList;
2746-
ram attribute featureMap default = 0x0001;
2780+
ram attribute featureMap default = 0x7DB3;
27472781
ram attribute clusterRevision default = 7;
27482782

27492783
handle command LockDoor;
27502784
handle command UnlockDoor;
27512785
handle command UnlockWithTimeout;
2786+
handle command SetWeekDaySchedule;
2787+
handle command GetWeekDaySchedule;
2788+
handle command GetWeekDayScheduleResponse;
2789+
handle command ClearWeekDaySchedule;
2790+
handle command SetYearDaySchedule;
2791+
handle command GetYearDaySchedule;
2792+
handle command GetYearDayScheduleResponse;
2793+
handle command ClearYearDaySchedule;
2794+
handle command SetHolidaySchedule;
2795+
handle command GetHolidaySchedule;
2796+
handle command GetHolidayScheduleResponse;
2797+
handle command ClearHolidaySchedule;
2798+
handle command SetUser;
2799+
handle command GetUser;
2800+
handle command GetUserResponse;
2801+
handle command ClearUser;
2802+
handle command SetCredential;
2803+
handle command SetCredentialResponse;
2804+
handle command GetCredentialStatus;
2805+
handle command GetCredentialStatusResponse;
2806+
handle command ClearCredential;
2807+
handle command UnboltDoor;
2808+
handle command SetAliroReaderConfig;
2809+
handle command ClearAliroReaderConfig;
27522810
}
27532811
}
27542812

0 commit comments

Comments
 (0)