-
Notifications
You must be signed in to change notification settings - Fork 122
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
Custom Proxy Filter initialization #390
Conversation
@bspinner @Eklow02 @adriansergheev |
Note: This has not been tested yet, as I don't have my DK with me today. |
I could not figure it out, but it seems that it is still needed to call setType on ProxyFilter instance which is not optimal. I don't see at a quick glance how to make it initialized with .exclusionList for example, |
let manager = MeshNetworkManager(...)
manager.proxyFilter.initialState = .exclusionList([])
|
The initial state can be changed many times and it's read each time the phone connects to a new Proxy Node. |
thanks a lot for the tip, I thought I saw private(set) in there, |
@philips77 Sorry for late reply. We are just about to up our usage of group addresses and will have to change the proxy filter more often. |
With the proposed changes you may set initial setup to required value and change it whenever you want. It will be applied to each new connected node after the setup has changed. I understand you need to know when the proxy gets disconnected/a new proxy gets connected so you could assign the right list? |
Ah, sorry, I forgot about add/remove. I'll try to integrate and test this PR with our app. |
@philips77 I tried to migrate to this solution today. One thing I'm missing from #388 is a new callback of It gets called when the proxy node acknowledged the proxy configuration message. In my PR the new callback is called in two places: I didn't want to break behaviour for existing users of |
@philips77 Any thoughts? |
Hello, sorry, I was busy with other project. I don't see reason why not to add such callback. |
Don't pass addresses but listSize, as we don't know the addresses for sure. Don't call acknowledged callback when proxy filter received unexpected addresses.
Adds proxyFilterUpdateAcknowledged delegate
OK, I'm on it. I shall release this week. |
This PR tries to solve #386 in a way proposed in #386 (comment).
Alternative solution have been proposed in #387 and #388.
Pros of proposed solution:
ProxyFilter
with own implementation, and still allows setting.inclusionList
or.exclusionList
with custom addresses.Cons:
Breaking change
proxyFilter
member ofMeshNetworkManager
has been changed from Optional to Non-Optional.Other