forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable more attributes in TestCluster. (project-chip#12355)
This enables attributes of the following types: * Signed and unsigned 24, 40, 48, 56-bit integers. * float and double. * A named enum. * A struct. * 8-bit and 16-bit signed and unsigned integers with min/max values set. Other sizes don't have min/max support yet. * Nullable versions of all of the above. This should hopefully let us start trying to write yaml tests for these things so we can figure out which parts work and which parts don't work. Other changes needed to make the above successfully go through codegen and generate code that compiles: * Add type mappings for float/double for java. * Add min/max definitions (set to -Infinity and Infinity) for float/double in chip-tool. * Remove the broken StructHelper.js file, which was not correctly identifying structs, and replace its use with "if_is_struct" in the one template that uses this codepath. * Fix checking for lists in asChipCallback to actually work properly. Most code that dealt with lists checked for isList explicitly and never actually used the output of asChipCallback, but we're using it in more places now. * Add checks for the "Unsupported" chipCallback type in various templates so we can add attributes of types not supported by that machinery (doubles, floats, structs, named enums) without codegen completely failing. Some things that are known not to work: 1) A bunch of clients (command-line chip-tool, java, "old-style" python, darwin) rely on having typed read/report callback functions for all attribute types they support, and we don't have those yet for float, double, named enums, and structs. Will need followups to make those work. For now the relevant codepaths are effectively disabled by conditioning on chipCallback.name being "Unsupported", so we can try to address these types one at a time as desired. 2) The ember-compatibility-functions code for reading/writing attributes does not support float and double. Those bits would need to be added to test the float/double attributes in a meaningful way.
- Loading branch information
1 parent
ee824af
commit cd03b40
Showing
52 changed files
with
18,448 additions
and
3,132 deletions.
There are no files selected for viewing
486 changes: 483 additions & 3 deletions
486
examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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.