Skip to content

Commit

Permalink
Updated docs regarding attributes updates in window covering cluster. (
Browse files Browse the repository at this point in the history
…#18840)

* Updated docs regarding attributes updates in window covering cluster.

The window-covering-server is missing information about necessity of
calling PostAttributeChange to update cluster attributes in case
of overriding MatterWindowCoveringClusterServerAttributeChangedCallback
method.

Added appropriate documentation.

* Update src/app/clusters/window-covering-server/window-covering-server.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/clusters/window-covering-server/window-covering-server.h

Co-authored-by: Boris Zbarsky <[email protected]>

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jul 18, 2022
1 parent c6230c4 commit 3245369
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,11 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler

/**
* @brief Cluster Attribute Changed Callback
*
* The method is implemented by default as a weak function and it takes care of updating
* the server attribute values by calling the PostAttributeChange method. If the application overrides
* this method, it needs to handle updating attributes (ideally by calling PostAttributeChange).
*
*/
void __attribute__((weak))
MatterWindowCoveringClusterServerAttributeChangedCallback(const app::ConcreteAttributePath & attributePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ void TiltPositionSet(chip::EndpointId endpoint, NPercent100ths position);
EmberAfStatus GetMotionLockStatus(chip::EndpointId endpoint);

/**
* @brief PostAttributeChange is called when an Attribute is modified
* @brief PostAttributeChange is called when an Attribute is modified.
*
* The method is called by MatterWindowCoveringClusterServerAttributeChangedCallback
* to update cluster attributes values. If the application overrides MatterWindowCoveringClusterServerAttributeChangedCallback,
* it should call the PostAttributeChange on its own.
*
* @param[in] endpoint
* @param[in] attributeId
Expand Down

0 comments on commit 3245369

Please sign in to comment.