-
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
Update cluster command APIs to make it easier to fix list/struct support in commands #10168
Merged
bzbarsky-apple
merged 4 commits into
project-chip:master
from
bzbarsky-apple:cluster-api-changes
Oct 5, 2021
Merged
Update cluster command APIs to make it easier to fix list/struct support in commands #10168
bzbarsky-apple
merged 4 commits into
project-chip:master
from
bzbarsky-apple:cluster-api-changes
Oct 5, 2021
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
bzbarsky-apple
force-pushed
the
cluster-api-changes
branch
from
October 2, 2021 06:17
d3e974a
to
ae8d960
Compare
pullapprove
bot
requested review from
andy31415,
anush-apple,
balducci-apple,
carol-apple,
cecille,
chrisdecenzo,
Damian-Nordic,
emargolis,
erjiaqing,
franck-apple,
harimau-qirex,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
LuDuda,
msandstedt,
mspang,
pan-apple,
sagar-apple,
saurabhst,
shana-apple and
tcarmelveilleux
October 2, 2021 06:18
bzbarsky-apple
force-pushed
the
cluster-api-changes
branch
3 times, most recently
from
October 3, 2021 05:19
e694578
to
2d95888
Compare
vivien-apple
reviewed
Oct 4, 2021
vivien-apple
approved these changes
Oct 4, 2021
@mrjerryjohns @erjiaqing @msandstedt @saurabhst @jepenven-silabs @jmartinez-silabs @LuDuda Please take a look? |
mrjerryjohns
reviewed
Oct 4, 2021
bzbarsky-apple
force-pushed
the
cluster-api-changes
branch
from
October 4, 2021 22:35
2d95888
to
67fccaf
Compare
mrjerryjohns
reviewed
Oct 4, 2021
src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt
Outdated
Show resolved
Hide resolved
src/app/zap-templates/partials/im_command_handler_cluster_commands.zapt
Outdated
Show resolved
Hide resolved
mrjerryjohns
approved these changes
Oct 4, 2021
mrjerryjohns
reviewed
Oct 4, 2021
bzbarsky-apple
force-pushed
the
cluster-api-changes
branch
from
October 4, 2021 23:17
67fccaf
to
3d595fe
Compare
Specific changes: 1) Codegen skeleton (empty so far) structs that represent command fields. 2) Modify codegen to pass the command path and the field struct to a command callback and change the order of the endpoint and CommandSender/CommandHandler arguments. 3) Modify codegen implementation of callbacks to have the new signature. ./scripts/tools/zap/generate.py -t src/app/common/templates/templates.json -o zzz_generated/app-common/app-common/zap-generated src/controller/data_model/controller-clusters.zap && ./scripts/tools/zap/generate.py -o zzz_generated/all-clusters-app/zap-generated examples/all-clusters-app/all-clusters-common/all-clusters-app.zap && ./gn_build.sh
This commit was generated by running: find src/app/clusters examples/tv-app/linux/include/content-launcher examples/window-app/common/src -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef; } s/bool emberAf([a-zA-Z0-9]*)Cluster([a-zA-Z0-9]*)Callback\((?:chip::)?EndpointId (aEndpoint|endpoint|aEndpointId),\s*(?:chip::)?((?:app::)?CommandHandler \*(?: commandObj| command| apCommandObj|))([^)]*)\)/bool emberAf\1Cluster\2Callback(\4, const app::ConcreteCommandPath & commandPath, EndpointId \3\5, Commands::\2::DecodableType & commandData)/g;' and then restyling the modified files.
Mostly: * Include headers needed for ConcreteCommandPath and the command field structs. * Make sure the namespaces are done right (add using declarations or namespace prefixes as needed). * Resolve some name ambiguities due to name collisions between cluster-objects.h and af-structs.h. We need to find a better solution for this.
bzbarsky-apple
force-pushed
the
cluster-api-changes
branch
from
October 5, 2021 00:50
3d595fe
to
40da958
Compare
jmartinez-silabs
approved these changes
Oct 5, 2021
Size increase report for "gn_qpg-example-build" from db999f7
Full report output
|
Size increase report for "esp32-example-build" from db999f7
Full report output
|
Size increase report for "nrfconnect-example-build" from db999f7
Full report output
|
mrjerryjohns
approved these changes
Oct 5, 2021
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.
Review Note: Reviewing the commits individually is probably much nicer than reviewing the whole thing at once.
Problem
There are a few things this is laying the groundwork for:
Change overview
Testing
No intended behavior changes. Certification tests still pass locally.