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

Add a deduplication utility for raw buffers #36

Draft
wants to merge 8 commits into
base: auterion-router-latest
Choose a base branch
from

Conversation

jkflying
Copy link

@jkflying jkflying commented Feb 2, 2021

This is a sample implementation of a deduplication tool. Not yet integrated into mavlink-router message handling or configuration.

@jbeyerstedt
Copy link

jbeyerstedt commented Feb 11, 2021

With the change above (and some merge-conflict resolving to make it work with upstream) it seems to work just fine, even with our special multi-modem/ redundant-link situation.

(But the auterion repo and upstream are already quite different. I think, that we need to get your changes upstream as soon as possible and not continue with two diverging code-bases.)

@jbeyerstedt
Copy link

I'm currently trying to add a config parameter for the dedup period, but mavlink-router's architecture is not really cooperating. It's not really in a good place now, but I didn't want to add another method to the Mainloop just for configuring the de-duplication. See the latest commit of https://github.com/jbeyerstedt/mavlink-router/commits/feature/de-duplication.

P.S. Did I say, that I want to re-do the whole config stuff?
P.P.S. Sorry for ranting in your PR.

@jbeyerstedt
Copy link

We have some issues with missing data after letting this run for some time. Especially the heartbeat will not get through mavlink-router any more. I guess, the issue has to do with the code I commented on.

And by the way, the output of the duration_cast is a signed integer, but even "just" using half of the 32 bit value range will last for 24 day until an overflow. (Should mavlink-router just quit in case of an integer overflow and be re-started by systemd?)
But the more interesting issue is, that the timestamp value starts at about 980 million milliseconds, which seems a bit odd. It's not the right value for a signed to unsigned conversion. Which lead me to the question, where start_time is initialized!?

@jbeyerstedt
Copy link

This might get into upstream master before the next tagged release of mavlink-router with PR mavlink-router#323. We have done some major refactoring and cleanup in the master branch lately, so I had to change some more things to get it rebased.

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

Successfully merging this pull request may close these issues.

2 participants