From de2e5de51a573189b75dac48d6189ff53166bac4 Mon Sep 17 00:00:00 2001 From: Jon Rhees Date: Tue, 5 Jul 2022 18:25:20 -0600 Subject: [PATCH 1/2] Add attributePath parameter to Door Lock Server's unhandledAttributeChanged API --- src/app/clusters/door-lock-server/door-lock-server.cpp | 6 +++--- src/app/clusters/door-lock-server/door-lock-server.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 9b2482adf6e1cd..84b199bb7c591e 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -3576,7 +3576,7 @@ MatterDoorLockClusterServerPreAttributeChangedCallback(const chip::app::Concrete break; default: - res = emberAfPluginDoorLockOnUnhandledAttributeChange(attributePath.mEndpointId, attributeType, size, value); + res = emberAfPluginDoorLockOnUnhandledAttributeChange(attributePath.mEndpointId, attributePath, attributeType, size, value); break; } @@ -3666,8 +3666,8 @@ emberAfPluginDoorLockOnUserCodeTemporaryDisableTimeChange(chip::EndpointId Endpo } chip::Protocols::InteractionModel::Status __attribute__((weak)) -emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, EmberAfAttributeType attrType, uint16_t attrSize, - uint8_t * attrValue) +emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attrType, uint16_t attrSize, uint8_t * attrValue) { return chip::Protocols::InteractionModel::Status::Success; } diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index ac0cce099e6a56..8c6397d673271d 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -738,6 +738,7 @@ chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUserCodeTempora * @brief Cluster attribute pre-change callback * * @param EndpointId endpoint for which attribute is changing + * @param attributePath concrete attribute path that is changing * @param attrType attribute that is going to be changed * @param attrSize attribute value storage size * @param attrValue attribute value to set @@ -746,6 +747,7 @@ chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUserCodeTempora * @retval any other InteractionModel::Status value to forbid attribute change */ chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attrType, uint16_t attrSize, uint8_t * attrValue); From 0be30c2af86d808a01a8f65eb0460c5978c106cf Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 6 Jul 2022 00:34:17 +0000 Subject: [PATCH 2/2] Restyled by clang-format --- src/app/clusters/door-lock-server/door-lock-server.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.h b/src/app/clusters/door-lock-server/door-lock-server.h index 8c6397d673271d..d7289c4bd2c094 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.h +++ b/src/app/clusters/door-lock-server/door-lock-server.h @@ -746,10 +746,9 @@ chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUserCodeTempora * @retval InteractionModel::Status::Success if attribute change is possible * @retval any other InteractionModel::Status value to forbid attribute change */ -chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, - const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attrType, - uint16_t attrSize, uint8_t * attrValue); +chip::Protocols::InteractionModel::Status +emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attrType, uint16_t attrSize, uint8_t * attrValue); // ============================================================================= // Plugin callbacks that are called by cluster server and should be implemented