Improve 'subscribe_command` callbacks (CON-1960)#1690
Conversation
shubhamdp
left a comment
There was a problem hiding this comment.
@tomasmcguinness Thanks for the PR, LGTM! Could you also update the RELEASE_NOTES.md stating the rename and additional callback?
Great. I've added two bullets to RELEASE_NOTES.md as requested. Please let me know if they are acceptable. Thx. |
|
@tomasmcguinness could you please fix the restyling errors and codespell errors flagged by pre-commit hook? You can find the documentation here: https://github.com/espressif/esp-matter/blob/main/DEVELOPER_GUIDE.md Also, please squash the commits. |
|
@shubhamdp I'm not 100% sure how to squash the commits as there are other merges from main and a conflict with the README. Can you advise? I gave it a try and it only seems to have duplicated my commits 😕 |
|
I cleaned the branch! All the workflows have passed. |
I was wondering why you closed it 😄 LGMT! |
|
Sorry @shubhamdp I did that automatically when I reset my branch (no more differences!) Do I need to do anything further to get this merged? |
|
I think this would be all! |
|
Do you have an ETA on the merge of this PR? |
|
@tomasmcguinness your changes was merged with merge-commit: 8428176 I think since you updated this branch with the merge-commit, may be it may have missed out on detecting and marking this as merged! |
Excellent. Can I just close this PR then? |
|
Yes Please! |
|
Closing as this has been merged! 🎉 |
Description
This PR makes two main changes to the
subscribe_commandFirst, a new
subscription_established_cb_thas been added along with a new parameterestablished_cb.Second, the existing
subscribe_done_cb_thas been renamed tosubscription_terminated_cbto better reflect what it means.The new
established_cballows a controller to know when thesubscribe_commandhas been sent and processed.Renaming
done_cb->terminated_cbmakes the callback's use much clearer. Done usually means success, but in this case it refers to subscriptions being terminated.The existing constructors remain so no breaking changes should be introduced.
Testing
I have tested this in my controller:
Session establishment is reported
Termination is reported
Failure to subscribe is reported:
Checklist
Before submitting a Pull Request, please ensure the following: