-
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 Darwin API for starting multiple controllers on the same fabric. #27972
Add Darwin API for starting multiple controllers on the same fabric. #27972
Conversation
* the rules for creating a controller on a new fabric. In particular, the | ||
* vendor ID must not be nil. | ||
*/ | ||
- (MTRDeviceController * _Nullable)createAdditionalControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams |
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.
Rather than creating another new method here, I'd create a second method with the same signature, except add something before error like: "secondary:(BOOL)secondary" that does the right thing. Cascading methods like this are more normal in ObjectiveC
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.
Right, this comes down to what the semantics we want are. If it's a "create controller on existing fabric, optionally secondary", what you suggest makes sense and I will switch to it if we keep these semantics.
If we change to "just create a controller, without doing fabric checks" semantics-wise, then it's not really parallel to either of the two things we have (though if we had thought about it up front we could have had createControllerWithParams:fabricCheck:error:
or something where fabricCheck:
takes an enum describing the behavior....
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.
Creating a new init method with a vague name isn't great. We should keep all existing semantics with the current one, and you can add an enum for fabricCheck (better name? fabricBehavior:?) that by default the current one does what it does already.
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.
API Update
393591d
to
4923b71
Compare
4923b71
to
0d50134
Compare
PR #27972: Size comparison from 0d81aa5 to 0d50134 Increases (11 builds for bl602, cc32xx, cyw30739, esp32, nrfconnect, psoc6, telink)
Decreases (12 builds for bl702, bl702l, k32w, nrfconnect, psoc6, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
This PR has been superseded by #28533. I've moved the tests this PR was added into that PR. |
Fixes #27394
REVIEW NOTE: One thing I am not sure about is whether it's better to have this API or something like: