-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feeding bytes to a parser #1
Comments
This wouldn't be too hard. Some sort of In regards to having this repository added to an organization, I am curious as to what that would entail. I am open to anything. Lastly, apologies for the delay in response, I am fairly busy at this moment. |
Yeah, I think it's easy impl as well as otherwise I have to do it manually (finding the header of the packet and duplicating part of the parsing) One caveat would be that in |
Recently a colleague of mine worked on our sbus impl and they based it on https://github.com/AeroRust/sbus-rs/blob/master/src/parser/blocking.rs |
I appreciate the reference. I was personally imagining a fixed size buffer wherein a user feeds bytes, and once a full packet exists, it is returned, and the remaining buffer are shifted over to the left. I will consider using the |
Yes I think before I might be an easy solution especially if it's a Ring buffer of some sort. There is one drawback to the read trait which I personally haven't researched: |
I am inclined to agree, which is why I am now hesistant to implement the It should be said that I am trying to keep this library in line with the Unix philosophy - do one thing and do it well. It is not the library's job to acquire the bytes from a source, simply to parse them once received. Lastly, ironically, if I were to implement the I think a configurable array buffer should suffice for the time being. I will try to learn how to implement a ring buffer using only |
Thank you for working on this parser and publishing it to crates.io!
I'd love to see a way to feed bytes to the parser until a valid frame(s) are encountered and returned.
This will greatly help when developing firmware for embedded devices or any IO input which can feed partial frames.
PS: I'm the community manger at @AeroRust and I would love to take your crate repository under our organization. I'd love to hear your though on this.
The text was updated successfully, but these errors were encountered: