Skip to content

Commit 5629b68

Browse files
More edits
1 parent d8c2389 commit 5629b68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sld601-matter-application-development/matter-application-cluster-logic.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ void AppTask::OnOffAttributeWriteStartTimer()
9898

9999
This function will have to be defined in AppTask.h as well as part of the AppTask class.
100100

101-
Now locate the MatterPostAttributeChangeCallback() function in the src/ZclCallbacks.cpp file. This function is called by the application framework after it changes an attribute value. Since we are modifying OnOff attribute in the OnOffTmrExpiryHandler(), this callback will be used to re-initiate the timer such that the attribute is continuously being toggled. To do this, the AppTask::OnOffAttributeWriteStartTimer() can be called. OnOffAttributeWriteStartTimer() is part of the AppTask context. In order to implement this function in the we must first get the AppTask instance with AppTask::GetAppTask(). To do this, modify the MatterPostAttributeChangeCallback() as shown below:
101+
Now, locate the MatterPostAttributeChangeCallback() function in the src/ZclCallbacks.cpp file. This function is invoked by the application framework after an attribute value has been changed. Since we are modifying the OnOff attribute in the OnOffTmrExpiryHandler(), this callback will be used to re-initiate the timer so that the attribute continues to toggle. To achieve this, you can call AppTask::OnOffAttributeWriteStartTimer(), which is part of the AppTask context.
102+
103+
To implement this functionality, you must first obtain the AppTask instance using AppTask::GetAppTask(). Then, modify the MatterPostAttributeChangeCallback() function as shown below:
102104

103105
```C++
104106
void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size,

0 commit comments

Comments
 (0)