-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wildcard reads + chunking (#12140)
* Fix Wildcard Reads Using the Matter REPL, this PR fixes a number of critical bugs in both the server-side logic as well as the Python APIs to validate all permutations of wildcard reads as well as basic chunking. On the server side, it fixes: - The AttributeExpandPathIterator was incorrectly using emberAfClusterIndex to iterate over clusters on an endpoint, but that isn't its API contract. That function returns something else completely. Fixed that implementation as well as created a new, better named function called emberAfClusterIndexInMatchingEndpoints that actually better describes what it does. - In ReadSingleClusterData, we were chaining a number of MessageDef builder calls one after another and checking the error at the end (by calling GetError()). However, this resulted in the original error encountered in the first call in that chain being lost and replaced with something else by the time it got to the end. This was especially problematic during chunking since the errors CHIP_ERROR_BUFFER_TOO_SMALL and CHIP_ERROR_NO_MEMORY are what the higher level calls in Engine::BuildSingleReportDataAttributeReportIBs expect to correclty handle chunking. Since the error got lost and converted, it resulted in the Engine treating it like a critical failure and stopping the generation of reports entirely. On the client side in Python: - Reading Clusters.OnOff.Attributes.SampleMfgSpecificAttribute0x00000x1049 broke because in the Python code, we were generating attribute IDs that were 16-bit values instead of 32-bits. This was a combination of not generating them correclty, as well as the C++ bindings expecting a c_uint16 instead of c_uint32 - Fixed up ChipDeviceController.ReadAttribute to actually work correctly with wildcards instead of just erroring out due to parsing issues. Validation: - Tested all wildcard read variations using the Python ReadAttribute API in the REPL and ensured it completed successfully. - Added all variations as tests to the mobile device test suite. * Update src/app/util/attribute-storage.h * Rerun Codegen * Do not enable WiFi on cirque tests * Disable wildcards * Fixes some more bugs in the chunking logic + adds a definitive chunking validation test. * Build fixes Co-authored-by: Song Guo <[email protected]> Co-authored-by: Kaku Matsu <[email protected]>
- Loading branch information
1 parent
1ee4c8d
commit f58faac
Showing
17 changed files
with
1,608 additions
and
1,245 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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 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 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 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
Oops, something went wrong.