-
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
Implement the codegen-data-model Write support #34139
Merged
mergify
merged 98 commits into
project-chip:master
from
andy31415:imdm/4-ember-write-attribute
Jul 5, 2024
Merged
Implement the codegen-data-model Write support #34139
mergify
merged 98 commits into
project-chip:master
from
andy31415:imdm/4-ember-write-attribute
Jul 5, 2024
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
pullapprove
bot
requested review from
andyg-apple,
anush-apple,
arkq,
bauerschwan,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
fessehaeve,
harsha-rajendran,
hawk248,
hicklin,
jepenven-silabs,
jmartinez-silabs,
jmeg-sfy,
joonhaengHeo,
jtung-apple,
kiel-apple,
kkasperczyk-no,
kpschoedel,
ksperling-apple and
lazarkov
June 28, 2024 17:34
tcarmelveilleux
approved these changes
Jul 4, 2024
bzbarsky-apple
approved these changes
Jul 5, 2024
PR #34139: Size comparison from e8bc7e7 to 08c4fbd Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
austina-csa
pushed a commit
to austina-csa/connectedhomeip
that referenced
this pull request
Jul 10, 2024
* Initial copy/merge of the codegendatamodel::write support * Restyle * Remove the error translation for ACL checks for attribute writes * Comment correction after special access error code guarantees were removed * Set the namespace for DataModel to resolve nameclash for android builds * Restyle * Some changes to make darwin builds happy * Do not clang-tidy on CodegenDataModel_Write * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Use little endian encoding for pascal long strings, since this is what ember-strings uses * Restyle * Fix code to compile and pass tests * Code review comments * Comment update * Update based on code review feedback * Wrong condition. Fixed * Return invalid value to match ember-compatibility-functions * switch invalid data point to constraint error for return codes * Fix code review comments: comments and return unsupportedaccess * Remove useless comment - error check should be clear enough * Comment update * Re-arrange code for read only and timed * Re-format the read only checks a bit * Use CHIP_ERROR_NOT_FOUND * Separate out variable names * Slight updated code layout * Updated return value for chip error * Updated test to verifyordie instead of just logging errors * Update src/app/codegen-data-model/tests/TestCodegenModelViaMocks.cpp Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Update based on review feedback * Fix endianess and copying in test code * Restyle * Updated comment * Update src/app/codegen-data-model/tests/TestCodegenModelViaMocks.cpp Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Add unit test for "lowest signed value write" * Restyle * A constraint error update and better tests for AAI returning errors * One more test for invalid ember usage * Restyle * more tests for more coverage * Comment update * Fix comment * One more test for more coverage * Also cover writing non-null value to nullable attribute * Fix the ember string usage * Update src/app/codegen-data-model/CodegenDataModel_Read.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/codegen-data-model/CodegenDataModel_Read.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Remove duplicate code * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Remove chip::app:: prefix in unit test since we have a top level using * Fix copy & paste encode to decode * Replace decoded with converted * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Start using Failure for invalid data type instead of unsupported read. I do not expect this code path to actually be hit much * Fix comments * Updated encode/decode comment * Use failure instead of constraint error * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/codegen-data-model/CodegenDataModel_Write.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Use dataversion mismatch for write without a version * Add extra IsGlobalAttribute check * use external writes for the ember write logic, so that we have extra size and validations * Updated comments * more comments * Restyle * Use emberAfWriteAttribute * Add comment about ember-string * Restyle * Add context to unit tests, make write do the marking of dirty paths * Add some unit tests for dirty path handling * Move the change callback around a bit * Restyle * Fixed unit tests to support size checks * Add unit test for invalid data * Restyle * Fix linter errors * Update to make size enforcement and guarantees clearer * use size_t for getlength sizes * Review comments and updated code to compile for android * make datamodel unambiguous * More fixes for clang compilation for DataModel scoping * Restyle * Try to make darwin compiler happy ... ssize_t vs size_t * Fix typo * Restyle * Code review updates * Undo submodule update --------- Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
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 implements the write support via ember/attribute-access-interface. Generally the equivalent that today exists in ember-compatibility-functions.