-
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 server side of timed invoke. #12389
Implement the server side of timed invoke. #12389
Conversation
This is broken! If something under here returns error, we will tryconnectedhomeip/src/app/CommandHandler.cpp Lines 76 to 86 in 7c15cc5
This comment was generated by todo based on a
|
Figure out who is responsible for handling checkingconnectedhomeip/src/app/InteractionModelEngine.cpp Lines 589 to 594 in 7c15cc5
This comment was generated by todo based on a
|
Add handling of MsgType::WriteRequest here.connectedhomeip/src/app/TimedHandler.cpp Lines 80 to 90 in 7c15cc5
This comment was generated by todo based on a
|
7c15cc5
to
e9a5fd2
Compare
PR #12389: Size comparison from 02bd2c7 to e9a5fd2 Increases above 0.2%:
Increases (19 builds for efr32, k32w, linux, p6, qpg, telink)
Decreases (2 builds for p6)
Full report (21 builds for efr32, k32w, linux, p6, qpg, telink)
|
e9a5fd2
to
a8054ab
Compare
PR #12389: Size comparison from 02bd2c7 to a8054ab Increases above 0.2%:
Increases (24 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
Decreases (5 builds for mbed, p6)
Full report (28 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
|
a8054ab
to
cad2a68
Compare
PR #12389: Size comparison from 1e67398 to cad2a68 Increases above 0.2%:
Increases (24 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
Decreases (5 builds for mbed, p6)
Full report (28 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
|
cad2a68
to
bd94a78
Compare
PR #12389: Size comparison from a7b18b8 to bd94a78 Increases above 0.2%:
Increases (35 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Decreases (5 builds for mbed, p6)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
This is failing due to a merge conflict between project-chip#11988 and project-chip#12389: the latter ends up in an error state as described in project-chip#12466 (comment) and the former makes our code a lot more sensitive to being in that error state. The fix for the test is to not use the sync mode of loopback transport, which allows the stack for sending a message to unwind before responses are delivered and avoids the "object deleted by response while we are still working with it" problem described in project-chip#12466 (comment). When the responses were made async, it turned out the test was missing some "expect response" flags that should have been there all along and it was only passing because the response happened before the send could get to the "close the exchange" stage. With async responses, exchanges were closing too early without the "expect response" flags. Separately we should figure out which parts of project-chip#12466 we should do.
This is failing due to a merge conflict between #11988 and #12389: the latter ends up in an error state as described in #12466 (comment) and the former makes our code a lot more sensitive to being in that error state. The fix for the test is to not use the sync mode of loopback transport, which allows the stack for sending a message to unwind before responses are delivered and avoids the "object deleted by response while we are still working with it" problem described in #12466 (comment). When the responses were made async, it turned out the test was missing some "expect response" flags that should have been there all along and it was only passing because the response happened before the send could get to the "close the exchange" stage. With async responses, exchanges were closing too early without the "expect response" flags. Separately we should figure out which parts of #12466 we should do.
@@ -247,6 +271,7 @@ class InteractionModelEngine : public Messaging::ExchangeDelegate, public Comman | |||
// TODO(#8006): investgate if we can disable some IM functions on some compact accessories. | |||
// TODO(#8006): investgate if we can provide more flexible object management on devices with more resources. | |||
BitMapObjectPool<CommandHandler, CHIP_IM_MAX_NUM_COMMAND_HANDLER> mCommandHandlerObjs; | |||
BitMapObjectPool<TimedHandler, CHIP_IM_MAX_NUM_TIMED_HANDLER> mTimedHandlers; |
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.
One of more objects from this pool outlives the InteractionModelEngine
in a TestTimedHandler
unit test. What should happen?
Problem
No implementation of timed invoke yet.
Change overview
This implements the server side of timed invoke. Client side will be a separate PR. Server side of timed write will also be a separate PR.
Testing
New unit tests added. Other tests will need to wait on client-side support, though once #12380 lands I will at least be able to add a test that that an untimed invoke of a command that requires timed invoke fails.