-
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
Move ::WriteAttribute
validation inside Interaction Model Write Handling
#37322
base: master
Are you sure you want to change the base?
Move ::WriteAttribute
validation inside Interaction Model Write Handling
#37322
Conversation
…he datamodel provider to perform the checks
…another small amount of flash
PR #37322: Size comparison from 8be890b to d6cb071 Full report (27 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, telink, tizen)
|
PR #37322: Size comparison from 8be890b to 714e7bf Full report (56 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
PR #37322: Size comparison from 8be890b to d36e731 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37322: Size comparison from 8be890b to 61d7ac7 Full report (14 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
|
PR #37322: Size comparison from 8be890b to b5d9035 Increases above 0.2%:
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37322: Size comparison from 8be890b to ea2daaf Increases above 0.2%:
Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Co-authored-by: Boris Zbarsky <[email protected]>
PR #37322: Size comparison from 8be890b to 1d34e06 Increases above 0.2%:
Full report (63 builds for cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…ovider (#37345) * A first pass to add global attributes as part of IME instead of datamodel::provider * Some updates * Update some tests and reformat... the checks were PAINFUL,kept debug logs * Bump test: we now support the extra 3 global attributes not in metadata * More fixes * Fix compile error about parameter shadowing * More updates on casts to make xtensa compile happy * Restyled by clang-format * Fix tests * Make the test for unsupported write consistent with #37322 * Fix includes * Smaller delta * Attribute metadata is now guaranteed * Update src/app/data-model-provider/MetadataLookup.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/data-model-provider/MetadataLookup.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/reporting/Engine.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/reporting/Engine.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Address some code review comments * Remove the ember metadata public cluster path validation as it is not needed anymore as a public API * Do not enforce ordering in attribute list encoding * Comment about items returned or not returned in various calls * Correct the unsupported attribute call * Restyle * Update order dependent test in java ... this is somewhat broken... * Fix indent * Fix include * Fix typo * Allow TODO comment: I am not willing to re-build the kotlin code right now for this PR * Using uint64_t for encoding saves some flash * Fix test ... although this is NOT ok as we need order independent test * Fix the real list now * Switch the basic information constraints as a set compare (use python) * Remove extra space * Restyled by prettier-yaml * Fix asserts in DGWIFI - wrong method used * Restyled by autopep8 * Update src/app/data-model-provider/Provider.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/data-model-provider/ProviderMetadataTree.h Co-authored-by: Boris Zbarsky <[email protected]> * Update src/data-model-providers/codegen/CodegenDataModelProvider_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/data-model-provider/ProviderMetadataTree.h Co-authored-by: Boris Zbarsky <[email protected]> * Undo DFWIFI changes, leave it up to #37382. * Update ordering of attribute list to match unsorted (and smaller) implementation in the SDK * Update src/app/GlobalAttributes.cpp Co-authored-by: Terence Hampson <[email protected]> * Update src/app/GlobalAttributes.h Co-authored-by: Terence Hampson <[email protected]> * Add comment about oddify in path validation * Added comments about why we do the casts ... it is ugly * Add integration test for writing read only attributes and getting the correct error * Restyled by isort * Fix unused imports --------- Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Terence Hampson <[email protected]>
PR #37322: Size comparison from a38f2aa to b0111d9 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37322: Size comparison from 8deebeb to 17dbfe0 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Functionality from an external view should be unchanged. Internally, we now do not validate inside providers but rather use the metadata from the provider to validate things.
Fixes #36484
Changes
return spec error code of unsupported endpoint/cluster
so minimize flash usage overhead of this change.EndpointFinder
as it is not used anymore and the inline method of searching through endpoints results in smaller flash.At this point, at least on some devices we have a (very small) net flash win.
Testing