Skip to content
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

Having the ability to have our own MeshNetworkCallbacks #353

Open
Kleak opened this issue Nov 2, 2020 · 5 comments
Open

Having the ability to have our own MeshNetworkCallbacks #353

Kleak opened this issue Nov 2, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@Kleak
Copy link

Kleak commented Nov 2, 2020

As of today we only have onMeshNetworkUpdate but we lost a lot of information on why it's updated.

It would be great if we can have our on MeshNetworkCallbacks. By having this we will not lost why the MeshNetwork is updated and allow more granularity when executing functionality.

@roshanrajaratnam
Copy link
Member

Hi @Kleak, could you elaborate a little bit more on this?

As of now every time the network is changed due to a mesh message that is sent/received you receive a callback onNetworkUpdated() and this is because the network is saved to the database at each operation. However there is also MeshStatusCallbacks that are invoked for each message received/sent meanining you have both these callbacks giving you some information everytime a network may have changed. Do you need more functionality on this?

@Kleak
Copy link
Author

Kleak commented Nov 3, 2020

in fact onNetworkUpdated is loosing lot of information.
I would like to have the event after updating the provisioner for example but i can't because i'm not sure the onNetworkUpdated is the response of my update provisioner or something else.
But lot of other things can't be waited because we don't have the information :/
onNetworkUpdated didn't give us any information apart the mesh network has been updated but not why it has been updated.

example :
I select a new provisioner
i got onNetworkUpdated but i may getting onNetworkUpdated also for other event so i can't differentiate if it's the result of my provisioner updated.

what i would like is having a way to be sure this event is the response of my select provisioner which MeshNetworkCallbacks provide but is not available to us.

@roshanrajaratnam
Copy link
Member

Right I see, this is something I can look into but it will have to wait a little bit unfortunately. What I can do is add a callback for each database update i.e. provisioner, app keys and etc. hope this would work for you?

@roshanrajaratnam roshanrajaratnam added the enhancement New feature or request label Nov 3, 2020
@Kleak
Copy link
Author

Kleak commented Nov 3, 2020

Yes that would be ok 👍
Or maybe expose an other MeshNetworkCallbacks and trigger event at the same place the current one is.

@roshanrajaratnam
Copy link
Member

ok, as of now I have some other priorities but i will look in to as soon as I get some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants