-
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
[Darwin] Make MTRControllerFactory the OTA Provider Delegate #21224
[Darwin] Make MTRControllerFactory the OTA Provider Delegate #21224
Conversation
PR #21224: Size comparison from 925cff6 to 7e92471 Increases (2 builds for esp32, telink)
Decreases (1 build for telink)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
7e92471
to
bd5785f
Compare
PR #21224: Size comparison from 750eedf to bd5785f Increases (3 builds for cc13x2_26x2, cyw30739, telink)
Decreases (2 builds for cc13x2_26x2, telink)
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
auto systemState = _controllerFactory->GetSystemState(); | ||
_otaProviderDelegateBridge->Init(systemState->SystemLayer(), systemState->ExchangeMgr()); |
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.
Unfortunately, at this point there might not be a usable system state on the controller factory. It gets created when the C++ controller is actually created, which has not happened here yet. :(
And yes, I know I said it's about where we do the event loop bits. I was wrong about this part here...
We really need to add some actual tests exercising this thing as controllers start up and shut down, to make sure it all works properly.
The right place to put this init is probably at the place where we start a controller successfully and the controller count is 1...
…#21304) Co-authored-by: Vivien Nicolas <[email protected]>
Problem
This PR moves the OTA Provider delegate from
MTRDeviceController
toMTRControllerFactory
.It also internalise the conversion from an ota URL to a proper BDX URI since the BDX uri is supposed to use the nodeId used for the CASE session where the
QueryImageResponse
is issued:This PR also change onto which dispatch queue the method of the
MTROTAProviderDelegate
are processed. Everything happens onto the chip work dispatch queue. It should not change much of the behaviour since most of the delegates exposes a completion handler that can be called from a different queue, their internally ensure that the work is dispatched to the chip work dispatch queue.#fix #20948
Change overview
MTRControllerFactory
.MTROTAProviderDelegate
callback methods.Testing
It has been tested using the same procedure than #21161