-
Notifications
You must be signed in to change notification settings - Fork 36
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
Feature request: Allow deeper filter conditions #35
Comments
Match by regex? |
No expert in regex but it should work I think. |
I'm currently working on two things: a significant change allowing user-supplied filter scripts to be inserted in kplex's input and output streams and also a tool to do various filtering chores on AIS. I hope to have an "alpha" version of the former should be ready by the end of next week which would allow the insertion of simple sed script to do what you're asking for |
Sorry it's been more than a week but I have the basic outline in the "xfilter" branch. It's a bit rough and ready at the moment but should be good for alpha testing within the week |
If you're happy to try out a very "alpha" idea which may have all kinds of race conditions but seems to basically work...
For example...create /tmp/foo which looks something like this:
(python is not my strong point but you get the general idea....) ...or if you want to filter on output, add the following to the stanza for the interface you want to output AIS on: Let me know how you get on and appologies in advance if it hangs: still a work in progress :-) |
Have you had a chance to check this out yet? The latest code update to the xfilter branch allows specification of arguments but the whole command line needs to be quoted in a config file. Quotes inside that string can be escaped so quotes can be used to delimit arguments containing whitespace. Comments/feedback appreciated. |
Any feedback? If not I'll close this in 5 days if I hear nothing |
Have a test setup running, seems to work. Thanks for your help! |
Feature request:
Allow deeper filter conditions (looking at the data in the NMEA sentence)
For example, allowing only AIS messages with a valid channel indicator.
!AIVDO,1,1,,,B3
j5;000@4DTk6=
uVHswh5sP06,053!AIVDO,1,1,,,B3
j5;00004DTkV=
uRHCwhUsP06,017These are "dummy" messages where field 5 is null, I want to filter them out (or only allow every 10th message)
!AIVDO,1,1,,A,B3
j5;000@4DTk6=
uVHswh5sP06,053!AIVDO,1,1,,B,B3
j5;00004DTkV=
uRHCwhUsP06,017!AIVDO,1,1,,1,B3
j5;000@4DTk6=
uVHswh5sP06,053!AIVDO,1,1,,2,B3
j5;00004DTkV=
uRHCwhUsP06,017These are transmitted messages (where field 5 is A,B,1 or 2)
Also useful to block certain poorly formatted messages from older equipment, my Autohelm wind system f ex.
The text was updated successfully, but these errors were encountered: