-
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
Stop passing individual field arguments to server cluster command callbacks #10354
Stop passing individual field arguments to server cluster command callbacks #10354
Conversation
It doesn't work right, because we don't have the right types for scene field sets.
386e6c5
to
342381b
Compare
src/app/clusters/application-launcher-server/application-launcher-server.cpp
Show resolved
Hide resolved
src/app/clusters/barrier-control-server/barrier-control-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/barrier-control-server/barrier-control-server.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job !
Question how command callbacks with optional parameters will be handle ?
how this work to test the presence of an arg in CommandData ?
Thanks to answer if you see my message
I remembered that optional parameters will be represented by chip::Optional. Anyway, this will be the work for ClusterObjects instead of command handlers (of course, the handler should have their own logic for optional fields) AFAIK. |
bd9df30
to
c2f16b5
Compare
@jmeg-sfy There are fundamentally two options here, on the decoding side:
I don't think we're 100% decided yet on which is better. Any thoughts would be much appreciated. On the encoding side I think we want to use |
Size increase report for "gn_qpg-example-build" from 9cfc21b
Full report output
|
Size increase report for "esp32-example-build" from 9cfc21b
Full report output
|
Size increase report for "nrfconnect-example-build" from 9cfc21b
Full report output
|
REVIEW NOTE: Reviewing the individual changesets may me easier than reviewing the whole thing squashed together: there are some mass-change changesets in there that are search-and-replace, and some changesets that have manual changes that need careful review.
Problem
We are passing both the field structs and individual fields.
Change overview
Just pass the structs.
This requires some manual fixups for types that were mis-handled by the individual fields (lists and CHAR_STRING) to get the code to compile.
Fixes #8974
Fixes #8977
Testing
No intended observable behavior changes so far and passes our existing tests.