-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Strongly Typed Bitmaps #15697
Strongly Typed Bitmaps #15697
Conversation
PR #15697: Size comparison from b250d9a to 2b8c1ea Increases above 0.2%:
Increases (1 build for nrfconnect)
Decreases (1 build for esp32)
Full report (19 builds for cyw30739, efr32, esp32, k32w, mbed, nrfconnect, p6, qpg, telink)
|
I can confirm that I have rebased PR 15600 to your 15697 and scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug went through successfully. scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone fails with the following errors: In file included from ../../../examples/chip-tool/main.cpp:27: |
PR #15697: Size comparison from 40c9fd5 to 61bf373 Increases above 0.2%:
Increases (2 builds for linux)
Decreases (1 build for linux)
Full report (28 builds for cyw30739, efr32, k32w, linux, mbed, p6, qpg, telink)
|
/rebase |
61bf373
to
31c4cd8
Compare
Switching some of the attributes in the test cluster of type BITMAP* to actually using the enum-like definition of the bitmap resulted in all kinds of compiler errors. This adds support for strongly typed BITMAP* fields in the XML that in turn result in the use of the BitFlags type in the generated C++ code. To correctly work this type for attributes, a specialization of NumericAttributeTraits has been added for BitFlags<T> to correctly handle the underlying storage type as well the special rule for nullability. Some of other fix-ups to the chip-tool helpers were needed as well. Tests: Ensured the YAML tests for bitmaps still works.
31c4cd8
to
e81f416
Compare
PR #15697: Size comparison from cd44f9b to e81f416 Increases above 0.2%:
Increases (2 builds for linux)
Decreases (1 build for esp32)
Full report (27 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
Problem
Switching some of the attributes in the test cluster of type BITMAP* to actually using the enum-like definition of the bitmap resulted in all kinds of compiler errors.
Solution
This adds support for strongly typed BITMAP* fields in the XML that in turn result in the use of the BitFlags type in the generated C++ code.
To correctly work this type for attributes, a specialization of
NumericAttributeTraits
has been added forBitFlags<T>
to correctly handle the underlying storage type as well the special rule for nullability.Some of other fix-ups to the chip-tool helpers were needed as well.
Tests: