-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Fix Reads + Misc Fixes #11878
Merged
mrjerryjohns
merged 5 commits into
project-chip:master
from
mrjerryjohns:python/read-write-fix
Nov 20, 2021
Merged
Python: Fix Reads + Misc Fixes #11878
mrjerryjohns
merged 5 commits into
project-chip:master
from
mrjerryjohns:python/read-write-fix
Nov 20, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR fixes the following: - When handing a buffer of bytes from C++ to Python, the usage of c_char_p instead of c_void_p resulted in the buffer being treated as a null-terminated string, resulting in the clipping of the data anytime zero was encountered. This resulted in reads not quite working. - Fixed up the logic that automatically looked up the right type of cluster object when processing a read response. - Simplified the API for WriteAttribute by converting the generated classes for attributes into dataclasses with a 'value' member in them. - Added Python docstrings for read and write APIs
andy31415
approved these changes
Nov 16, 2021
fast track: python only changes made by a domain owner. |
yunhanw-google
approved these changes
Nov 16, 2021
andy31415
reviewed
Nov 16, 2021
andy31415
reviewed
Nov 16, 2021
yufengwangca
approved these changes
Nov 16, 2021
msandstedt
approved these changes
Nov 16, 2021
PR #11878: Size comparison from 5a06fce to 70d9c3e Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
erjiaqing
approved these changes
Nov 17, 2021
LuDuda
approved these changes
Nov 17, 2021
mrjerryjohns
commented
Nov 19, 2021
c2746f1
to
6e972b3
Compare
PR #11878: Size comparison from 1adaf7a to 6e972b3 Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #11878: Size comparison from 1adaf7a to 81e1bf2 Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #11878: Size comparison from 5bad4ed to be7b005 Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this pull request
Nov 20, 2021
Presumably a bad merge from the combination of project-chip#11868 and project-chip#11878
bzbarsky-apple
added a commit
that referenced
this pull request
Nov 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the following:
When handing a buffer of bytes from C++ to Python, the usage of
c_char_p instead of c_void_p resulted in the buffer being treated as a
null-terminated string, resulting in the clipping of the data anytime
zero was encountered. This resulted in reads not quite working.
Fixed up the logic that automatically looked up the right type of
cluster object when processing a read response.
Simplified the API for WriteAttribute by converting the generated
classes for attributes into dataclasses with a 'value' member in them.
Added Python docstrings for read and write APIs