-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[netif] refactor Netif and NcpSpinel (#2479)
`Netif::Ip6Send` depends on the implementation of `NcpSpinel`. And there are more methods to come. (For example, `SubcribeMulticastAddress`). Currently we pass the Ip6Send implementation to `Netif` in `Netif::Init` through a std::function object. But then, each time we add a new method, we need to update the signature of `Netif::Init`(making it very long) and the calling of `Netif::Init`, which is not preferred. This commit adds a dependencies class `NetifDependencies` to encapsulate all the implementation functions for Netif and let `NcpSpinel` implement this interface.
- Loading branch information
Showing
5 changed files
with
74 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters