-
Notifications
You must be signed in to change notification settings - Fork 235
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
[android] replace VendorServer with OtDaemonServer #1967
Conversation
To make it easier to update the OtDaemonServer implementation without making separate changes on both GitHub and AOSP.
4c999c8
to
2e14bf8
Compare
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.
LGTM
I liked the generic VendorServer though, we used it to hook our own api in... though the header did need patching to be usable. Instead of replacing the generic VendorServer with something Android specific, could we not make the header more flexible so it's useable for everyone? Don't implement the constructor, and add some private storage. The PIMPL pattern seems fitting for this?
|
@DarthBo Can you edit your application.cpp directly without being proxied by VendorServer? As you mentioned, you already need to patch the header, so just forget about it. You can add your server just we do for the OtDaemonServer, but on your own branch (you can make whatever changes on your own branch anyway). Previous VendorServer code doesn't provide any abstraction so there isn't too much value other than keeping the github and aosp branches from diverge, but it shouldn't be an issue of your branch :) |
@wgtdkp I could fork it, sure, but I'd prefer to avoid that. We get around the issues of the header by replacing it with some CMake magic, no forks needed. I probably should have tried to upstream my suggested header changes earlier, sorry about that. Before the Vendor Server, we used our own fork, and it was a pain to keep the stack updated because there was always something that changed. I'm sure you had the same problem in Android as well. I thought the point of the VendorServer was to avoid this pain for all vendors. Replacing something generic (but flawed) with something android specific (instead of just fixing it) feels backwards, and not a little like cheating. I doubt every vendor can upstream their own ifdef... |
Hi @DarthBo, If you can't live without VendorServer, then it's proven to be useful and I am happy to revert this change :)
I an curious how can you managed to work, are you using otbr-agent as a library of your vendor server? I don't see how it can work without modifying the upstream code. |
It looks like we need at least three classes to support a custom FooServer as I don't want to call my specific VendorServer as "Impl". What about making VendorServer an abstract class instead?
So we needs only two classes. BTW, I need shared_ptr for Android, does it work for you? |
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment)
…d#1967)" (openthread#1995) This reverts commit 300cfed. Change-Id: Ic8694b97ddb4125599314769361ea10d483b01cc
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment) Change-Id: Ic322efbee9b58d7a2743c72a511572ec7ebfb262
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment) Change-Id: Ic322efbee9b58d7a2743c72a511572ec7ebfb262
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment)
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment)
We include ot-br-posix as a git submodule, the root project has the VendorServer implementation and links against otbr-agent. We override the header by including ours first with
That also works for me
Sure! |
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment)
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment)
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from openthread#1967 (comment) Change-Id: Ic1b41b8b60e5953142854f761e377e080f1937fc
This commit changes VendorServer to an abstract class so that it can be extended to have different implementations. Fulfills request from #1967 (comment) Change-Id: Ic1b41b8b60e5953142854f761e377e080f1937fc
To make it easier to update the OtDaemonServer implementation
since we have to save the OtDaemonServer as a field of Application
anyway.