-
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
Introduce CommandSender::ExtendedCallback #31324
Introduce CommandSender::ExtendedCallback #31324
Conversation
PR #31324: Size comparison from a2c88cf to 9fedf93 Increases (43 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, nrfconnect, psoc6, qpg)
Decreases (19 builds for bl602, bl702, bl702l, cc13x4_26x4, linux, nrfconnect)
Full report (44 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
|
PR #31324: Size comparison from a2c88cf to 7d2d077 Increases (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, nrfconnect, psoc6, qpg, telink)
Decreases (24 builds for bl602, bl702, bl702l, cc13x4_26x4, linux, nrfconnect)
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Messaging::ExchangeHolder mExchangeCtx; | ||
Callback * mpCallback = nullptr; | ||
ExtendableCallback * mpExtendableCallback = nullptr; |
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.
Consider putting this together with mpCallback
in a union to save RAM. An outer bitfield:1 could be used to differentiate which field is active.
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.
Fixes: #30991
The two major differences between
CommandSender::ExtendedCallback
andCommandSender::Callback
are:CommandSender
so as functionality expands and more data needs to pass into the callback they are added to the struct instead of function argument list.Alternatives considered:
Callback::PathSpecificErrorGoesToOnResponseCallbacks
, where we would call OnResponse* callback with path specific errors.Test:
src/app/tests/TestCommandInteraction.cpp
passchip-repl
, verified able to receive two path specific errors.