-
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
Add an Invoke implementation in CodegenDataModel #34220
Merged
mergify
merged 3 commits into
project-chip:master
from
andy31415:imdm/5-ember-invoke-clean
Jul 10, 2024
Merged
Add an Invoke implementation in CodegenDataModel #34220
mergify
merged 3 commits into
project-chip:master
from
andy31415:imdm/5-ember-invoke-clean
Jul 10, 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,
axelnxp,
bauerschwan,
bzbarsky-apple,
carol-apple,
cecille,
chapongatien,
chrisdecenzo,
chshu,
chulspro,
cliffamzn,
Damian-Nordic,
dhrishi,
doru91,
fessehaeve and
harimau-qirex
July 6, 2024 00:54
pullapprove
bot
requested review from
selissia,
yunhanw-google,
sharadb-amazon,
tcarmelveilleux,
tecimovic,
tima-q,
tobiasgraf,
turon,
vivien-apple,
wiba-nordic,
woody-apple,
younghak-hwang and
yufengwangca
July 6, 2024 00:54
PR #34220: Size comparison from 5a634f5 to 272ac40 Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
tehampson
reviewed
Jul 8, 2024
tehampson
approved these changes
Jul 8, 2024
PR #34220: Size comparison from 5a634f5 to c801b4c Full report (85 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
tehampson
reviewed
Jul 10, 2024
tehampson
approved these changes
Jul 10, 2024
bzbarsky-apple
approved these changes
Jul 10, 2024
j-ororke
pushed a commit
to j-ororke/connectedhomeip
that referenced
this pull request
Jul 18, 2024
* Ember invoke implementation with unit tests inside DataModel * Code review comments * Update src/app/codegen-data-model/tests/TestCodegenModelViaMocks.cpp
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 removes the previous proposal of using an InvokeResponder and keeps using a CommandHandler. This is because the CommandHandler interface requires a CommandHandler so this is likely the path of least resistance (otherwise defining and implementing an InvokeResponder would likely be quite complex).
After the above changes, the update is quite trivial as the invoke basically translates to a Dispatch() that can never fail. I added a future todo to handle CommandHandlerInterface in a similar way it is handled for attributes, i.e. a separate registry that can be used and accessed. That would allow a DM move flexibility, would make it symmetrical with AAI and likely add more unit testing ability.
Changes
virtual CHIP_ERROR Invoke(const InvokeRequest & request, chip::TLV::TLVReader & input_arguments, CommandHandler * handler) = 0;