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

Sink Service fetching interval #187

Open
keni7385 opened this issue Aug 4, 2020 · 1 comment
Open

Sink Service fetching interval #187

keni7385 opened this issue Aug 4, 2020 · 1 comment

Comments

@keni7385
Copy link

keni7385 commented Aug 4, 2020

Hello,

Is it possible to control the interval period used by the Sink service to fetch data from the Wirepas Mesh network? For instance from a command line parameter, environment variable or even from a variable in the source code?

Thanks,
Keni

@GwendalRaoul
Copy link
Contributor

Hello,

(Sorry for delay to answer, I was on holiday)

no it is not possible to configure it but could be added if you have the need for it.
It is today defined at lower level in c-mesh-api library.
https://github.com/wirepas/c-mesh-api/blob/master/lib/platform/linux/platform.c#L22

So the library doing the wrapping (at least for linux) poll the interface every 20ms.
It polls every 20 ms when there is no indication but once an indication is retrieved, the library will try to fetch other indications immediately (up to 30 indications).

Would you like to reduce this polling period or increase it?

There is another mechanism with an additional gpio between sink and host mcu to be notified when there is an indication available, removing the need to poll. But it is not implemented in c-mesh-api as this pin is not often present.

Best regards,
Gwendal

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

No branches or pull requests

2 participants