Skip to content

Commit

Permalink
[nxp][examples][common][lock-app] Add DiagnosticLog and Update zap fi…
Browse files Browse the repository at this point in the history
…le (#36120)

* [nxp][examples][common] Update zap files to support Aliro

Signed-off-by: Andrei Menzopol <[email protected]>

* [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 <[email protected]>
Signed-off-by: Ethan Tan <[email protected]>

---------

Signed-off-by: Andrei Menzopol <[email protected]>
Signed-off-by: Ethan Tan <[email protected]>
  • Loading branch information
andrei-menzopol authored and pull[bot] committed Dec 19, 2024
1 parent d891f01 commit 1314786
Show file tree
Hide file tree
Showing 3 changed files with 863 additions and 52 deletions.
17 changes: 17 additions & 0 deletions examples/lock-app/nxp/common/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,20 @@
#include "UserInterfaceFeedback.h"
#endif

#if CONFIG_DIAG_LOGS_DEMO
#include <DiagnosticLogsProviderDelegateImpl.h>
#include <app/clusters/diagnostic-logs-server/diagnostic-logs-server.h>
#endif

using namespace ::chip;
using namespace chip::app::Clusters;
using namespace chip::app::Clusters::DoorLock;
using chip::app::DataModel::Nullable;

#if CONFIG_DIAG_LOGS_DEMO
using namespace ::chip::app::Clusters::DiagnosticLogs;
#endif

void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value)
{
chip::DeviceManager::CHIPDeviceManagerCallbacks * cb =
Expand Down Expand Up @@ -158,3 +167,11 @@ void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId)
DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kAuto, NullNullable, NullNullable,
NullNullable, NullNullable);
}

#if CONFIG_DIAG_LOGS_DEMO
void emberAfDiagnosticLogsClusterInitCallback(chip::EndpointId endpoint)
{
auto & logProvider = LogProvider::GetInstance();
DiagnosticLogsServer::Instance().SetDiagnosticLogsProviderDelegate(endpoint, &logProvider);
}
#endif
64 changes: 61 additions & 3 deletions examples/lock-app/nxp/zap/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,10 @@ endpoint 0 {
callback attribute serverList;
callback attribute clientList;
callback attribute partsList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;
}
Expand All @@ -2400,7 +2404,7 @@ endpoint 0 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 1;
callback attribute clusterRevision;
}

Expand Down Expand Up @@ -2439,6 +2443,10 @@ endpoint 0 {
ram attribute updatePossible default = 1;
ram attribute updateState default = 0;
ram attribute updateStateProgress default = 0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

Expand Down Expand Up @@ -2622,6 +2630,10 @@ endpoint 0 {
callback attribute windowStatus;
callback attribute adminFabricIndex;
callback attribute adminVendorId;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

Expand All @@ -2636,6 +2648,10 @@ endpoint 0 {
callback attribute commissionedFabrics;
callback attribute trustedRootCertificates;
callback attribute currentFabricIndex;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

Expand All @@ -2658,6 +2674,10 @@ endpoint 0 {
callback attribute groupTable;
callback attribute maxGroupsPerFabric;
callback attribute maxGroupKeysPerFabric;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;

Expand Down Expand Up @@ -2725,30 +2745,68 @@ endpoint 1 {
ram attribute numberOfTotalUsersSupported default = 10;
ram attribute numberOfPINUsersSupported default = 10;
ram attribute numberOfRFIDUsersSupported default = 10;
ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10;
ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10;
ram attribute numberOfHolidaySchedulesSupported default = 10;
ram attribute maxPINCodeLength default = 8;
ram attribute minPINCodeLength default = 6;
ram attribute maxRFIDCodeLength default = 20;
ram attribute minRFIDCodeLength default = 10;
ram attribute credentialRulesSupport default = 1;
ram attribute numberOfCredentialsSupportedPerUser default = 5;
ram attribute autoRelockTime;
ram attribute language default = "en";
ram attribute autoRelockTime default = 60;
ram attribute soundVolume default = 0;
ram attribute operatingMode default = 0x00;
ram attribute supportedOperatingModes default = 0xFFF6;
ram attribute enableOneTouchLocking default = 0x00;
ram attribute enablePrivacyModeButton default = 0x00;
ram attribute wrongCodeEntryLimit default = 3;
ram attribute userCodeTemporaryDisableTime default = 10;
ram attribute requirePINforRemoteOperation default = 0;
callback attribute aliroReaderVerificationKey;
callback attribute aliroReaderGroupIdentifier;
callback attribute aliroReaderGroupSubIdentifier;
callback attribute aliroExpeditedTransactionSupportedProtocolVersions;
callback attribute aliroGroupResolvingKey;
callback attribute aliroSupportedBLEUWBProtocolVersions;
callback attribute aliroBLEAdvertisingVersion;
callback attribute numberOfAliroCredentialIssuerKeysSupported;
callback attribute numberOfAliroEndpointKeysSupported;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0x0001;
ram attribute featureMap default = 0x7DB3;
ram attribute clusterRevision default = 7;

handle command LockDoor;
handle command UnlockDoor;
handle command UnlockWithTimeout;
handle command SetWeekDaySchedule;
handle command GetWeekDaySchedule;
handle command GetWeekDayScheduleResponse;
handle command ClearWeekDaySchedule;
handle command SetYearDaySchedule;
handle command GetYearDaySchedule;
handle command GetYearDayScheduleResponse;
handle command ClearYearDaySchedule;
handle command SetHolidaySchedule;
handle command GetHolidaySchedule;
handle command GetHolidayScheduleResponse;
handle command ClearHolidaySchedule;
handle command SetUser;
handle command GetUser;
handle command GetUserResponse;
handle command ClearUser;
handle command SetCredential;
handle command SetCredentialResponse;
handle command GetCredentialStatus;
handle command GetCredentialStatusResponse;
handle command ClearCredential;
handle command UnboltDoor;
handle command SetAliroReaderConfig;
handle command ClearAliroReaderConfig;
}
}

Expand Down
Loading

0 comments on commit 1314786

Please sign in to comment.